From 57fcabc8bd6986b2b8b907a855e111b1afc800f4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:06:32 +0000 Subject: [PATCH 1/3] chore: update protobuf to 33.2 and rules_python to 1.6.0 PiperOrigin-RevId: 960369644 Source-Link: https://github.com/googleapis/googleapis/commit/fc62df08979faf46d3c4d7eec30c57e6046a29f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80c59368f6b8c91fcf55e9f937519203b45c22f3 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9zZWN1cml0eV9zY2FubmVyLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtsb2FkX21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWRldmVsb3BlcnMtZGV2ZWxvcGVyX2tub3dsZWRnZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS1jcmVkZW50aWFscy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS12Mi8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS12My8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS12M2JldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWlkZW50aXR5LWFjY2Vzc19jb250ZXh0X21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLWRlbGl2ZXJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLW1hcHMtZmxlZXRfZW5naW5lLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLWNzcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 --- .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 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 | 1723 +++++++++ .../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 | 1589 ++++++++ .../web_security_scanner/rest/service_stub.rb | 878 +++++ .../v1beta/crawled_url_pb.rb | 21 + .../v1beta/finding_addon_pb.rb | 27 + .../websecurityscanner/v1beta/finding_pb.rb | 24 + .../v1beta/finding_type_stats_pb.rb | 21 + .../v1beta/scan_config_error_pb.rb | 22 + .../v1beta/scan_config_pb.rb | 34 + .../v1beta/scan_run_error_trace_pb.rb | 24 + .../websecurityscanner/v1beta/scan_run_pb.rb | 28 + .../v1beta/scan_run_warning_trace_pb.rb | 22 + .../v1beta/web_security_scanner_pb.rb | 50 + .../web_security_scanner_services_pb.rb | 73 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 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 | 804 ++++ .../executions/v1/executions/credentials.rb | 53 + .../executions/v1/executions/paths.rb | 75 + .../executions/v1/executions/rest.rb | 55 + .../executions/v1/executions/rest/client.rb | 733 ++++ .../v1/executions/rest/service_stub.rb | 329 ++ .../workflows/executions/v1/executions_pb.rb | 46 + .../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 | 593 +++ .../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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 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 | 791 ++++ .../v1beta/executions/credentials.rb | 53 + .../executions/v1beta/executions/paths.rb | 75 + .../executions/v1beta/executions_pb.rb | 37 + .../v1beta/executions_services_pb.rb | 57 + .../workflows/executions/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../workflows/executions/v1beta/executions.rb | 200 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../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 | 35 + .../google-cloud-workflows-v1/.gitignore | 20 + .../.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 | 15 + .../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 | 1076 ++++++ .../workflows/v1/workflows/credentials.rb | 51 + .../workflows/v1/workflows/operations.rb | 843 +++++ .../cloud/workflows/v1/workflows/paths.rb | 113 + .../cloud/workflows/v1/workflows/rest.rb | 56 + .../workflows/v1/workflows/rest/client.rb | 999 +++++ .../workflows/v1/workflows/rest/operations.rb | 927 +++++ .../v1/workflows/rest/service_stub.rb | 449 +++ .../google/cloud/workflows/v1/workflows_pb.rb | 44 + .../workflows/v1/workflows_services_pb.rb | 66 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../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 | 128 + .../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 | 35 + .../google-cloud-workflows-v1beta/.gitignore | 20 + .../.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 | 15 + .../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 | 954 +++++ .../workflows/v1beta/workflows/credentials.rb | 51 + .../workflows/v1beta/workflows/operations.rb | 843 +++++ .../cloud/workflows/v1beta/workflows/paths.rb | 69 + .../cloud/workflows/v1beta/workflows/rest.rb | 56 + .../workflows/v1beta/workflows/rest/client.rb | 884 +++++ .../v1beta/workflows/rest/operations.rb | 927 +++++ .../v1beta/workflows/rest/service_stub.rb | 388 ++ .../cloud/workflows/v1beta/workflows_pb.rb | 38 + .../workflows/v1beta/workflows_services_pb.rb | 64 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-workload_manager-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-workload_manager-v1/Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../google-cloud-workload_manager-v1/Rakefile | 169 + .../gapic_metadata.json | 78 + .../google-cloud-workload_manager-v1.gemspec | 29 + .../lib/google-cloud-workload_manager-v1.rb | 21 + .../lib/google/cloud/workload_manager/v1.rb | 45 + .../workload_manager/v1/bindings_override.rb | 75 + .../google/cloud/workload_manager/v1/rest.rb | 38 + .../cloud/workload_manager/v1/version.rb | 28 + .../workload_manager/v1/workload_manager.rb | 57 + .../v1/workload_manager/client.rb | 1774 +++++++++ .../v1/workload_manager/credentials.rb | 47 + .../v1/workload_manager/operations.rb | 843 +++++ .../v1/workload_manager/paths.rb | 111 + .../v1/workload_manager/rest.rb | 55 + .../v1/workload_manager/rest/client.rb | 1655 +++++++++ .../v1/workload_manager/rest/operations.rb | 927 +++++ .../v1/workload_manager/rest/service_stub.rb | 816 ++++ .../cloud/workloadmanager/v1/service_pb.rb | 75 + .../workloadmanager/v1/service_services_pb.rb | 68 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workloadmanager/v1/service.rb | 991 +++++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...adata_google.cloud.workloadmanager.v1.json | 495 +++ .../workload_manager/create_evaluation.rb | 54 + .../workload_manager/delete_evaluation.rb | 54 + .../workload_manager/delete_execution.rb | 54 + .../workload_manager/get_evaluation.rb | 47 + .../workload_manager/get_execution.rb | 47 + .../workload_manager/list_evaluations.rb | 51 + .../list_execution_results.rb | 51 + .../workload_manager/list_executions.rb | 51 + .../snippets/workload_manager/list_rules.rb | 47 + .../list_scanned_resources.rb | 51 + .../workload_manager/run_evaluation.rb | 54 + .../workload_manager/update_evaluation.rb | 54 + .../v1/workload_manager_operations_test.rb | 400 ++ .../v1/workload_manager_paths_test.rb | 91 + .../v1/workload_manager_rest_test.rb | 779 ++++ .../v1/workload_manager_test.rb | 923 +++++ .../test/helper.rb | 35 + .../google-cloud-workstations-v1/.gitignore | 20 + .../.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 | 15 + .../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 | 2620 +++++++++++++ .../v1/workstations/credentials.rb | 47 + .../v1/workstations/operations.rb | 843 +++++ .../workstations/v1/workstations/paths.rb | 113 + .../workstations/v1/workstations/rest.rb | 54 + .../v1/workstations/rest/client.rb | 2445 ++++++++++++ .../v1/workstations/rest/operations.rb | 927 +++++ .../v1/workstations/rest/service_stub.rb | 1310 +++++++ .../cloud/workstations/v1/workstations_pb.rb | 85 + .../v1/workstations_services_pb.rb | 88 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workstations/v1/workstations.rb | 1678 +++++++++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + ...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 | 1225 ++++++ .../workstations/v1/workstations_test.rb | 1451 ++++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.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 | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../google-cloud-workstations-v1beta/Rakefile | 169 + .../gapic_metadata.json | 123 + .../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 | 2728 ++++++++++++++ .../v1beta/workstations/credentials.rb | 47 + .../v1beta/workstations/operations.rb | 843 +++++ .../workstations/v1beta/workstations/paths.rb | 113 + .../workstations/v1beta/workstations/rest.rb | 54 + .../v1beta/workstations/rest/client.rb | 2546 +++++++++++++ .../v1beta/workstations/rest/operations.rb | 927 +++++ .../v1beta/workstations/rest/service_stub.rb | 1372 +++++++ .../workstations/v1beta/workstations_pb.rb | 92 + .../v1beta/workstations_services_pb.rb | 92 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workstations/v1beta/workstations.rb | 1874 ++++++++++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + ...data_google.cloud.workstations.v1beta.json | 855 +++++ .../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 + .../snippets/workstations/push_credentials.rb | 54 + .../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 | 1280 +++++++ .../workstations/v1beta/workstations_test.rb | 1516 ++++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 38 + ...-developers-developer_knowledge-v1.gemspec | 28 + ...oogle-developers-developer_knowledge-v1.rb | 21 + .../developers/developer_knowledge/v1.rb | 45 + .../v1/developer_knowledge.rb | 70 + .../v1/developer_knowledge/client.rb | 847 +++++ .../v1/developer_knowledge/credentials.rb | 47 + .../v1/developer_knowledge/paths.rb | 47 + .../v1/developer_knowledge/rest.rb | 67 + .../v1/developer_knowledge/rest/client.rb | 800 ++++ .../developer_knowledge/rest/service_stub.rb | 320 ++ .../developers/developer_knowledge/v1/rest.rb | 37 + .../developer_knowledge/v1/version.rb | 28 + .../knowledge/v1/developerknowledge_pb.rb | 41 + .../v1/developerknowledge_services_pb.rb | 77 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../knowledge/v1/developerknowledge.rb | 371 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../snippets/Gemfile | 32 + .../developer_knowledge/answer_query.rb | 47 + .../batch_get_documents.rb | 47 + .../developer_knowledge/get_document.rb | 47 + .../search_document_chunks.rb | 51 + ...tadata_google.developers.knowledge.v1.json | 175 + .../v1/developer_knowledge_paths_test.rb | 55 + .../v1/developer_knowledge_rest_test.rb | 320 ++ .../v1/developer_knowledge_test.rb | 351 ++ .../test/helper.rb | 35 + .../google-iam-credentials-v1/.gitignore | 20 + .../.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 | 15 + .../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 | 33 + .../iam/credentials/v1/iam_credentials.rb | 63 + .../credentials/v1/iam_credentials/client.rb | 856 +++++ .../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 | 785 ++++ .../v1/iam_credentials/rest/service_stub.rb | 329 ++ .../iam/credentials/v1/iamcredentials_pb.rb | 24 + .../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 | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/iam/credentials/v1/common.rb | 186 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../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 | 35 + owl-bot-staging/google-iam-v2/.gitignore | 20 + .../google-iam-v2/.repo-metadata.json | 17 + owl-bot-staging/google-iam-v2/.rubocop.yml | 33 + owl-bot-staging/google-iam-v2/.toys.rb | 28 + owl-bot-staging/google-iam-v2/.yardopts | 12 + .../google-iam-v2/AUTHENTICATION.md | 122 + owl-bot-staging/google-iam-v2/CHANGELOG.md | 2 + owl-bot-staging/google-iam-v2/Gemfile | 15 + owl-bot-staging/google-iam-v2/LICENSE.md | 201 + owl-bot-staging/google-iam-v2/README.md | 154 + owl-bot-staging/google-iam-v2/Rakefile | 169 + .../google-iam-v2/gapic_metadata.json | 43 + .../google-iam-v2/google-iam-v2.gemspec | 28 + .../google-iam-v2/lib/google-iam-v2.rb | 21 + .../google-iam-v2/lib/google/iam/v2.rb | 43 + .../lib/google/iam/v2/deny_pb.rb | 21 + .../lib/google/iam/v2/policies.rb | 53 + .../lib/google/iam/v2/policies/client.rb | 989 +++++ .../lib/google/iam/v2/policies/credentials.rb | 45 + .../lib/google/iam/v2/policies/operations.rb | 841 +++++ .../lib/google/iam/v2/policies/rest.rb | 50 + .../lib/google/iam/v2/policies/rest/client.rb | 911 +++++ .../google/iam/v2/policies/rest/operations.rb | 925 +++++ .../iam/v2/policies/rest/service_stub.rb | 386 ++ .../lib/google/iam/v2/policy_pb.rb | 34 + .../lib/google/iam/v2/policy_services_pb.rb | 65 + .../google-iam-v2/lib/google/iam/v2/rest.rb | 35 + .../lib/google/iam/v2/version.rb | 26 + .../google-iam-v2/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/iam/v2/deny.rb | 110 + .../proto_docs/google/iam/v2/policy.rb | 241 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-iam-v2/snippets/Gemfile | 32 + .../snippets/policies/create_policy.rb | 54 + .../snippets/policies/delete_policy.rb | 54 + .../snippets/policies/get_policy.rb | 47 + .../snippets/policies/list_policies.rb | 51 + .../snippets/policies/update_policy.rb | 54 + .../snippet_metadata_google.iam.v2.json | 215 ++ .../google/iam/v2/policies_operations_test.rb | 400 ++ .../test/google/iam/v2/policies_rest_test.rb | 374 ++ .../test/google/iam/v2/policies_test.rb | 438 +++ owl-bot-staging/google-iam-v2/test/helper.rb | 35 + owl-bot-staging/google-iam-v3/.gitignore | 20 + .../google-iam-v3/.repo-metadata.json | 17 + owl-bot-staging/google-iam-v3/.rubocop.yml | 33 + owl-bot-staging/google-iam-v3/.toys.rb | 28 + owl-bot-staging/google-iam-v3/.yardopts | 12 + .../google-iam-v3/AUTHENTICATION.md | 122 + owl-bot-staging/google-iam-v3/CHANGELOG.md | 2 + owl-bot-staging/google-iam-v3/Gemfile | 15 + owl-bot-staging/google-iam-v3/LICENSE.md | 201 + owl-bot-staging/google-iam-v3/README.md | 154 + owl-bot-staging/google-iam-v3/Rakefile | 169 + .../google-iam-v3/gapic_metadata.json | 126 + .../google-iam-v3/google-iam-v3.gemspec | 29 + .../google-iam-v3/lib/google-iam-v3.rb | 21 + .../google-iam-v3/lib/google/iam/v3.rb | 45 + .../lib/google/iam/v3/access_policies.rb | 54 + .../google/iam/v3/access_policies/client.rb | 1113 ++++++ .../iam/v3/access_policies/credentials.rb | 45 + .../iam/v3/access_policies/operations.rb | 841 +++++ .../google/iam/v3/access_policies/paths.rb | 140 + .../lib/google/iam/v3/access_policies/rest.rb | 51 + .../iam/v3/access_policies/rest/client.rb | 1028 +++++ .../iam/v3/access_policies/rest/operations.rb | 939 +++++ .../v3/access_policies/rest/service_stub.rb | 535 +++ .../iam/v3/access_policies_service_pb.rb | 36 + .../v3/access_policies_service_services_pb.rb | 54 + .../iam/v3/access_policy_resources_pb.rb | 29 + .../google/iam/v3/operation_metadata_pb.rb | 22 + .../iam/v3/policy_binding_resources_pb.rb | 27 + .../lib/google/iam/v3/policy_bindings.rb | 55 + .../google/iam/v3/policy_bindings/client.rb | 1157 ++++++ .../iam/v3/policy_bindings/credentials.rb | 45 + .../iam/v3/policy_bindings/operations.rb | 841 +++++ .../google/iam/v3/policy_bindings/paths.rb | 140 + .../lib/google/iam/v3/policy_bindings/rest.rb | 52 + .../iam/v3/policy_bindings/rest/client.rb | 1072 ++++++ .../iam/v3/policy_bindings/rest/operations.rb | 939 +++++ .../v3/policy_bindings/rest/service_stub.rb | 535 +++ .../iam/v3/policy_bindings_service_pb.rb | 36 + .../v3/policy_bindings_service_services_pb.rb | 61 + .../v3/principal_access_boundary_policies.rb | 55 + .../client.rb | 1102 ++++++ .../credentials.rb | 45 + .../operations.rb | 841 +++++ .../paths.rb | 67 + .../rest.rb | 52 + .../rest/client.rb | 1017 +++++ .../rest/operations.rb | 939 +++++ .../rest/service_stub.rb | 447 +++ ...pal_access_boundary_policies_service_pb.rb | 37 + ...s_boundary_policies_service_services_pb.rb | 56 + ...pal_access_boundary_policy_resources_pb.rb | 27 + .../google-iam-v3/lib/google/iam/v3/rest.rb | 37 + .../lib/google/iam/v3/version.rb | 26 + .../google-iam-v3/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/iam/v3/access_policies_service.rb | 203 + .../google/iam/v3/access_policy_resources.rb | 223 ++ .../google/iam/v3/operation_metadata.rb | 55 + .../google/iam/v3/policy_binding_resources.rb | 193 + .../google/iam/v3/policy_bindings_service.rb | 243 ++ ...ncipal_access_boundary_policies_service.rb | 191 + ...ncipal_access_boundary_policy_resources.rb | 127 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-iam-v3/snippets/Gemfile | 32 + .../access_policies/create_access_policy.rb | 54 + .../access_policies/delete_access_policy.rb | 54 + .../access_policies/get_access_policy.rb | 47 + .../access_policies/list_access_policies.rb | 51 + .../search_access_policy_bindings.rb | 51 + .../access_policies/update_access_policy.rb | 54 + .../policy_bindings/create_policy_binding.rb | 54 + .../policy_bindings/delete_policy_binding.rb | 54 + .../policy_bindings/get_policy_binding.rb | 47 + .../policy_bindings/list_policy_bindings.rb | 51 + .../search_target_policy_bindings.rb | 51 + .../policy_bindings/update_policy_binding.rb | 54 + ...create_principal_access_boundary_policy.rb | 54 + ...delete_principal_access_boundary_policy.rb | 54 + .../get_principal_access_boundary_policy.rb | 47 + ...list_principal_access_boundary_policies.rb | 51 + ...incipal_access_boundary_policy_bindings.rb | 51 + ...update_principal_access_boundary_policy.rb | 54 + .../snippet_metadata_google.iam.v3.json | 735 ++++ .../iam/v3/access_policies_operations_test.rb | 400 ++ .../iam/v3/access_policies_paths_test.rb | 97 + .../iam/v3/access_policies_rest_test.rb | 434 +++ .../google/iam/v3/access_policies_test.rb | 513 +++ .../iam/v3/policy_bindings_operations_test.rb | 400 ++ .../iam/v3/policy_bindings_paths_test.rb | 97 + .../iam/v3/policy_bindings_rest_test.rb | 437 +++ .../google/iam/v3/policy_bindings_test.rb | 519 +++ ...ccess_boundary_policies_operations_test.rb | 400 ++ ...pal_access_boundary_policies_paths_test.rb | 67 + ...ipal_access_boundary_policies_rest_test.rb | 435 +++ ...principal_access_boundary_policies_test.rb | 515 +++ owl-bot-staging/google-iam-v3/test/helper.rb | 35 + owl-bot-staging/google-iam-v3beta/.gitignore | 20 + .../google-iam-v3beta/.repo-metadata.json | 17 + .../google-iam-v3beta/.rubocop.yml | 33 + owl-bot-staging/google-iam-v3beta/.toys.rb | 28 + owl-bot-staging/google-iam-v3beta/.yardopts | 12 + .../google-iam-v3beta/AUTHENTICATION.md | 122 + .../google-iam-v3beta/CHANGELOG.md | 2 + owl-bot-staging/google-iam-v3beta/Gemfile | 15 + owl-bot-staging/google-iam-v3beta/LICENSE.md | 201 + owl-bot-staging/google-iam-v3beta/README.md | 154 + owl-bot-staging/google-iam-v3beta/Rakefile | 169 + .../google-iam-v3beta/gapic_metadata.json | 126 + .../google-iam-v3beta.gemspec | 29 + .../lib/google-iam-v3beta.rb | 21 + .../lib/google/iam/v3beta.rb | 45 + .../lib/google/iam/v3beta/access_policies.rb | 54 + .../iam/v3beta/access_policies/client.rb | 1113 ++++++ .../iam/v3beta/access_policies/credentials.rb | 45 + .../iam/v3beta/access_policies/operations.rb | 841 +++++ .../iam/v3beta/access_policies/paths.rb | 140 + .../google/iam/v3beta/access_policies/rest.rb | 51 + .../iam/v3beta/access_policies/rest/client.rb | 1028 +++++ .../v3beta/access_policies/rest/operations.rb | 939 +++++ .../access_policies/rest/service_stub.rb | 535 +++ .../iam/v3beta/access_policies_service_pb.rb | 36 + .../access_policies_service_services_pb.rb | 54 + .../iam/v3beta/access_policy_resources_pb.rb | 29 + .../iam/v3beta/operation_metadata_pb.rb | 22 + .../iam/v3beta/policy_binding_resources_pb.rb | 27 + .../lib/google/iam/v3beta/policy_bindings.rb | 55 + .../iam/v3beta/policy_bindings/client.rb | 1157 ++++++ .../iam/v3beta/policy_bindings/credentials.rb | 45 + .../iam/v3beta/policy_bindings/operations.rb | 841 +++++ .../iam/v3beta/policy_bindings/paths.rb | 140 + .../google/iam/v3beta/policy_bindings/rest.rb | 52 + .../iam/v3beta/policy_bindings/rest/client.rb | 1072 ++++++ .../v3beta/policy_bindings/rest/operations.rb | 939 +++++ .../policy_bindings/rest/service_stub.rb | 535 +++ .../iam/v3beta/policy_bindings_service_pb.rb | 36 + .../policy_bindings_service_services_pb.rb | 61 + .../principal_access_boundary_policies.rb | 55 + .../client.rb | 1102 ++++++ .../credentials.rb | 45 + .../operations.rb | 841 +++++ .../paths.rb | 67 + .../rest.rb | 52 + .../rest/client.rb | 1017 +++++ .../rest/operations.rb | 939 +++++ .../rest/service_stub.rb | 447 +++ ...pal_access_boundary_policies_service_pb.rb | 37 + ...s_boundary_policies_service_services_pb.rb | 56 + ...pal_access_boundary_policy_resources_pb.rb | 27 + .../lib/google/iam/v3beta/rest.rb | 37 + .../lib/google/iam/v3beta/version.rb | 26 + .../google-iam-v3beta/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../iam/v3beta/access_policies_service.rb | 203 + .../iam/v3beta/access_policy_resources.rb | 223 ++ .../google/iam/v3beta/operation_metadata.rb | 55 + .../iam/v3beta/policy_binding_resources.rb | 193 + .../iam/v3beta/policy_bindings_service.rb | 243 ++ ...ncipal_access_boundary_policies_service.rb | 191 + ...ncipal_access_boundary_policy_resources.rb | 127 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-iam-v3beta/snippets/Gemfile | 32 + .../access_policies/create_access_policy.rb | 54 + .../access_policies/delete_access_policy.rb | 54 + .../access_policies/get_access_policy.rb | 47 + .../access_policies/list_access_policies.rb | 51 + .../search_access_policy_bindings.rb | 51 + .../access_policies/update_access_policy.rb | 54 + .../policy_bindings/create_policy_binding.rb | 54 + .../policy_bindings/delete_policy_binding.rb | 54 + .../policy_bindings/get_policy_binding.rb | 47 + .../policy_bindings/list_policy_bindings.rb | 51 + .../search_target_policy_bindings.rb | 51 + .../policy_bindings/update_policy_binding.rb | 54 + ...create_principal_access_boundary_policy.rb | 54 + ...delete_principal_access_boundary_policy.rb | 54 + .../get_principal_access_boundary_policy.rb | 47 + ...list_principal_access_boundary_policies.rb | 51 + ...incipal_access_boundary_policy_bindings.rb | 51 + ...update_principal_access_boundary_policy.rb | 54 + .../snippet_metadata_google.iam.v3beta.json | 735 ++++ .../v3beta/access_policies_operations_test.rb | 400 ++ .../iam/v3beta/access_policies_paths_test.rb | 97 + .../iam/v3beta/access_policies_rest_test.rb | 434 +++ .../google/iam/v3beta/access_policies_test.rb | 513 +++ .../v3beta/policy_bindings_operations_test.rb | 400 ++ .../iam/v3beta/policy_bindings_paths_test.rb | 97 + .../iam/v3beta/policy_bindings_rest_test.rb | 437 +++ .../google/iam/v3beta/policy_bindings_test.rb | 519 +++ ...ccess_boundary_policies_operations_test.rb | 400 ++ ...pal_access_boundary_policies_paths_test.rb | 67 + ...ipal_access_boundary_policies_rest_test.rb | 435 +++ ...principal_access_boundary_policies_test.rb | 515 +++ .../google-iam-v3beta/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 148 + ...identity-access_context_manager-v1.gemspec | 29 + ...ogle-identity-access_context_manager-v1.rb | 21 + .../identity/access_context_manager/v1.rb | 45 + .../v1/access_context_manager.rb | 66 + .../v1/access_context_manager/client.rb | 3299 +++++++++++++++++ .../v1/access_context_manager/credentials.rb | 47 + .../v1/access_context_manager/operations.rb | 843 +++++ .../v1/access_context_manager/paths.rb | 112 + .../v1/access_context_manager/rest.rb | 63 + .../v1/access_context_manager/rest/client.rb | 3090 +++++++++++++++ .../access_context_manager/rest/operations.rb | 927 +++++ .../rest/service_stub.rb | 1693 +++++++++ .../access_context_manager/v1/rest.rb | 37 + .../access_context_manager/v1/version.rb | 28 + .../type/device_resources_pb.rb | 23 + .../v1/access_context_manager_pb.rb | 65 + .../v1/access_context_manager_services_pb.rb | 240 ++ .../v1/access_level_pb.rb | 32 + .../v1/access_policy_pb.rb | 24 + .../v1/gcp_user_access_binding_pb.rb | 24 + .../v1/service_perimeter_pb.rb | 37 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 +++ .../type/device_resources.rb | 84 + .../v1/access_context_manager.rb | 539 +++ .../accesscontextmanager/v1/access_level.rb | 201 + .../accesscontextmanager/v1/access_policy.rb | 76 + .../v1/gcp_user_access_binding.rb | 55 + .../v1/service_perimeter.rb | 500 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../commit_service_perimeters.rb | 54 + .../create_access_level.rb | 54 + .../create_access_policy.rb | 54 + .../create_gcp_user_access_binding.rb | 54 + .../create_service_perimeter.rb | 54 + .../delete_access_level.rb | 54 + .../delete_access_policy.rb | 54 + .../delete_gcp_user_access_binding.rb | 54 + .../delete_service_perimeter.rb | 54 + .../get_access_level.rb | 47 + .../get_access_policy.rb | 47 + .../get_gcp_user_access_binding.rb | 47 + .../access_context_manager/get_iam_policy.rb | 47 + .../get_service_perimeter.rb | 47 + .../list_access_levels.rb | 51 + .../list_access_policies.rb | 51 + .../list_gcp_user_access_bindings.rb | 51 + .../list_service_perimeters.rb | 51 + .../replace_access_levels.rb | 54 + .../replace_service_perimeters.rb | 54 + .../access_context_manager/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_access_level.rb | 54 + .../update_access_policy.rb | 54 + .../update_gcp_user_access_binding.rb | 54 + .../update_service_perimeter.rb | 54 + ...ogle.identity.accesscontextmanager.v1.json | 1055 ++++++ .../access_context_manager_operations_test.rb | 400 ++ .../v1/access_context_manager_paths_test.rb | 103 + .../v1/access_context_manager_rest_test.rb | 1535 ++++++++ .../v1/access_context_manager_test.rb | 1785 +++++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 78 + ...ogle-maps-fleet_engine-delivery-v1.gemspec | 29 + .../google-maps-fleet_engine-delivery-v1.rb | 21 + .../google/maps/fleet_engine/delivery/v1.rb | 47 + .../delivery/v1/delivery_service.rb | 57 + .../delivery/v1/delivery_service/client.rb | 1757 +++++++++ .../v1/delivery_service/credentials.rb | 49 + .../delivery/v1/delivery_service/paths.rb | 100 + .../delivery/v1/delivery_service/rest.rb | 54 + .../v1/delivery_service/rest/client.rb | 1618 ++++++++ .../v1/delivery_service/rest/service_stub.rb | 820 ++++ .../maps/fleet_engine/delivery/v1/rest.rb | 39 + .../maps/fleet_engine/delivery/v1/version.rb | 30 + .../maps/fleetengine/delivery/v1/common_pb.rb | 33 + .../delivery/v1/delivery_api_pb.rb | 50 + .../delivery/v1/delivery_api_services_pb.rb | 81 + .../delivery/v1/delivery_vehicles_pb.rb | 36 + .../maps/fleetengine/delivery/v1/header_pb.rb | 27 + .../delivery/v1/task_tracking_info_pb.rb | 32 + .../maps/fleetengine/delivery/v1/tasks_pb.rb | 37 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../proto_docs/google/geo/type/viewport.rb | 70 + .../maps/fleetengine/delivery/v1/common.rb | 276 ++ .../fleetengine/delivery/v1/delivery_api.rb | 395 ++ .../delivery/v1/delivery_vehicles.rb | 276 ++ .../maps/fleetengine/delivery/v1/header.rb | 113 + .../delivery/v1/task_tracking_info.rb | 91 + .../maps/fleetengine/delivery/v1/tasks.rb | 291 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/type/latlng.rb | 38 + .../snippets/Gemfile | 32 + .../delivery_service/batch_create_tasks.rb | 47 + .../create_delivery_vehicle.rb | 47 + .../snippets/delivery_service/create_task.rb | 47 + .../delete_delivery_vehicle.rb | 47 + .../snippets/delivery_service/delete_task.rb | 47 + .../delivery_service/get_delivery_vehicle.rb | 47 + .../snippets/delivery_service/get_task.rb | 47 + .../get_task_tracking_info.rb | 47 + .../list_delivery_vehicles.rb | 51 + .../snippets/delivery_service/list_tasks.rb | 51 + .../update_delivery_vehicle.rb | 47 + .../snippets/delivery_service/update_task.rb | 47 + ...metadata_maps.fleetengine.delivery.v1.json | 495 +++ .../v1/delivery_service_paths_test.rb | 91 + .../delivery/v1/delivery_service_rest_test.rb | 773 ++++ .../delivery/v1/delivery_service_test.rb | 862 +++++ .../test/helper.rb | 35 + .../google-maps-fleet_engine-v1/.gitignore | 20 + .../.repo-metadata.json | 17 + .../google-maps-fleet_engine-v1/.rubocop.yml | 33 + .../google-maps-fleet_engine-v1/.toys.rb | 28 + .../google-maps-fleet_engine-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-maps-fleet_engine-v1/CHANGELOG.md | 2 + .../google-maps-fleet_engine-v1/Gemfile | 15 + .../google-maps-fleet_engine-v1/LICENSE.md | 201 + .../google-maps-fleet_engine-v1/README.md | 154 + .../google-maps-fleet_engine-v1/Rakefile | 169 + .../gapic_metadata.json | 92 + .../google-maps-fleet_engine-v1.gemspec | 29 + .../lib/google-maps-fleet_engine-v1.rb | 21 + .../lib/google/maps/fleet_engine/v1.rb | 46 + .../lib/google/maps/fleet_engine/v1/rest.rb | 38 + .../maps/fleet_engine/v1/trip_service.rb | 55 + .../fleet_engine/v1/trip_service/client.rb | 1153 ++++++ .../v1/trip_service/credentials.rb | 47 + .../fleet_engine/v1/trip_service/paths.rb | 50 + .../maps/fleet_engine/v1/trip_service/rest.rb | 52 + .../v1/trip_service/rest/client.rb | 1062 ++++++ .../v1/trip_service/rest/service_stub.rb | 451 +++ .../maps/fleet_engine/v1/vehicle_service.rb | 55 + .../fleet_engine/v1/vehicle_service/client.rb | 1463 ++++++++ .../v1/vehicle_service/credentials.rb | 47 + .../fleet_engine/v1/vehicle_service/paths.rb | 50 + .../fleet_engine/v1/vehicle_service/rest.rb | 52 + .../v1/vehicle_service/rest/client.rb | 1364 +++++++ .../v1/vehicle_service/rest/service_stub.rb | 512 +++ .../google/maps/fleet_engine/v1/version.rb | 28 + .../maps/fleetengine/v1/fleetengine_pb.rb | 39 + .../google/maps/fleetengine/v1/header_pb.rb | 25 + .../google/maps/fleetengine/v1/traffic_pb.rb | 23 + .../google/maps/fleetengine/v1/trip_api_pb.rb | 41 + .../fleetengine/v1/trip_api_services_pb.rb | 58 + .../google/maps/fleetengine/v1/trips_pb.rb | 34 + .../maps/fleetengine/v1/vehicle_api_pb.rb | 52 + .../fleetengine/v1/vehicle_api_services_pb.rb | 108 + .../google/maps/fleetengine/v1/vehicles_pb.rb | 40 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../proto_docs/google/geo/type/viewport.rb | 70 + .../google/maps/fleetengine/v1/fleetengine.rb | 394 ++ .../google/maps/fleetengine/v1/header.rb | 111 + .../google/maps/fleetengine/v1/traffic.rb | 76 + .../google/maps/fleetengine/v1/trip_api.rb | 312 ++ .../google/maps/fleetengine/v1/trips.rb | 289 ++ .../google/maps/fleetengine/v1/vehicle_api.rb | 674 ++++ .../google/maps/fleetengine/v1/vehicles.rb | 365 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/type/latlng.rb | 38 + .../snippets/Gemfile | 32 + .../snippet_metadata_maps.fleetengine.v1.json | 535 +++ .../snippets/trip_service/create_trip.rb | 47 + .../snippets/trip_service/delete_trip.rb | 47 + .../snippets/trip_service/get_trip.rb | 47 + .../trip_service/report_billable_trip.rb | 47 + .../snippets/trip_service/search_trips.rb | 51 + .../snippets/trip_service/update_trip.rb | 47 + .../vehicle_service/create_vehicle.rb | 47 + .../vehicle_service/delete_vehicle.rb | 47 + .../snippets/vehicle_service/get_vehicle.rb | 47 + .../snippets/vehicle_service/list_vehicles.rb | 51 + .../vehicle_service/search_vehicles.rb | 47 + .../vehicle_service/update_vehicle.rb | 47 + .../update_vehicle_attributes.rb | 47 + .../v1/trip_service_paths_test.rb | 55 + .../fleet_engine/v1/trip_service_rest_test.rb | 447 +++ .../maps/fleet_engine/v1/trip_service_test.rb | 505 +++ .../v1/vehicle_service_paths_test.rb | 55 + .../v1/vehicle_service_rest_test.rb | 520 +++ .../fleet_engine/v1/vehicle_service_test.rb | 601 +++ .../test/helper.rb | 35 + .../google-shopping-css-v1/.gitignore | 20 + .../.repo-metadata.json | 17 + .../google-shopping-css-v1/.rubocop.yml | 33 + .../google-shopping-css-v1/.toys.rb | 28 + .../google-shopping-css-v1/.yardopts | 12 + .../google-shopping-css-v1/AUTHENTICATION.md | 122 + .../google-shopping-css-v1/CHANGELOG.md | 2 + .../google-shopping-css-v1/Gemfile | 15 + .../google-shopping-css-v1/LICENSE.md | 201 + .../google-shopping-css-v1/README.md | 154 + .../google-shopping-css-v1/Rakefile | 169 + .../gapic_metadata.json | 119 + .../google-shopping-css-v1.gemspec | 29 + .../lib/google-shopping-css-v1.rb | 21 + .../lib/google/shopping/css/v1.rb | 49 + .../shopping/css/v1/account_labels_service.rb | 55 + .../css/v1/account_labels_service/client.rb | 785 ++++ .../v1/account_labels_service/credentials.rb | 47 + .../css/v1/account_labels_service/paths.rb | 64 + .../css/v1/account_labels_service/rest.rb | 52 + .../v1/account_labels_service/rest/client.rb | 714 ++++ .../rest/service_stub.rb | 327 ++ .../shopping/css/v1/accounts_labels_pb.rb | 33 + .../css/v1/accounts_labels_services_pb.rb | 51 + .../lib/google/shopping/css/v1/accounts_pb.rb | 31 + .../shopping/css/v1/accounts_service.rb | 55 + .../css/v1/accounts_service/client.rb | 709 ++++ .../css/v1/accounts_service/credentials.rb | 47 + .../shopping/css/v1/accounts_service/paths.rb | 47 + .../shopping/css/v1/accounts_service/rest.rb | 52 + .../css/v1/accounts_service/rest/client.rb | 645 ++++ .../v1/accounts_service/rest/service_stub.rb | 265 ++ .../shopping/css/v1/accounts_services_pb.rb | 50 + .../shopping/css/v1/css_product_common_pb.rb | 35 + .../shopping/css/v1/css_product_inputs_pb.rb | 34 + .../css/v1/css_product_inputs_service.rb | 56 + .../v1/css_product_inputs_service/client.rb | 716 ++++ .../css_product_inputs_service/credentials.rb | 47 + .../v1/css_product_inputs_service/paths.rb | 64 + .../css/v1/css_product_inputs_service/rest.rb | 53 + .../css_product_inputs_service/rest/client.rb | 652 ++++ .../rest/service_stub.rb | 266 ++ .../css/v1/css_product_inputs_services_pb.rb | 61 + .../google/shopping/css/v1/css_products_pb.rb | 31 + .../shopping/css/v1/css_products_service.rb | 56 + .../css/v1/css_products_service/client.rb | 606 +++ .../v1/css_products_service/credentials.rb | 47 + .../css/v1/css_products_service/paths.rb | 64 + .../css/v1/css_products_service/rest.rb | 53 + .../v1/css_products_service/rest/client.rb | 549 +++ .../css_products_service/rest/service_stub.rb | 203 + .../css/v1/css_products_services_pb.rb | 56 + .../lib/google/shopping/css/v1/quota_pb.rb | 29 + .../google/shopping/css/v1/quota_service.rb | 55 + .../shopping/css/v1/quota_service/client.rb | 495 +++ .../css/v1/quota_service/credentials.rb | 47 + .../shopping/css/v1/quota_service/paths.rb | 47 + .../shopping/css/v1/quota_service/rest.rb | 52 + .../css/v1/quota_service/rest/client.rb | 445 +++ .../css/v1/quota_service/rest/service_stub.rb | 142 + .../shopping/css/v1/quota_services_pb.rb | 45 + .../lib/google/shopping/css/v1/rest.rb | 41 + .../lib/google/shopping/css/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../google/shopping/css/v1/accounts.rb | 171 + .../google/shopping/css/v1/accounts_labels.rb | 131 + .../shopping/css/v1/css_product_common.rb | 436 +++ .../shopping/css/v1/css_product_inputs.rb | 169 + .../google/shopping/css/v1/css_products.rb | 110 + .../google/shopping/css/v1/quota.rb | 110 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../google-shopping-css-v1/snippets/Gemfile | 32 + .../create_account_label.rb | 47 + .../delete_account_label.rb | 47 + .../list_account_labels.rb | 51 + .../update_account_label.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_child_accounts.rb | 51 + .../accounts_service/update_labels.rb | 47 + .../delete_css_product_input.rb | 47 + .../insert_css_product_input.rb | 47 + .../update_css_product_input.rb | 47 + .../css_products_service/get_css_product.rb | 47 + .../css_products_service/list_css_products.rb | 51 + .../quota_service/list_quota_groups.rb | 51 + ...ippet_metadata_google.shopping.css.v1.json | 535 +++ .../v1/account_labels_service_paths_test.rb | 67 + .../v1/account_labels_service_rest_test.rb | 318 ++ .../css/v1/account_labels_service_test.rb | 347 ++ .../css/v1/accounts_service_paths_test.rb | 55 + .../css/v1/accounts_service_rest_test.rb | 268 ++ .../shopping/css/v1/accounts_service_test.rb | 301 ++ .../css_product_inputs_service_paths_test.rb | 67 + .../css_product_inputs_service_rest_test.rb | 265 ++ .../css/v1/css_product_inputs_service_test.rb | 287 ++ .../css/v1/css_products_service_paths_test.rb | 67 + .../css/v1/css_products_service_rest_test.rb | 209 ++ .../css/v1/css_products_service_test.rb | 229 ++ .../css/v1/quota_service_paths_test.rb | 55 + .../css/v1/quota_service_rest_test.rb | 155 + .../shopping/css/v1/quota_service_test.rb | 171 + .../google-shopping-css-v1/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 504 +++ ...-shopping-merchant-accounts-v1beta.gemspec | 29 + ...oogle-shopping-merchant-accounts-v1beta.rb | 21 + .../shopping/merchant/accounts/v1beta.rb | 66 + .../accounts/v1beta/accessright_pb.rb | 23 + .../accounts/v1beta/account_issue_service.rb | 57 + .../v1beta/account_issue_service/client.rb | 509 +++ .../account_issue_service/credentials.rb | 49 + .../v1beta/account_issue_service/paths.rb | 49 + .../v1beta/account_issue_service/rest.rb | 54 + .../account_issue_service/rest/client.rb | 459 +++ .../rest/service_stub.rb | 144 + .../accounts/v1beta/account_tax_pb.rb | 34 + .../accounts/v1beta/account_tax_service.rb | 61 + .../v1beta/account_tax_service/client.rb | 688 ++++ .../v1beta/account_tax_service/credentials.rb | 49 + .../v1beta/account_tax_service/paths.rb | 66 + .../v1beta/account_tax_service/rest.rb | 58 + .../v1beta/account_tax_service/rest/client.rb | 624 ++++ .../account_tax_service/rest/service_stub.rb | 267 ++ .../v1beta/account_tax_services_pb.rb | 58 + .../accounts/v1beta/accountissue_pb.rb | 34 + .../v1beta/accountissue_services_pb.rb | 47 + .../merchant/accounts/v1beta/accounts_pb.rb | 43 + .../accounts/v1beta/accounts_service.rb | 57 + .../v1beta/accounts_service/client.rb | 1000 +++++ .../v1beta/accounts_service/credentials.rb | 49 + .../accounts/v1beta/accounts_service/paths.rb | 80 + .../accounts/v1beta/accounts_service/rest.rb | 54 + .../v1beta/accounts_service/rest/client.rb | 931 +++++ .../accounts_service/rest/service_stub.rb | 447 +++ .../accounts/v1beta/accounts_services_pb.rb | 75 + .../accounts/v1beta/accountservices_pb.rb | 28 + .../v1beta/autofeed_settings_service.rb | 58 + .../autofeed_settings_service/client.rb | 579 +++ .../autofeed_settings_service/credentials.rb | 49 + .../v1beta/autofeed_settings_service/paths.rb | 49 + .../v1beta/autofeed_settings_service/rest.rb | 55 + .../autofeed_settings_service/rest/client.rb | 522 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/autofeedsettings_pb.rb | 31 + .../v1beta/autofeedsettings_services_pb.rb | 50 + .../v1beta/automatic_improvements_service.rb | 59 + .../automatic_improvements_service/client.rb | 589 +++ .../credentials.rb | 49 + .../automatic_improvements_service/paths.rb | 49 + .../automatic_improvements_service/rest.rb | 56 + .../rest/client.rb | 532 +++ .../rest/service_stub.rb | 206 + .../v1beta/automaticimprovements_pb.rb | 36 + .../automaticimprovements_services_pb.rb | 51 + .../v1beta/business_identity_service.rb | 58 + .../business_identity_service/client.rb | 580 +++ .../business_identity_service/credentials.rb | 49 + .../v1beta/business_identity_service/paths.rb | 49 + .../v1beta/business_identity_service/rest.rb | 55 + .../business_identity_service/rest/client.rb | 523 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/business_info_service.rb | 57 + .../v1beta/business_info_service/client.rb | 579 +++ .../business_info_service/credentials.rb | 49 + .../v1beta/business_info_service/paths.rb | 49 + .../v1beta/business_info_service/rest.rb | 54 + .../business_info_service/rest/client.rb | 522 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/businessidentity_pb.rb | 34 + .../v1beta/businessidentity_services_pb.rb | 51 + .../accounts/v1beta/businessinfo_pb.rb | 35 + .../v1beta/businessinfo_services_pb.rb | 50 + .../v1beta/checkout_settings_service.rb | 58 + .../checkout_settings_service/client.rb | 776 ++++ .../checkout_settings_service/credentials.rb | 49 + .../v1beta/checkout_settings_service/paths.rb | 69 + .../v1beta/checkout_settings_service/rest.rb | 55 + .../checkout_settings_service/rest/client.rb | 705 ++++ .../rest/service_stub.rb | 329 ++ .../accounts/v1beta/checkoutsettings_pb.rb | 38 + .../v1beta/checkoutsettings_services_pb.rb | 56 + .../accounts/v1beta/customerservice_pb.rb | 26 + .../v1beta/email_preferences_service.rb | 60 + .../email_preferences_service/client.rb | 594 +++ .../email_preferences_service/credentials.rb | 49 + .../v1beta/email_preferences_service/paths.rb | 52 + .../v1beta/email_preferences_service/rest.rb | 57 + .../email_preferences_service/rest/client.rb | 537 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/emailpreferences_pb.rb | 32 + .../v1beta/emailpreferences_services_pb.rb | 65 + .../accounts/v1beta/gbp_accounts_service.rb | 60 + .../v1beta/gbp_accounts_service/client.rb | 600 +++ .../gbp_accounts_service/credentials.rb | 49 + .../v1beta/gbp_accounts_service/paths.rb | 49 + .../v1beta/gbp_accounts_service/rest.rb | 57 + .../gbp_accounts_service/rest/client.rb | 543 +++ .../gbp_accounts_service/rest/service_stub.rb | 206 + .../accounts/v1beta/gbpaccounts_pb.rb | 34 + .../v1beta/gbpaccounts_services_pb.rb | 52 + .../merchant/accounts/v1beta/homepage_pb.rb | 33 + .../accounts/v1beta/homepage_service.rb | 57 + .../v1beta/homepage_service/client.rb | 777 ++++ .../v1beta/homepage_service/credentials.rb | 49 + .../accounts/v1beta/homepage_service/paths.rb | 49 + .../accounts/v1beta/homepage_service/rest.rb | 54 + .../v1beta/homepage_service/rest/client.rb | 706 ++++ .../homepage_service/rest/service_stub.rb | 330 ++ .../accounts/v1beta/homepage_services_pb.rb | 66 + .../accounts/v1beta/lfp_providers_service.rb | 59 + .../v1beta/lfp_providers_service/client.rb | 603 +++ .../lfp_providers_service/credentials.rb | 49 + .../v1beta/lfp_providers_service/paths.rb | 71 + .../v1beta/lfp_providers_service/rest.rb | 56 + .../lfp_providers_service/rest/client.rb | 546 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/lfpproviders_pb.rb | 33 + .../v1beta/lfpproviders_services_pb.rb | 51 + .../v1beta/omnichannel_settings_service.rb | 60 + .../omnichannel_settings_service/client.rb | 894 +++++ .../credentials.rb | 49 + .../omnichannel_settings_service/paths.rb | 66 + .../omnichannel_settings_service/rest.rb | 57 + .../rest/client.rb | 816 ++++ .../rest/service_stub.rb | 391 ++ .../accounts/v1beta/omnichannelsettings_pb.rb | 46 + .../v1beta/omnichannelsettings_services_pb.rb | 58 + .../v1beta/online_return_policy_pb.rb | 47 + .../v1beta/online_return_policy_service.rb | 61 + .../online_return_policy_service/client.rb | 899 +++++ .../credentials.rb | 49 + .../online_return_policy_service/paths.rb | 66 + .../online_return_policy_service/rest.rb | 58 + .../rest/client.rb | 821 ++++ .../rest/service_stub.rb | 390 ++ .../online_return_policy_services_pb.rb | 59 + .../v1beta/phoneverificationstate_pb.rb | 23 + .../merchant/accounts/v1beta/programs_pb.rb | 35 + .../accounts/v1beta/programs_service.rb | 67 + .../v1beta/programs_service/client.rb | 788 ++++ .../v1beta/programs_service/credentials.rb | 49 + .../accounts/v1beta/programs_service/paths.rb | 66 + .../accounts/v1beta/programs_service/rest.rb | 64 + .../v1beta/programs_service/rest/client.rb | 717 ++++ .../programs_service/rest/service_stub.rb | 329 ++ .../accounts/v1beta/programs_services_pb.rb | 65 + .../merchant/accounts/v1beta/regions_pb.rb | 40 + .../accounts/v1beta/regions_service.rb | 61 + .../accounts/v1beta/regions_service/client.rb | 888 +++++ .../v1beta/regions_service/credentials.rb | 49 + .../accounts/v1beta/regions_service/paths.rb | 66 + .../accounts/v1beta/regions_service/rest.rb | 58 + .../v1beta/regions_service/rest/client.rb | 810 ++++ .../regions_service/rest/service_stub.rb | 390 ++ .../accounts/v1beta/regions_services_pb.rb | 62 + .../shopping/merchant/accounts/v1beta/rest.rb | 58 + .../v1beta/shipping_settings_service.rb | 58 + .../shipping_settings_service/client.rb | 576 +++ .../shipping_settings_service/credentials.rb | 49 + .../v1beta/shipping_settings_service/paths.rb | 49 + .../v1beta/shipping_settings_service/rest.rb | 55 + .../shipping_settings_service/rest/client.rb | 519 +++ .../rest/service_stub.rb | 206 + .../accounts/v1beta/shippingsettings_pb.rb | 61 + .../v1beta/shippingsettings_services_pb.rb | 51 + .../merchant/accounts/v1beta/tax_rule_pb.rb | 27 + ...erms_of_service_agreement_state_service.rb | 57 + .../client.rb | 578 +++ .../credentials.rb | 49 + .../paths.rb | 66 + .../rest.rb | 54 + .../rest/client.rb | 521 +++ .../rest/service_stub.rb | 205 + .../v1beta/terms_of_service_service.rb | 57 + .../v1beta/terms_of_service_service/client.rb | 672 ++++ .../terms_of_service_service/credentials.rb | 49 + .../v1beta/terms_of_service_service/paths.rb | 63 + .../v1beta/terms_of_service_service/rest.rb | 54 + .../terms_of_service_service/rest/client.rb | 616 +++ .../rest/service_stub.rb | 264 ++ .../accounts/v1beta/termsofservice_pb.rb | 33 + .../v1beta/termsofservice_services_pb.rb | 52 + .../v1beta/termsofserviceagreementstate_pb.rb | 34 + ...ermsofserviceagreementstate_services_pb.rb | 49 + .../accounts/v1beta/termsofservicekind_pb.rb | 23 + .../merchant/accounts/v1beta/user_pb.rb | 38 + .../merchant/accounts/v1beta/user_service.rb | 57 + .../accounts/v1beta/user_service/client.rb | 891 +++++ .../v1beta/user_service/credentials.rb | 49 + .../accounts/v1beta/user_service/paths.rb | 66 + .../accounts/v1beta/user_service/rest.rb | 54 + .../v1beta/user_service/rest/client.rb | 813 ++++ .../v1beta/user_service/rest/service_stub.rb | 390 ++ .../accounts/v1beta/user_services_pb.rb | 58 + .../v1beta/verificationmailsettings_pb.rb | 26 + .../merchant/accounts/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../merchant/accounts/v1beta/accessright.rb | 43 + .../merchant/accounts/v1beta/account_tax.rb | 101 + .../merchant/accounts/v1beta/accountissue.rb | 142 + .../merchant/accounts/v1beta/accounts.rb | 231 ++ .../accounts/v1beta/accountservices.rb | 34 + .../accounts/v1beta/autofeedsettings.rb | 75 + .../accounts/v1beta/automaticimprovements.rb | 235 ++ .../accounts/v1beta/businessidentity.rb | 129 + .../merchant/accounts/v1beta/businessinfo.rb | 77 + .../accounts/v1beta/checkoutsettings.rb | 185 + .../accounts/v1beta/customerservice.rb | 43 + .../accounts/v1beta/emailpreferences.rb | 82 + .../merchant/accounts/v1beta/gbpaccounts.rb | 123 + .../merchant/accounts/v1beta/homepage.rb | 87 + .../merchant/accounts/v1beta/lfpproviders.rb | 108 + .../accounts/v1beta/omnichannelsettings.rb | 336 ++ .../accounts/v1beta/online_return_policy.rb | 345 ++ .../accounts/v1beta/phoneverificationstate.rb | 40 + .../merchant/accounts/v1beta/programs.rb | 160 + .../merchant/accounts/v1beta/regions.rb | 195 + .../accounts/v1beta/shippingsettings.rb | 747 ++++ .../merchant/accounts/v1beta/tax_rule.rb | 96 + .../accounts/v1beta/termsofservice.rb | 99 + .../v1beta/termsofserviceagreementstate.rb | 135 + .../accounts/v1beta/termsofservicekind.rb | 37 + .../shopping/merchant/accounts/v1beta/user.rb | 156 + .../v1beta/verificationmailsettings.rb | 53 + .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/date.rb | 56 + .../proto_docs/google/type/datetime.rb | 104 + .../proto_docs/google/type/interval.rb | 45 + .../proto_docs/google/type/phone_number.rb | 122 + .../proto_docs/google/type/postal_address.rb | 136 + .../snippets/Gemfile | 32 + .../list_account_issues.rb | 51 + .../account_tax_service/get_account_tax.rb | 47 + .../account_tax_service/list_account_tax.rb | 51 + .../account_tax_service/update_account_tax.rb | 47 + .../create_and_configure_account.rb | 47 + .../accounts_service/delete_account.rb | 47 + .../snippets/accounts_service/get_account.rb | 47 + .../accounts_service/list_accounts.rb | 51 + .../accounts_service/list_sub_accounts.rb | 51 + .../accounts_service/update_account.rb | 47 + .../get_autofeed_settings.rb | 47 + .../update_autofeed_settings.rb | 47 + .../get_automatic_improvements.rb | 47 + .../update_automatic_improvements.rb | 47 + .../get_business_identity.rb | 47 + .../update_business_identity.rb | 47 + .../get_business_info.rb | 47 + .../update_business_info.rb | 47 + .../create_checkout_settings.rb | 47 + .../delete_checkout_settings.rb | 47 + .../get_checkout_settings.rb | 47 + .../update_checkout_settings.rb | 47 + .../get_email_preferences.rb | 47 + .../update_email_preferences.rb | 47 + .../gbp_accounts_service/link_gbp_account.rb | 47 + .../gbp_accounts_service/list_gbp_accounts.rb | 51 + .../homepage_service/claim_homepage.rb | 47 + .../snippets/homepage_service/get_homepage.rb | 47 + .../homepage_service/unclaim_homepage.rb | 47 + .../homepage_service/update_homepage.rb | 47 + .../find_lfp_providers.rb | 51 + .../link_lfp_provider.rb | 47 + .../create_omnichannel_setting.rb | 47 + .../get_omnichannel_setting.rb | 47 + .../list_omnichannel_settings.rb | 51 + .../request_inventory_verification.rb | 47 + .../update_omnichannel_setting.rb | 47 + .../create_online_return_policy.rb | 47 + .../delete_online_return_policy.rb | 47 + .../get_online_return_policy.rb | 47 + .../list_online_return_policies.rb | 51 + .../update_online_return_policy.rb | 47 + .../programs_service/disable_program.rb | 47 + .../programs_service/enable_program.rb | 47 + .../snippets/programs_service/get_program.rb | 47 + .../programs_service/list_programs.rb | 51 + .../snippets/regions_service/create_region.rb | 47 + .../snippets/regions_service/delete_region.rb | 47 + .../snippets/regions_service/get_region.rb | 47 + .../snippets/regions_service/list_regions.rb | 51 + .../snippets/regions_service/update_region.rb | 47 + .../get_shipping_settings.rb | 47 + .../insert_shipping_settings.rb | 47 + ...gle.shopping.merchant.accounts.v1beta.json | 2535 +++++++++++++ .../get_terms_of_service_agreement_state.rb | 47 + ...cation_terms_of_service_agreement_state.rb | 47 + .../accept_terms_of_service.rb | 47 + .../get_terms_of_service.rb | 47 + .../retrieve_latest_terms_of_service.rb | 47 + .../snippets/user_service/create_user.rb | 47 + .../snippets/user_service/delete_user.rb | 47 + .../snippets/user_service/get_user.rb | 47 + .../snippets/user_service/list_users.rb | 51 + .../snippets/user_service/update_user.rb | 47 + .../account_issue_service_paths_test.rb | 55 + .../v1beta/account_issue_service_rest_test.rb | 157 + .../v1beta/account_issue_service_test.rb | 175 + .../v1beta/account_tax_service_paths_test.rb | 67 + .../v1beta/account_tax_service_rest_test.rb | 264 ++ .../v1beta/account_tax_service_test.rb | 289 ++ .../v1beta/accounts_service_paths_test.rb | 79 + .../v1beta/accounts_service_rest_test.rb | 432 +++ .../accounts/v1beta/accounts_service_test.rb | 481 +++ .../autofeed_settings_service_paths_test.rb | 55 + .../autofeed_settings_service_rest_test.rb | 208 ++ .../v1beta/autofeed_settings_service_test.rb | 222 ++ ...tomatic_improvements_service_paths_test.rb | 55 + ...utomatic_improvements_service_rest_test.rb | 208 ++ .../automatic_improvements_service_test.rb | 222 ++ .../business_identity_service_paths_test.rb | 55 + .../business_identity_service_rest_test.rb | 208 ++ .../v1beta/business_identity_service_test.rb | 222 ++ .../business_info_service_paths_test.rb | 55 + .../v1beta/business_info_service_rest_test.rb | 208 ++ .../v1beta/business_info_service_test.rb | 222 ++ .../checkout_settings_service_paths_test.rb | 67 + .../checkout_settings_service_rest_test.rb | 317 ++ .../v1beta/checkout_settings_service_test.rb | 340 ++ .../email_preferences_service_paths_test.rb | 55 + .../email_preferences_service_rest_test.rb | 208 ++ .../v1beta/email_preferences_service_test.rb | 222 ++ .../v1beta/gbp_accounts_service_paths_test.rb | 55 + .../v1beta/gbp_accounts_service_rest_test.rb | 210 ++ .../v1beta/gbp_accounts_service_test.rb | 231 ++ .../v1beta/homepage_service_paths_test.rb | 55 + .../v1beta/homepage_service_rest_test.rb | 316 ++ .../accounts/v1beta/homepage_service_test.rb | 338 ++ .../lfp_providers_service_paths_test.rb | 67 + .../v1beta/lfp_providers_service_rest_test.rb | 210 ++ .../v1beta/lfp_providers_service_test.rb | 231 ++ ...omnichannel_settings_service_paths_test.rb | 67 + .../omnichannel_settings_service_rest_test.rb | 373 ++ .../omnichannel_settings_service_test.rb | 407 ++ ...online_return_policy_service_paths_test.rb | 67 + .../online_return_policy_service_rest_test.rb | 373 ++ .../online_return_policy_service_test.rb | 407 ++ .../v1beta/programs_service_paths_test.rb | 67 + .../v1beta/programs_service_rest_test.rb | 317 ++ .../accounts/v1beta/programs_service_test.rb | 345 ++ .../v1beta/regions_service_paths_test.rb | 67 + .../v1beta/regions_service_rest_test.rb | 374 ++ .../accounts/v1beta/regions_service_test.rb | 409 ++ .../shipping_settings_service_paths_test.rb | 55 + .../shipping_settings_service_rest_test.rb | 208 ++ .../v1beta/shipping_settings_service_test.rb | 222 ++ ...vice_agreement_state_service_paths_test.rb | 67 + ...rvice_agreement_state_service_rest_test.rb | 207 ++ ...of_service_agreement_state_service_test.rb | 220 ++ .../terms_of_service_service_paths_test.rb | 67 + .../terms_of_service_service_rest_test.rb | 264 ++ .../v1beta/terms_of_service_service_test.rb | 284 ++ .../v1beta/user_service_paths_test.rb | 67 + .../accounts/v1beta/user_service_rest_test.rb | 374 ++ .../accounts/v1beta/user_service_test.rb | 409 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...e-shopping-merchant-conversions-v1.gemspec | 28 + ...google-shopping-merchant-conversions-v1.rb | 21 + .../shopping/merchant/conversions/v1.rb | 47 + .../v1/conversion_sources_service.rb | 57 + .../v1/conversion_sources_service/client.rb | 975 +++++ .../conversion_sources_service/credentials.rb | 49 + .../v1/conversion_sources_service/paths.rb | 66 + .../v1/conversion_sources_service/rest.rb | 54 + .../conversion_sources_service/rest/client.rb | 890 +++++ .../rest/service_stub.rb | 452 +++ .../conversions/v1/conversionsources_pb.rb | 45 + .../v1/conversionsources_services_pb.rb | 62 + .../shopping/merchant/conversions/v1/rest.rb | 39 + .../merchant/conversions/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../conversions/v1/conversionsources.rb | 289 ++ .../snippets/Gemfile | 32 + .../create_conversion_source.rb | 47 + .../delete_conversion_source.rb | 47 + .../get_conversion_source.rb | 47 + .../list_conversion_sources.rb | 51 + .../undelete_conversion_source.rb | 47 + .../update_conversion_source.rb | 47 + ...ogle.shopping.merchant.conversions.v1.json | 255 ++ .../conversion_sources_service_paths_test.rb | 67 + .../conversion_sources_service_rest_test.rb | 428 +++ .../v1/conversion_sources_service_test.rb | 467 +++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...opping-merchant-conversions-v1beta.gemspec | 28 + ...le-shopping-merchant-conversions-v1beta.rb | 21 + .../shopping/merchant/conversions/v1beta.rb | 47 + .../v1beta/conversion_sources_service.rb | 57 + .../conversion_sources_service/client.rb | 975 +++++ .../conversion_sources_service/credentials.rb | 49 + .../conversion_sources_service/paths.rb | 66 + .../v1beta/conversion_sources_service/rest.rb | 54 + .../conversion_sources_service/rest/client.rb | 890 +++++ .../rest/service_stub.rb | 452 +++ .../v1beta/conversionsources_pb.rb | 45 + .../v1beta/conversionsources_services_pb.rb | 62 + .../merchant/conversions/v1beta/rest.rb | 39 + .../merchant/conversions/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 + .../conversions/v1beta/conversionsources.rb | 290 ++ .../snippets/Gemfile | 32 + .../create_conversion_source.rb | 47 + .../delete_conversion_source.rb | 47 + .../get_conversion_source.rb | 47 + .../list_conversion_sources.rb | 51 + .../undelete_conversion_source.rb | 47 + .../update_conversion_source.rb | 47 + ....shopping.merchant.conversions.v1beta.json | 255 ++ .../conversion_sources_service_paths_test.rb | 67 + .../conversion_sources_service_rest_test.rb | 428 +++ .../v1beta/conversion_sources_service_test.rb | 467 +++ .../test/helper.rb | 35 + 1644 files changed, 309088 insertions(+) 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-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-workload_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/README.md create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/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/field_info.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/field_info.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/push_credentials.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-developers-developer_knowledge-v1/.gitignore create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/README.md create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb create mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/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-v2/.gitignore create mode 100644 owl-bot-staging/google-iam-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-v2/.toys.rb create mode 100644 owl-bot-staging/google-iam-v2/.yardopts create mode 100644 owl-bot-staging/google-iam-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-v2/Gemfile create mode 100644 owl-bot-staging/google-iam-v2/LICENSE.md create mode 100644 owl-bot-staging/google-iam-v2/README.md create mode 100644 owl-bot-staging/google-iam-v2/Rakefile create mode 100644 owl-bot-staging/google-iam-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-v2/google-iam-v2.gemspec create mode 100644 owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb create mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb create mode 100644 owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json create mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb create mode 100644 owl-bot-staging/google-iam-v2/test/helper.rb create mode 100644 owl-bot-staging/google-iam-v3/.gitignore create mode 100644 owl-bot-staging/google-iam-v3/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-v3/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-v3/.toys.rb create mode 100644 owl-bot-staging/google-iam-v3/.yardopts create mode 100644 owl-bot-staging/google-iam-v3/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-v3/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-v3/Gemfile create mode 100644 owl-bot-staging/google-iam-v3/LICENSE.md create mode 100644 owl-bot-staging/google-iam-v3/README.md create mode 100644 owl-bot-staging/google-iam-v3/Rakefile create mode 100644 owl-bot-staging/google-iam-v3/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-v3/google-iam-v3.gemspec create mode 100644 owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb create mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3/test/helper.rb create mode 100644 owl-bot-staging/google-iam-v3beta/.gitignore create mode 100644 owl-bot-staging/google-iam-v3beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-v3beta/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-v3beta/.toys.rb create mode 100644 owl-bot-staging/google-iam-v3beta/.yardopts create mode 100644 owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-v3beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-v3beta/Gemfile create mode 100644 owl-bot-staging/google-iam-v3beta/LICENSE.md create mode 100644 owl-bot-staging/google-iam-v3beta/README.md create mode 100644 owl-bot-staging/google-iam-v3beta/Rakefile create mode 100644 owl-bot-staging/google-iam-v3beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb create mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb create mode 100644 owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb create mode 100644 owl-bot-staging/google-iam-v3beta/test/helper.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/README.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb create mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.gitignore create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.yardopts create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Rakefile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb create mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-css-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-css-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-css-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-css-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-css-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-css-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-css-v1/README.md create mode 100644 owl-bot-staging/google-shopping-css-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-css-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb create mode 100644 owl-bot-staging/google-shopping-css-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb 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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..1feb0d2af605 --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..1b2942f8b010 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-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..29f093951a00 --- /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,1723 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_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..59b89648ea0d --- /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,1589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_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..300dbef56aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb @@ -0,0 +1,21 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..d039df3934ca --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb @@ -0,0 +1,27 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..1a3b0059d4ea --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb @@ -0,0 +1,24 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..136678f8b4cc --- /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,21 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..56270c4fa739 --- /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,22 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..c5a7d84f453f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb @@ -0,0 +1,34 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..08dfdde3eaf9 --- /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,24 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..d0c56927e4c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb @@ -0,0 +1,28 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..98c499519688 --- /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,22 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..1c1b2e5600fd --- /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,50 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..967f3a73832e --- /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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_scan_config parent: parent, scan_config: scan_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.start_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.stop_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.stop_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.stop_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_finding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_finding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_finding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_finding_type_stats({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_finding_type_stats parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..8d7b2344ec03 --- /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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.stop_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.stop_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_finding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_finding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_finding_type_stats({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_finding_type_stats parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..8ade84c6e045 --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..bb6157657854 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-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..ea2a952f4319 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb @@ -0,0 +1,804 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..c95d43b8e04d --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb @@ -0,0 +1,733 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..58e6055652da --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb @@ -0,0 +1,46 @@ +# 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. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..0f90ae8cb19d --- /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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_execution({ parent: parent, execution: execution }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_execution parent: parent, execution: execution do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.create_execution({ parent: parent, execution: execution }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_execution({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_execution name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_execution({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.cancel_execution({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.cancel_execution name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.cancel_execution({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..d372ed41a44a --- /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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_execution({ parent: parent, execution: execution }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_execution parent: parent, execution: execution do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_execution({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_execution name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_execution({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_execution name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..fdd0f2f49588 --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..9d5c4fa29f8a --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-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..d4fb4d8aa377 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb @@ -0,0 +1,791 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..240d00363b7a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb @@ -0,0 +1,37 @@ +# 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. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..578052bdc7b5 --- /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 + c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_execution({ parent: parent, execution: execution }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_execution parent: parent, execution: execution do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_execution({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_execution name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_execution({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_execution name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..2a49b1ac8710 --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..6733ad725cad --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-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..63a66d7d6400 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb @@ -0,0 +1,1076 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..f1ff4db6066f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..766c6a240c0e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb @@ -0,0 +1,999 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..d1fc051655e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, 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..0ccabf5cfd2d --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb @@ -0,0 +1,44 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..16718a9ef007 --- /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 + c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::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..cf13cbce88dc --- /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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workflow({ name: name, revision_id: revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workflow name: name, revision_id: revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..c48d4214d226 --- /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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..2a111a564bdc --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..30b765800a41 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-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..5a3b0e5fa1ca --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..293530077430 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..ccbb62fed292 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb @@ -0,0 +1,884 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_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..7269c2d1da8f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..7b8323216f07 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb @@ -0,0 +1,38 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..0f0081e8d9d0 --- /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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::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..fc962295d47a --- /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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..0c4369c49b95 --- /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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore b/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..93f834b12343 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "workloadmanager.googleapis.com", + "api_shortname": "workloadmanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest", + "distribution_name": "google-cloud-workload_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "workloadmanager", + "name_pretty": "Workload Manager V1 API", + "product_documentation": "https://docs.cloud.google.com/workload-manager/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/workload-manager/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..0ebb64223e6c --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workload_manager-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-workload_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts b/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts new file mode 100644 index 000000000000..e0b5e42eaf09 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Workload Manager V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..2337734059a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workload_manager-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-workload_manager-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/workload_manager/v1" + +client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workload_manager/v1" + +::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/workload_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/README.md b/owl-bot-staging/google-cloud-workload_manager-v1/README.md new file mode 100644 index 000000000000..0789ec3bca6c --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Workload Manager V1 API + +Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. + +Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Workload Manager V1 API. Most users should consider using +the main client gem, +[google-cloud-workload_manager](https://rubygems.org/gems/google-cloud-workload_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workload_manager-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/workloadmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workload_manager/v1" + +client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new +request = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new # (request fields as keyword arguments...) +response = client.list_evaluations request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://docs.cloud.google.com/workload-manager/docs) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/workload_manager/v1" +require "logger" + +client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workload_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workload_manager-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-workload_manager`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-workload_manager-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile b/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile new file mode 100644 index 000000000000..aed0a0615aca --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-workload_manager-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workload_manager/v1/workload_manager/credentials" + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-workload_manager-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-workload_manager-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-workload_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workload_manager-v1" + header "google-cloud-workload_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workload_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workload_manager-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-workload_manager-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-workload_manager-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..856bd67ef541 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.workloadmanager.v1", + "libraryPackage": "::Google::Cloud::WorkloadManager::V1", + "services": { + "WorkloadManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client", + "rpcs": { + "ListEvaluations": { + "methods": [ + "list_evaluations" + ] + }, + "GetEvaluation": { + "methods": [ + "get_evaluation" + ] + }, + "CreateEvaluation": { + "methods": [ + "create_evaluation" + ] + }, + "UpdateEvaluation": { + "methods": [ + "update_evaluation" + ] + }, + "DeleteEvaluation": { + "methods": [ + "delete_evaluation" + ] + }, + "ListExecutions": { + "methods": [ + "list_executions" + ] + }, + "GetExecution": { + "methods": [ + "get_execution" + ] + }, + "RunEvaluation": { + "methods": [ + "run_evaluation" + ] + }, + "DeleteExecution": { + "methods": [ + "delete_execution" + ] + }, + "ListExecutionResults": { + "methods": [ + "list_execution_results" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "ListScannedResources": { + "methods": [ + "list_scanned_resources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec b/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec new file mode 100644 index 000000000000..0a9c127541cd --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workload_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workload_manager-v1" + gem.version = Google::Cloud::WorkloadManager::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details." + gem.summary = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb new file mode 100644 index 000000000000..f9223fbaf153 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/workload_manager/v1" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb new file mode 100644 index 000000000000..7db86331d30c --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workload_manager/v1/workload_manager" +require "google/cloud/workload_manager/v1/version" + +module Google + module Cloud + module WorkloadManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workload_manager/v1" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workload_manager/v1" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/workload_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb new file mode 100644 index 000000000000..cf11c29b7951 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module WorkloadManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/workload_manager/v1/rest" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WorkloadManager"] + parent_config = while namespace.any? + parent_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-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb new file mode 100644 index 000000000000..3704093c98dd --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workload_manager/v1/workload_manager/rest" +require "google/cloud/workload_manager/v1/bindings_override" +require "google/cloud/workload_manager/v1/version" + +module Google + module Cloud + module WorkloadManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/workload_manager/v1/rest" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb new file mode 100644 index 000000000000..7ebe4521c164 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WorkloadManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb new file mode 100644 index 000000000000..f0fd4e71a36c --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.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/workload_manager/v1/version" + +require "google/cloud/workload_manager/v1/workload_manager/credentials" +require "google/cloud/workload_manager/v1/workload_manager/paths" +require "google/cloud/workload_manager/v1/workload_manager/operations" +require "google/cloud/workload_manager/v1/workload_manager/client" +require "google/cloud/workload_manager/v1/workload_manager/rest" + +module Google + module Cloud + module WorkloadManager + module V1 + ## + # The Workload Manager provides various tools to deploy, validate and observe + # your workloads running on Google Cloud. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workload_manager/v1/workload_manager" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workload_manager/v1/workload_manager/rest" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + module WorkloadManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "workload_manager", "helpers.rb" +require "google/cloud/workload_manager/v1/workload_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb new file mode 100644 index 000000000000..50a0dcbe1129 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb @@ -0,0 +1,1774 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/workloadmanager/v1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + ## + # Client for the WorkloadManager service. + # + # The Workload Manager provides various tools to deploy, validate and observe + # your workloads running on Google Cloud. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workload_manager_stub + + ## + # Configure the WorkloadManager Client class. + # + # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WorkloadManager clients + # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WorkloadManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_evaluations.timeout = 60.0 + default_config.rpcs.list_evaluations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_evaluation.timeout = 60.0 + default_config.rpcs.get_evaluation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_evaluation.timeout = 60.0 + + default_config.rpcs.update_evaluation.timeout = 60.0 + + default_config.rpcs.delete_evaluation.timeout = 60.0 + + default_config.rpcs.list_executions.timeout = 60.0 + default_config.rpcs.list_executions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_execution.timeout = 60.0 + default_config.rpcs.get_execution.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.run_evaluation.timeout = 60.0 + + default_config.rpcs.delete_execution.timeout = 60.0 + + default_config.rpcs.list_execution_results.timeout = 60.0 + default_config.rpcs.list_execution_results.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 60.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_scanned_resources.timeout = 60.0 + default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @workload_manager_stub.universe_domain + end + + ## + # Create a new WorkloadManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WorkloadManager 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/workloadmanager/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @workload_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @workload_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @workload_manager_stub.endpoint + config.universe_domain = @workload_manager_stub.universe_domain + config.logger = @workload_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 + @workload_manager_stub.logger + end + + # Service calls + + ## + # Lists Evaluations in a given project and location. + # + # @overload list_evaluations(request, options = nil) + # Pass arguments to `list_evaluations` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListEvaluationsRequest. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filter to be applied when listing the evaluation results. + # @param order_by [::String] + # Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new + # + # # Call the list_evaluations method. + # result = client.list_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. + # p item + # end + # + def list_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :list_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_evaluations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Evaluation. + # + # @overload get_evaluation(request, options = nil) + # Pass arguments to `get_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_evaluation(name: nil) + # Pass arguments to `get_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Evaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new + # + # # Call the get_evaluation method. + # result = client.get_evaluation request + # + # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. + # p result + # + def get_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :get_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Evaluation in a given project and location. + # + # @overload create_evaluation(request, options = nil) + # Pass arguments to `create_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) + # Pass arguments to `create_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource prefix of the evaluation location using the form: + # `projects/{project_id}/locations/{location_id}`. + # @param evaluation_id [::String] + # Required. Id of the requesting object. + # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new + # + # # Call the create_evaluation method. + # result = client.create_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :create_evaluation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Evaluation. + # + # @overload update_evaluation(request, options = nil) + # Pass arguments to `update_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) + # Pass arguments to `update_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Evaluation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new + # + # # Call the update_evaluation method. + # result = client.update_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.evaluation&.name + header_params["evaluation.name"] = request.evaluation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :update_evaluation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Evaluation. + # + # @overload delete_evaluation(request, options = nil) + # Pass arguments to `delete_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_evaluation(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. Followed the best practice from + # https://aip.dev/135#cascading-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/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new + # + # # Call the delete_evaluation method. + # result = client.delete_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :delete_evaluation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Executions in a given project and location. + # + # @overload list_executions(request, options = nil) + # Pass arguments to `list_executions` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @workload_manager_stub.call_rpc :list_executions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workload_manager_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 + + ## + # Gets details of a single Execution. + # + # @overload get_execution(request, options = nil) + # Pass arguments to `get_execution` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::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) + # 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 resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WorkloadManager::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new + # + # # Call the get_execution method. + # result = client.get_execution request + # + # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @workload_manager_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 + + ## + # Creates a new Execution in a given project and location. + # + # @overload run_evaluation(request, options = nil) + # Pass arguments to `run_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) + # Pass arguments to `run_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Evaluation using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @param execution_id [::String] + # Required. ID of the execution which will be created. + # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new + # + # # Call the run_evaluation method. + # result = client.run_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :run_evaluation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Execution. + # + # @overload delete_execution(request, options = nil) + # Pass arguments to `delete_execution` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_execution(name: nil, request_id: nil) + # Pass arguments to `delete_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 resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new + # + # # Call the delete_execution method. + # result = client.delete_execution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :delete_execution, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the result of a single evaluation. + # + # @overload list_execution_results(request, options = nil) + # Pass arguments to `list_execution_results` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_execution_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The execution results. + # Format: \\{parent}/evaluations/*/executions/*/results. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new + # + # # Call the list_execution_results method. + # result = client.list_execution_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. + # p item + # end + # + def list_execution_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_execution_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_execution_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :list_execution_results, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_execution_results, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules in a given project. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The [project] on which to execute the request. The format is: + # projects/\\{project_id}/locations/\\{location} + # Currently, the pre-defined rules are global available to all projects and + # all regions. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filter based on primary_category, secondary_category. + # @param custom_rules_bucket [::String] + # The Cloud Storage bucket name for custom rules. + # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] + # Optional. The evaluation type of the rules will be applied to. + # The Cloud Storage bucket name for custom rules. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. + # p result + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :list_rules, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all scanned resources for a single Execution. + # + # @overload list_scanned_resources(request, options = nil) + # Pass arguments to `list_scanned_resources` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent for ListScannedResourcesRequest. + # @param rule [::String] + # Rule name. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new + # + # # Call the list_scanned_resources method. + # result = client.list_scanned_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. + # p item + # end + # + def list_scanned_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_scanned_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scanned_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.call_rpc :list_scanned_resources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the WorkloadManager API. + # + # This class represents the configuration for WorkloadManager, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_evaluations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_evaluations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_evaluations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the WorkloadManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluations + ## + # RPC-specific configuration for `get_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation + ## + # RPC-specific configuration for `create_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation + ## + # RPC-specific configuration for `update_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation + ## + # RPC-specific configuration for `delete_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation + ## + # RPC-specific configuration for `list_executions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_executions + ## + # RPC-specific configuration for `get_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :get_execution + ## + # RPC-specific configuration for `run_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation + ## + # RPC-specific configuration for `delete_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_execution + ## + # RPC-specific configuration for `list_execution_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_execution_results + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `list_scanned_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scanned_resources + + # @private + def initialize parent_rpcs = nil + list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations + @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config + get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation + @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config + create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation + @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config + update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation + @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config + delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation + @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config + list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions + @list_executions = ::Gapic::Config::Method.new list_executions_config + get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution + @get_execution = ::Gapic::Config::Method.new get_execution_config + run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation + @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config + delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution + @delete_execution = ::Gapic::Config::Method.new delete_execution_config + list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results + @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources + @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb new file mode 100644 index 000000000000..3a15fec5e622 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + # Credentials for the WorkloadManager 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb new file mode 100644 index 000000000000..fcc635313813 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::WorkloadManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb new file mode 100644 index 000000000000..d9be17987e55 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + # Path helper methods for the WorkloadManager 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 Evaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/evaluations/{evaluation}` + # + # @param project [String] + # @param location [String] + # @param evaluation [String] + # + # @return [::String] + def evaluation_path project:, location:, evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/evaluations/#{evaluation}" + end + + ## + # Create a fully-qualified Execution resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}` + # + # @param project [String] + # @param location [String] + # @param evaluation [String] + # @param execution [String] + # + # @return [::String] + def execution_path project:, location:, evaluation:, execution: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/evaluations/#{evaluation}/executions/#{execution}" + 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb new file mode 100644 index 000000000000..402e8abf697d --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/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/workload_manager/v1/version" +require "google/cloud/workload_manager/v1/bindings_override" + +require "google/cloud/workload_manager/v1/workload_manager/credentials" +require "google/cloud/workload_manager/v1/workload_manager/paths" +require "google/cloud/workload_manager/v1/workload_manager/rest/operations" +require "google/cloud/workload_manager/v1/workload_manager/rest/client" + +module Google + module Cloud + module WorkloadManager + module V1 + ## + # The Workload Manager provides various tools to deploy, validate and observe + # your workloads running on Google Cloud. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workload_manager/v1/workload_manager/rest" + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + module WorkloadManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/workload_manager/v1/workload_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb new file mode 100644 index 000000000000..205758884d6f --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb @@ -0,0 +1,1655 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/workloadmanager/v1/service_pb" +require "google/cloud/workload_manager/v1/workload_manager/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + module Rest + ## + # REST client for the WorkloadManager service. + # + # The Workload Manager provides various tools to deploy, validate and observe + # your workloads running on Google Cloud. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workload_manager_stub + + ## + # Configure the WorkloadManager Client class. + # + # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WorkloadManager clients + # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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", "WorkloadManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_evaluations.timeout = 60.0 + default_config.rpcs.list_evaluations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_evaluation.timeout = 60.0 + default_config.rpcs.get_evaluation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_evaluation.timeout = 60.0 + + default_config.rpcs.update_evaluation.timeout = 60.0 + + default_config.rpcs.delete_evaluation.timeout = 60.0 + + default_config.rpcs.list_executions.timeout = 60.0 + default_config.rpcs.list_executions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_execution.timeout = 60.0 + default_config.rpcs.get_execution.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.run_evaluation.timeout = 60.0 + + default_config.rpcs.delete_execution.timeout = 60.0 + + default_config.rpcs.list_execution_results.timeout = 60.0 + default_config.rpcs.list_execution_results.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 60.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_scanned_resources.timeout = 60.0 + default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 + @workload_manager_stub.universe_domain + end + + ## + # Create a new WorkloadManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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 + + @workload_manager_stub = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @workload_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @workload_manager_stub.endpoint + config.universe_domain = @workload_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @workload_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 + @workload_manager_stub.logger + end + + # Service calls + + ## + # Lists Evaluations in a given project and location. + # + # @overload list_evaluations(request, options = nil) + # Pass arguments to `list_evaluations` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListEvaluationsRequest. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filter to be applied when listing the evaluation results. + # @param order_by [::String] + # Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new + # + # # Call the list_evaluations method. + # result = client.list_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. + # p item + # end + # + def list_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.list_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_evaluations, "evaluations", request, result, 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 Evaluation. + # + # @overload get_evaluation(request, options = nil) + # Pass arguments to `get_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_evaluation(name: nil) + # Pass arguments to `get_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new + # + # # Call the get_evaluation method. + # result = client.get_evaluation request + # + # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. + # p result + # + def get_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.get_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Evaluation in a given project and location. + # + # @overload create_evaluation(request, options = nil) + # Pass arguments to `create_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) + # Pass arguments to `create_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource prefix of the evaluation location using the form: + # `projects/{project_id}/locations/{location_id}`. + # @param evaluation_id [::String] + # Required. Id of the requesting object. + # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new + # + # # Call the create_evaluation method. + # result = client.create_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest + + # Converts hash and nil to an 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.create_evaluation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Evaluation. + # + # @overload update_evaluation(request, options = nil) + # Pass arguments to `update_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) + # Pass arguments to `update_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Evaluation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new + # + # # Call the update_evaluation method. + # result = client.update_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.update_evaluation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Evaluation. + # + # @overload delete_evaluation(request, options = nil) + # Pass arguments to `delete_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_evaluation(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. Followed the best practice from + # https://aip.dev/135#cascading-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/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new + # + # # Call the delete_evaluation method. + # result = client.delete_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.delete_evaluation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Executions in a given project and location. + # + # @overload list_executions(request, options = nil) + # Pass arguments to `list_executions` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @workload_manager_stub.list_executions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_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 + + ## + # Gets details of a single Execution. + # + # @overload get_execution(request, options = nil) + # Pass arguments to `get_execution` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::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) + # 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 resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new + # + # # Call the get_execution method. + # result = client.get_execution request + # + # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @workload_manager_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 + + ## + # Creates a new Execution in a given project and location. + # + # @overload run_evaluation(request, options = nil) + # Pass arguments to `run_evaluation` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) + # Pass arguments to `run_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Evaluation using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @param execution_id [::String] + # Required. ID of the execution which will be created. + # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new + # + # # Call the run_evaluation method. + # result = client.run_evaluation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.run_evaluation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Execution. + # + # @overload delete_execution(request, options = nil) + # Pass arguments to `delete_execution` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_execution(name: nil, request_id: nil) + # Pass arguments to `delete_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 resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new + # + # # Call the delete_execution method. + # result = client.delete_execution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.delete_execution request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the result of a single evaluation. + # + # @overload list_execution_results(request, options = nil) + # Pass arguments to `list_execution_results` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_execution_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The execution results. + # Format: \\{parent}/evaluations/*/executions/*/results. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new + # + # # Call the list_execution_results method. + # result = client.list_execution_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. + # p item + # end + # + def list_execution_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_execution_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_execution_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.list_execution_results request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_execution_results, "execution_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules in a given project. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The [project] on which to execute the request. The format is: + # projects/\\{project_id}/locations/\\{location} + # Currently, the pre-defined rules are global available to all projects and + # all regions. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filter based on primary_category, secondary_category. + # @param custom_rules_bucket [::String] + # The Cloud Storage bucket name for custom rules. + # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] + # Optional. The evaluation type of the rules will be applied to. + # The Cloud Storage bucket name for custom rules. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. + # p result + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.list_rules request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all scanned resources for a single Execution. + # + # @overload list_scanned_resources(request, options = nil) + # Pass arguments to `list_scanned_resources` via a request object, either of type + # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent for ListScannedResourcesRequest. + # @param rule [::String] + # Rule name. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workload_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new + # + # # Call the list_scanned_resources method. + # result = client.list_scanned_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. + # p item + # end + # + def list_scanned_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_scanned_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scanned_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workload_manager_stub.list_scanned_resources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, "scanned_resources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the WorkloadManager REST API. + # + # This class represents the configuration for WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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_evaluations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_evaluations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_evaluations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 WorkloadManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluations + ## + # RPC-specific configuration for `get_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation + ## + # RPC-specific configuration for `create_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation + ## + # RPC-specific configuration for `update_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation + ## + # RPC-specific configuration for `delete_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation + ## + # RPC-specific configuration for `list_executions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_executions + ## + # RPC-specific configuration for `get_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :get_execution + ## + # RPC-specific configuration for `run_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation + ## + # RPC-specific configuration for `delete_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_execution + ## + # RPC-specific configuration for `list_execution_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_execution_results + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `list_scanned_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scanned_resources + + # @private + def initialize parent_rpcs = nil + list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations + @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config + get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation + @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config + create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation + @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config + update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation + @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config + delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation + @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config + list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions + @list_executions = ::Gapic::Config::Method.new list_executions_config + get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution + @get_execution = ::Gapic::Config::Method.new get_execution_config + run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation + @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config + delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution + @delete_execution = ::Gapic::Config::Method.new delete_execution_config + list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results + @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources + @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb new file mode 100644 index 000000000000..f2106f7965b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb new file mode 100644 index 000000000000..d0a00c830b48 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb @@ -0,0 +1,816 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workloadmanager/v1/service_pb" + +module Google + module Cloud + module WorkloadManager + module V1 + module WorkloadManager + module Rest + ## + # REST service stub for the WorkloadManager 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_evaluations REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] + # A result object deserialized from the server's reply + def list_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] + # A result object deserialized from the server's reply + def get_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WorkloadManager::V1::Evaluation.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_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_executions REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::ListExecutionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 get_execution REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 run_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def run_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_execution REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_execution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_execution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_execution_results REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] + # A result object deserialized from the server's reply + def list_execution_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_execution_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_execution_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_rules REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_scanned_resources REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] + # A result object deserialized from the server's reply + def list_scanned_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scanned_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_scanned_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.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_evaluations REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/evaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] + # 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_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/evaluations", + body: "evaluation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{evaluation.name}", + body: "evaluation", + matches: [ + ["evaluation.name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_executions REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_execution REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_evaluation REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}/executions:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_execution REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_execution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_execution_results REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_execution_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/results", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scanned_resources REST call + # + # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_scanned_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scannedResources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb new file mode 100644 index 000000000000..33d6b9a3ce93 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workloadmanager/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/workloadmanager/v1/service.proto\x12\x1fgoogle.cloud.workloadmanager.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\"\xd0\x07\n\nEvaluation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12H\n\x0fresource_filter\x18\x03 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceFilter\x12\x12\n\nrule_names\x18\x04 \x03(\t\x12M\n\x0fresource_status\x18\x06 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.workloadmanager.v1.Evaluation.LabelsEntry\x12\x15\n\x08schedule\x18\n \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x0b \x01(\t\x12S\n\x0f\x65valuation_type\x18\x0c \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationType\x12X\n\x15\x62ig_query_destination\x18\r \x01(\x0b\x32\x34.google.cloud.workloadmanager.v1.BigQueryDestinationB\x03\xe0\x41\x01\x12:\n\x07kms_key\x18\x0f \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SAP\x10\x01\x12\x0e\n\nSQL_SERVER\x10\x02\x12\t\n\x05OTHER\x10\x03:\x8a\x01\xea\x41\x86\x01\n)workloadmanager.googleapis.com/Evaluation\x12@projects/{project}/locations/{location}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x0b\n\t_schedule\"\xa7\x02\n\x0eResourceFilter\x12\x0e\n\x06scopes\x18\x01 \x03(\t\x12\x1c\n\x14resource_id_patterns\x18\x02 \x03(\t\x12^\n\x10inclusion_labels\x18\x03 \x03(\x0b\x32\x44.google.cloud.workloadmanager.v1.ResourceFilter.InclusionLabelsEntry\x12O\n\x13gce_instance_filter\x18\x04 \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.GceInstanceFilter\x1a\x36\n\x14InclusionLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"-\n\x11GceInstanceFilter\x12\x18\n\x10service_accounts\x18\x04 \x03(\t\"\x9e\x01\n\x0eResourceStatus\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ResourceStatus.State\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\"^\n\x13\x42igQueryDestination\x12 \n\x13\x64\x65stination_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x63reate_new_results_table\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa4\x01\n\x16ListEvaluationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x89\x01\n\x17ListEvaluationsResponse\x12@\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x14GetEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\"\xd7\x01\n\x17\x43reateEvaluationRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x03 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x17UpdateEvaluationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x02 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17\x44\x65leteEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x0c\n\tExecution\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x37\n\x0einventory_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\x05state\x18\x05 \x01(\x0e\x32\x30.google.cloud.workloadmanager.v1.Execution.StateB\x03\xe0\x41\x03\x12\x1a\n\revaluation_id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.cloud.workloadmanager.v1.Execution.LabelsEntry\x12\x41\n\x08run_type\x18\x08 \x01(\x0e\x32/.google.cloud.workloadmanager.v1.Execution.Type\x12O\n\x0crule_results\x18\t \x03(\x0b\x32\x34.google.cloud.workloadmanager.v1.RuleExecutionResultB\x03\xe0\x41\x03\x12\x62\n\x15\x65xternal_data_sources\x18\n \x03(\x0b\x32>.google.cloud.workloadmanager.v1.Execution.ExternalDataSourcesB\x03\xe0\x41\x01\x12G\n\x07notices\x18\x0b \x03(\x0b\x32\x31.google.cloud.workloadmanager.v1.Execution.NoticeB\x03\xe0\x41\x03\x12\x46\n\x06\x65ngine\x18\x0c \x01(\x0e\x32\x31.google.cloud.workloadmanager.v1.Execution.EngineB\x03\xe0\x41\x01\x12O\n\x0eresult_summary\x18\r \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.Execution.SummaryB\x03\xe0\x41\x03\x1a\xde\x01\n\x13\x45xternalDataSources\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x04type\x18\x03 \x01(\x0e\x32\x43.google.cloud.workloadmanager.v1.Execution.ExternalDataSources.TypeB\x03\xe0\x41\x02\x12\x17\n\nasset_type\x18\x04 \x01(\tB\x03\xe0\x41\x02\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42IG_QUERY_TABLE\x10\x01\x1a\x1e\n\x06Notice\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1aS\n\x07Summary\x12\x15\n\x08\x66\x61ilures\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cnew_failures\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tnew_fixes\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"9\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_TIME\x10\x01\x12\r\n\tSCHEDULED\x10\x02\"<\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45NGINE_SCANNER\x10\x01\x12\x06\n\x02V2\x10\x02:\x9e\x01\xea\x41\x9a\x01\n(workloadmanager.googleapis.com/Execution\x12Wprojects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}*\nexecutions2\texecution\"\x93\x02\n\x13RuleExecutionResult\x12\x0c\n\x04rule\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.RuleExecutionResult.StateB\x03\xe0\x41\x03\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x14\n\x0cresult_count\x18\x04 \x01(\x03\x12\x1e\n\x16scanned_resource_count\x18\x05 \x01(\x03\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_SUCCESS\x10\x01\x12\x11\n\rSTATE_FAILURE\x10\x02\x12\x11\n\rSTATE_SKIPPED\x10\x03\"\xa2\x01\n\x15ListExecutionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(workloadmanager.googleapis.com/Execution\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x86\x01\n\x16ListExecutionsResponse\x12>\n\nexecutions\x18\x01 \x03(\x0b\x32*.google.cloud.workloadmanager.v1.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\"\xcf\x01\n\x14RunEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x19\n\x0c\x65xecution_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\texecution\x18\x03 \x01(\x0b\x32*.google.cloud.workloadmanager.v1.ExecutionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x16\x44\x65leteExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"i\n\x1bListExecutionResultsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x84\x01\n\x1cListExecutionResultsResponse\x12K\n\x11\x65xecution_results\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ExecutionResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x03\n\x0f\x45xecutionResult\x12\x19\n\x11violation_message\x18\x01 \x01(\t\x12\x10\n\x08severity\x18\x02 \x01(\t\x12\x36\n\x04rule\x18\x03 \x01(\tB(\xfa\x41%\n#workloadmanager.googleapis.com/Rule\x12\x19\n\x11\x64ocumentation_url\x18\x04 \x01(\t\x12;\n\x08resource\x18\x05 \x01(\x0b\x32).google.cloud.workloadmanager.v1.Resource\x12L\n\x11violation_details\x18\x06 \x01(\x0b\x32\x31.google.cloud.workloadmanager.v1.ViolationDetails\x12:\n\x08\x63ommands\x18\x07 \x03(\x0b\x32(.google.cloud.workloadmanager.v1.Command\x12\x43\n\x04type\x18\x08 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ExecutionResult.Type\"@\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_PASSED\x10\x01\x12\x11\n\rTYPE_VIOLATED\x10\x02\"\xa9\x01\n\x07\x43ommand\x12\x46\n\ragent_command\x18\x01 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.AgentCommandH\x00\x12\x46\n\rshell_command\x18\x02 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.ShellCommandH\x00\x42\x0e\n\x0c\x63ommand_type\"\xa5\x01\n\x0c\x41gentCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12Q\n\nparameters\x18\x02 \x03(\x0b\x32=.google.cloud.workloadmanager.v1.AgentCommand.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x0cShellCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x02 \x01(\t\x12\x17\n\x0ftimeout_seconds\x18\x03 \x01(\x05\"\xa2\x01\n\nRuleOutput\x12N\n\x07\x64\x65tails\x18\x01 \x03(\x0b\x32\x38.google.cloud.workloadmanager.v1.RuleOutput.DetailsEntryB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x02\n\x10ViolationDetails\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12Q\n\x08observed\x18\x03 \x03(\x0b\x32?.google.cloud.workloadmanager.v1.ViolationDetails.ObservedEntry\x12\x45\n\x0brule_output\x18\x04 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.RuleOutputB\x03\xe0\x41\x03\x1a/\n\rObservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"?\n\x08Resource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x17\n\x0fservice_account\x18\x03 \x01(\t\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xed\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x18\n\x10primary_category\x18\x06 \x01(\t\x12\x1a\n\x12secondary_category\x18\x07 \x01(\t\x12\x15\n\rerror_message\x18\x08 \x01(\t\x12\x0b\n\x03uri\x18\t \x01(\t\x12\x13\n\x0bremediation\x18\n \x01(\t\x12\x0c\n\x04tags\x18\x0b \x03(\t\x12\x41\n\trule_type\x18\x0c \x01(\x0e\x32..google.cloud.workloadmanager.v1.Rule.RuleType\x12\x12\n\nasset_type\x18\r \x01(\t\"?\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41SELINE\x10\x01\x12\n\n\x06\x43USTOM\x10\x02:k\xea\x41h\n#workloadmanager.googleapis.com/Rule\x12\x34projects/{project}/locations/{location}/rules/{rule}*\x05rules2\x04rule\"\xfd\x01\n\x10ListRulesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#workloadmanager.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x05 \x01(\t\x12X\n\x0f\x65valuation_type\x18\x06 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationTypeB\x03\xe0\x41\x01\"I\n\x11ListRulesResponse\x12\x34\n\x05rules\x18\x01 \x03(\x0b\x32%.google.cloud.workloadmanager.v1.Rule\"\x89\x01\n\x1bListScannedResourcesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04rule\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x84\x01\n\x1cListScannedResourcesResponse\x12K\n\x11scanned_resources\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ScannedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"1\n\x0fScannedResource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t2\xb5\x15\n\x0fWorkloadManager\x12\xc6\x01\n\x0fListEvaluations\x12\x37.google.cloud.workloadmanager.v1.ListEvaluationsRequest\x1a\x38.google.cloud.workloadmanager.v1.ListEvaluationsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/evaluations\x12\xb3\x01\n\rGetEvaluation\x12\x35.google.cloud.workloadmanager.v1.GetEvaluationRequest\x1a+.google.cloud.workloadmanager.v1.Evaluation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/evaluations/*}\x12\xf5\x01\n\x10\x43reateEvaluation\x12\x38.google.cloud.workloadmanager.v1.CreateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x1fparent,evaluation,evaluation_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/evaluations:\nevaluation\x12\xf7\x01\n\x10UpdateEvaluation\x12\x38.google.cloud.workloadmanager.v1.UpdateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{evaluation.name=projects/*/locations/*/evaluations/*}:\nevaluation\x12\xd8\x01\n\x10\x44\x65leteEvaluation\x12\x38.google.cloud.workloadmanager.v1.DeleteEvaluationRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/evaluations/*}\x12\xd0\x01\n\x0eListExecutions\x12\x36.google.cloud.workloadmanager.v1.ListExecutionsRequest\x1a\x37.google.cloud.workloadmanager.v1.ListExecutionsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12/v1/{name=projects/*/locations/*/evaluations/*}/executions:run:\x01*\x12\xe3\x01\n\x0f\x44\x65leteExecution\x12\x37.google.cloud.workloadmanager.v1.DeleteExecutionRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>*] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb new file mode 100644 index 000000000000..29a56647dbcf --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb @@ -0,0 +1,991 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WorkloadManager + module V1 + # Represents a Workload Manager Evaluation configuration. + # An Evaluation defines a set of rules to be validated against a scope + # of Cloud resources. + # @!attribute [rw] name + # @return [::String] + # Name of resource that has the form + # `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`. + # @!attribute [rw] description + # @return [::String] + # Description of the Evaluation. + # @!attribute [rw] resource_filter + # @return [::Google::Cloud::WorkloadManager::V1::ResourceFilter] + # Resource filter for an evaluation defining the scope of resources to be + # evaluated. + # @!attribute [rw] rule_names + # @return [::Array<::String>] + # The names of the rules used for this evaluation. + # @!attribute [r] resource_status + # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus] + # Output only. [Output only] The current lifecycle state of the evaluation + # resource. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] schedule + # @return [::String] + # Crontab format schedule for scheduled evaluation, currently only supports + # the following fixed schedules: + # * `0 */1 * * *` # Hourly + # * `0 */6 * * *` # Every 6 hours + # * `0 */12 * * *` # Every 12 hours + # * `0 0 */1 * *` # Daily + # * `0 0 */7 * *` # Weekly + # * `0 0 */14 * *` # Every 14 days + # * `0 0 1 */1 *` # Monthly + # @!attribute [rw] custom_rules_bucket + # @return [::String] + # The Cloud Storage bucket name for custom rules. + # @!attribute [rw] evaluation_type + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] + # Evaluation type. + # @!attribute [rw] big_query_destination + # @return [::Google::Cloud::WorkloadManager::V1::BigQueryDestination] + # Optional. The BigQuery destination for detailed evaluation results. + # If this field is specified, the results of each evaluation execution are + # exported to BigQuery. + # @!attribute [rw] kms_key + # @return [::String] + # Optional. Immutable. Customer-managed encryption key name, in the format + # projects/*/locations/*/keyRings/*/cryptoKeys/*. + # The key will be used for CMEK encryption of the evaluation resource. + class Evaluation + 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 + + # Possible types of workload evaluations like SAP, SQL Server, etc. + module EvaluationType + # Not specified. + EVALUATION_TYPE_UNSPECIFIED = 0 + + # SAP best practices. + SAP = 1 + + # SQL best practices. + SQL_SERVER = 2 + + # Customized best practices. + OTHER = 3 + end + end + + # Resource filter for an evaluation defining the scope of resources to be + # evaluated. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The scopes of evaluation resource. + # Format: + # * `projects/{project_id}` + # * `folders/{folder_id}` + # * `organizations/{organization_id}` + # @!attribute [rw] resource_id_patterns + # @return [::Array<::String>] + # The pattern to filter resources by their id + # For example, a pattern of ".*prod-cluster.*" will match all resources that + # contain "prod-cluster" in their ID. + # @!attribute [rw] inclusion_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels to filter resources by. Each key-value pair in the map must exist + # on the resource for it to be included (e.g. VM instance labels). + # For example, specifying `{ "env": "prod", "database": "nosql" }` will only + # include resources that have labels `env=prod` and `database=nosql`. + # @!attribute [rw] gce_instance_filter + # @return [::Google::Cloud::WorkloadManager::V1::GceInstanceFilter] + # Filter compute engine resources. + class ResourceFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class InclusionLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A filter for matching Compute Engine instances. + # @!attribute [rw] service_accounts + # @return [::Array<::String>] + # If non-empty, only Compute Engine instances associated with at least one of + # the provided service accounts will be included in the evaluation. + class GceInstanceFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The lifecycle status of an Evaluation resource. + # @!attribute [rw] state + # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus::State] + # State of the Evaluation resource. + class ResourceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of an evaluation, such as CREATING, ACTIVE, and DELETING. + module State + # The state has not been populated in this message. + STATE_UNSPECIFIED = 0 + + # Resource has an active Create operation. + CREATING = 1 + + # Resource has no outstanding operations on it or has active Update + # operations. + ACTIVE = 2 + + # Resource has an active Delete operation. + DELETING = 3 + end + end + + # BigQuery destination for evaluation results. + # @!attribute [rw] destination_dataset + # @return [::String] + # Optional. Destination dataset to save evaluation results. + # @!attribute [rw] create_new_results_table + # @return [::Boolean] + # Optional. Determines if a new results table will be created when an + # Execution is created. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListEvaluations RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListEvaluationsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filter to be applied when listing the evaluation results. + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results. + class ListEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListEvaluations RPC. + # @!attribute [rw] evaluations + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Evaluation>] + # The list of evaluations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetEvaluation RPC. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateEvaluation RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource prefix of the evaluation location using the form: + # `projects/{project_id}/locations/{location_id}`. + # @!attribute [rw] evaluation_id + # @return [::String] + # Required. Id of the requesting object. + # @!attribute [rw] evaluation + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateEvaluation RPC. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Evaluation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # @!attribute [rw] evaluation + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteEvaluation RPC. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Followed the best practice from + # https://aip.dev/135#cascading-delete. + class DeleteEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Execution that represents a single run of an Evaluation. + # @!attribute [rw] name + # @return [::String] + # The name of execution resource. The format is + # projects/\\{project}/locations/\\{location}/evaluations/\\{evaluation}/executions/\\{execution}. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Start time stamp. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] End time stamp. + # @!attribute [r] inventory_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Inventory time stamp. + # @!attribute [r] state + # @return [::Google::Cloud::WorkloadManager::V1::Execution::State] + # Output only. [Output only] State. + # @!attribute [r] evaluation_id + # @return [::String] + # Output only. [Output only] Evaluation ID. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] run_type + # @return [::Google::Cloud::WorkloadManager::V1::Execution::Type] + # Type which represents whether the execution executed directly by user or + # scheduled according to the `Evaluation.schedule` field. + # @!attribute [r] rule_results + # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleExecutionResult>] + # Output only. Execution result summary per rule. + # @!attribute [rw] external_data_sources + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources>] + # Optional. External data sources. + # @!attribute [r] notices + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::Notice>] + # Output only. Additional information generated by the execution. + # @!attribute [rw] engine + # @return [::Google::Cloud::WorkloadManager::V1::Execution::Engine] + # Optional. Engine. + # @!attribute [r] result_summary + # @return [::Google::Cloud::WorkloadManager::V1::Execution::Summary] + # Output only. [Output only] Result summary for the execution. + class Execution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # External data sources for an execution. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of external data source. The name will be used inside the + # rego/sql to refer the external data. + # @!attribute [rw] uri + # @return [::String] + # Required. URI of external data source. example of bq table + # \\{project_ID}.\\{dataset_ID}.\\{table_ID}. + # @!attribute [rw] type + # @return [::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources::Type] + # Required. Type of external data source. + # @!attribute [rw] asset_type + # @return [::String] + # Required. The asset type of the external data source. + # This can be a supported Cloud Asset Inventory asset type + # (see https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # to override the default asset type, or it can be a custom type defined by + # the user. + class ExternalDataSources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of external data sources like BigQuery table, etc. + module Type + # Unknown type. + TYPE_UNSPECIFIED = 0 + + # BigQuery table. + BIG_QUERY_TABLE = 1 + end + end + + # Additional information generated by an execution. + # @!attribute [r] message + # @return [::String] + # Output only. Message of the notice. + class Notice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Execution summary. + # @!attribute [r] failures + # @return [::Integer] + # Output only. Number of failures. + # @!attribute [r] new_failures + # @return [::Integer] + # Output only. Number of new failures compared to the previous execution. + # @!attribute [r] new_fixes + # @return [::Integer] + # Output only. Number of new fixes compared to the previous execution. + class Summary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc. + module State + # State of execution is unspecified. + STATE_UNSPECIFIED = 0 + + # The execution is running in backend service. + RUNNING = 1 + + # The execution run succeeded. + SUCCEEDED = 2 + + # The execution run failed. + FAILED = 3 + end + + # The type of execution, could be on demand execute or scheduled execute. + module Type + # Type of execution is unspecified. + TYPE_UNSPECIFIED = 0 + + # Type of execution is one time. + ONE_TIME = 1 + + # Type of execution is scheduled. + SCHEDULED = 2 + end + + # The engine used for the execution. + module Engine + # The original CG. + ENGINE_UNSPECIFIED = 0 + + # SlimCG / Scanner. + ENGINE_SCANNER = 1 + + # Evaluation Engine V2. + V2 = 2 + end + end + + # Execution result summary per rule. + # @!attribute [rw] rule + # @return [::String] + # Rule name as plain text like `sap-hana-configured`. + # @!attribute [r] state + # @return [::Google::Cloud::WorkloadManager::V1::RuleExecutionResult::State] + # Output only. The execution status. + # @!attribute [rw] message + # @return [::String] + # Execution message, if any. + # @!attribute [rw] result_count + # @return [::Integer] + # Number of violations. + # @!attribute [rw] scanned_resource_count + # @return [::Integer] + # Number of total scanned resources. + class RuleExecutionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a rule execution like SUCCESS, FAILURE, etc. + module State + # Unknown state + STATE_UNSPECIFIED = 0 + + # Execution completed successfully + STATE_SUCCESS = 1 + + # Execution completed with failures + STATE_FAILURE = 2 + + # Execution was not executed + STATE_SKIPPED = 3 + end + end + + # Request message for the ListExecutions RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource prefix of the Execution using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + class ListExecutionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListExecutions RPC. + # @!attribute [rw] executions + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution>] + # The list of Execution. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListExecutionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetExecution RPC. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RunEvaluation RPC. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Evaluation using the form: + # `projects/{project}/locations/{location}/evaluations/{evaluation}`. + # @!attribute [rw] execution_id + # @return [::String] + # Required. ID of the execution which will be created. + # @!attribute [rw] execution + # @return [::Google::Cloud::WorkloadManager::V1::Execution] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class RunEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteExecution RPC. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListExecutionResults RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. The execution results. + # Format: \\{parent}/evaluations/*/executions/*/results. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results. + class ListExecutionResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListExecutionResults RPC. + # @!attribute [rw] execution_results + # @return [::Array<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] + # The versions from the specified publisher. + # @!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 ListExecutionResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of an execution. + # @!attribute [rw] violation_message + # @return [::String] + # The violation message of an execution. + # @!attribute [rw] severity + # @return [::String] + # The severity of violation. + # @!attribute [rw] rule + # @return [::String] + # The rule that is violated in an evaluation. + # @!attribute [rw] documentation_url + # @return [::String] + # The URL for the documentation of the rule. + # @!attribute [rw] resource + # @return [::Google::Cloud::WorkloadManager::V1::Resource] + # The resource that violates the rule. + # @!attribute [rw] violation_details + # @return [::Google::Cloud::WorkloadManager::V1::ViolationDetails] + # The details of violation in an evaluation result. + # @!attribute [rw] commands + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Command>] + # The commands to remediate the violation. + # @!attribute [rw] type + # @return [::Google::Cloud::WorkloadManager::V1::ExecutionResult::Type] + # Execution result type of the scanned resource. + class ExecutionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum of execution result type. + module Type + # Unknown state. + TYPE_UNSPECIFIED = 0 + + # Resource successfully passed the rule. + TYPE_PASSED = 1 + + # Resource violated the rule. + TYPE_VIOLATED = 2 + end + end + + # Command specifies the type of command to execute. + # @!attribute [rw] agent_command + # @return [::Google::Cloud::WorkloadManager::V1::AgentCommand] + # AgentCommand specifies a one-time executable program for the agent to + # run. + # + # Note: The following fields are mutually exclusive: `agent_command`, `shell_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] shell_command + # @return [::Google::Cloud::WorkloadManager::V1::ShellCommand] + # ShellCommand is invoked via the agent's command line executor. + # + # Note: The following fields are mutually exclusive: `shell_command`, `agent_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Command + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AgentCommand specifies a one-time executable program for the agent to run. + # @!attribute [rw] command + # @return [::String] + # The name of the agent one-time executable that will be invoked. + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of key/value pairs that can be used to specify + # additional one-time executable settings. + class AgentCommand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A ShellCommand is invoked via the agent's command line executor. + # @!attribute [rw] command + # @return [::String] + # The name of the command to be executed. + # @!attribute [rw] args + # @return [::String] + # Arguments to be passed to the command. + # @!attribute [rw] timeout_seconds + # @return [::Integer] + # Optional. If not specified, the default timeout is 60 seconds. + class ShellCommand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rule output of the violation. + # @!attribute [r] details + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Violation details generated by rule. + # @!attribute [r] message + # @return [::String] + # Output only. The message generated by rule. + class RuleOutput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DetailsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The violation in an evaluation result. + # @!attribute [rw] asset + # @return [::String] + # The name of the asset. + # @!attribute [rw] service_account + # @return [::String] + # The service account associated with the resource. + # @!attribute [rw] observed + # @return [::Google::Protobuf::Map{::String => ::String}] + # Details of the violation. + # @!attribute [r] rule_output + # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleOutput>] + # Output only. The rule output of the violation. + class ViolationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ObservedEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Resource in execution result. + # @!attribute [rw] type + # @return [::String] + # The type of resource. + # @!attribute [rw] name + # @return [::String] + # The name of the resource. + # @!attribute [rw] service_account + # @return [::String] + # The service account associated with the resource. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule to be evaluated. + # @!attribute [rw] name + # @return [::String] + # Rule name. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The version of the rule. + # @!attribute [rw] display_name + # @return [::String] + # The name display in UI. + # @!attribute [rw] description + # @return [::String] + # Describe rule in plain language. + # @!attribute [rw] severity + # @return [::String] + # The severity of the rule. + # @!attribute [rw] primary_category + # @return [::String] + # The primary category. + # @!attribute [rw] secondary_category + # @return [::String] + # The secondary category. + # @!attribute [rw] error_message + # @return [::String] + # The message template for rule. + # @!attribute [rw] uri + # @return [::String] + # The document url for the rule. + # @!attribute [rw] remediation + # @return [::String] + # The remediation for the rule. + # @!attribute [rw] tags + # @return [::Array<::String>] + # List of user-defined tags. + # @!attribute [rw] rule_type + # @return [::Google::Cloud::WorkloadManager::V1::Rule::RuleType] + # The type of the rule. + # @!attribute [rw] asset_type + # @return [::String] + # The CAI asset type of the rule is evaluating, for joined asset types, it + # will be the corresponding primary asset types. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the rule. + module RuleType + # Not specified. + RULE_TYPE_UNSPECIFIED = 0 + + # Baseline rules. + BASELINE = 1 + + # Custom rules. + CUSTOM = 2 + end + end + + # Request message for the ListRules RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. The [project] on which to execute the request. The format is: + # projects/\\{project_id}/locations/\\{location} + # Currently, the pre-defined rules are global available to all projects and + # all regions. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filter based on primary_category, secondary_category. + # @!attribute [rw] custom_rules_bucket + # @return [::String] + # The Cloud Storage bucket name for custom rules. + # @!attribute [rw] evaluation_type + # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] + # Optional. The evaluation type of the rules will be applied to. + # The Cloud Storage bucket name for custom rules. + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListRules RPC. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::WorkloadManager::V1::Rule>] + # All rules in response. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListScannedResources RPC. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent for ListScannedResourcesRequest. + # @!attribute [rw] rule + # @return [::String] + # Rule name. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + class ListScannedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListScannedResources RPC. + # @!attribute [rw] scanned_resources + # @return [::Array<::Google::Cloud::WorkloadManager::V1::ScannedResource>] + # All scanned resources in response. + # @!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 ListScannedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A scanned resource. + # @!attribute [rw] resource + # @return [::String] + # Resource name. + # @!attribute [rw] type + # @return [::String] + # Resource type. + class ScannedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..3f57a4f6919e --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-workload_manager-v1", path: "../" +else + gem "google-cloud-workload_manager-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json new file mode 100644 index 000000000000..c3535bc37380 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json @@ -0,0 +1,495 @@ +{ + "client_library": { + "name": "google-cloud-workload_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workloadmanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync", + "title": "Snippet for the list_evaluations call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations.", + "file": "workload_manager/list_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluations", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "ListEvaluations", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListEvaluations", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync", + "title": "Snippet for the get_evaluation call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation.", + "file": "workload_manager/get_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::Evaluation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "GetEvaluation", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetEvaluation", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync", + "title": "Snippet for the create_evaluation call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation.", + "file": "workload_manager/create_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_evaluation", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "CreateEvaluation", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.CreateEvaluation", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync", + "title": "Snippet for the update_evaluation call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation.", + "file": "workload_manager/update_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_evaluation", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "UpdateEvaluation", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.UpdateEvaluation", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync", + "title": "Snippet for the delete_evaluation call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation.", + "file": "workload_manager/delete_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "DeleteEvaluation", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteEvaluation", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync", + "title": "Snippet for the list_executions call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions.", + "file": "workload_manager/list_executions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_executions", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsResponse", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "ListExecutions", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutions", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetExecution_sync", + "title": "Snippet for the get_execution call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution.", + "file": "workload_manager/get_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_execution", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::GetExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::Execution", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "GetExecution", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetExecution", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync", + "title": "Snippet for the run_evaluation call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation.", + "file": "workload_manager/run_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_evaluation", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "RunEvaluation", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.RunEvaluation", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync", + "title": "Snippet for the delete_execution call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution.", + "file": "workload_manager/delete_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_execution", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "DeleteExecution", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteExecution", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync", + "title": "Snippet for the list_execution_results call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results.", + "file": "workload_manager/list_execution_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_execution_results", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "ListExecutionResults", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutionResults", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListRules_sync", + "title": "Snippet for the list_rules call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules.", + "file": "workload_manager/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::ListRulesResponse", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListRules", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync", + "title": "Snippet for the list_scanned_resources call in the WorkloadManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources.", + "file": "workload_manager/list_scanned_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scanned_resources", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse", + "client": { + "short_name": "WorkloadManager::Client", + "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" + }, + "method": { + "short_name": "ListScannedResources", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListScannedResources", + "service": { + "short_name": "WorkloadManager", + "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" + } + } + }, + "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-workload_manager-v1/snippets/workload_manager/create_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb new file mode 100644 index 000000000000..1aece099b45d --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the create_evaluation call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation. +# +def create_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new + + # Call the create_evaluation method. + result = client.create_evaluation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb new file mode 100644 index 000000000000..2f6820fedd08 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the delete_evaluation call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation. +# +def delete_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new + + # Call the delete_evaluation method. + result = client.delete_evaluation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb new file mode 100644 index 000000000000..a2da1aba213e --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the delete_execution call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution. +# +def delete_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new + + # Call the delete_execution method. + result = client.delete_execution request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb new file mode 100644 index 000000000000..ccff71e21d6a --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the get_evaluation call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation. +# +def get_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new + + # Call the get_evaluation method. + result = client.get_evaluation request + + # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. + p result +end +# [END workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb new file mode 100644 index 000000000000..27bb4d344b9d --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the get_execution call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution. +# +def get_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new + + # Call the get_execution method. + result = client.get_execution request + + # The returned object is of type Google::Cloud::WorkloadManager::V1::Execution. + p result +end +# [END workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb new file mode 100644 index 000000000000..68603a1e8d5d --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the list_evaluations call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations. +# +def list_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new + + # Call the list_evaluations method. + result = client.list_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. + p item + end +end +# [END workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb new file mode 100644 index 000000000000..51f4ecec13ca --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the list_execution_results call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results. +# +def list_execution_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new + + # Call the list_execution_results method. + result = client.list_execution_results request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. + p item + end +end +# [END workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb new file mode 100644 index 000000000000..ad283aac7f33 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the list_executions call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions. +# +def list_executions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution. + p item + end +end +# [END workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb new file mode 100644 index 000000000000..39185ada886f --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_ListRules_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the list_rules call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules request + + # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. + p result +end +# [END workloadmanager_v1_generated_WorkloadManager_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb new file mode 100644 index 000000000000..bdf68829dd9a --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the list_scanned_resources call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources. +# +def list_scanned_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new + + # Call the list_scanned_resources method. + result = client.list_scanned_resources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. + p item + end +end +# [END workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb new file mode 100644 index 000000000000..7ebbf41e7974 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the run_evaluation call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation. +# +def run_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new + + # Call the run_evaluation method. + result = client.run_evaluation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb new file mode 100644 index 000000000000..5ba82a6abaec --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] +require "google/cloud/workload_manager/v1" + +## +# Snippet for the update_evaluation call in the WorkloadManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation. +# +def update_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new + + # Call the update_evaluation method. + result = client.update_evaluation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb new file mode 100644 index 000000000000..728a1dca8d8c --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workloadmanager/v1/service_pb" +require "google/cloud/workloadmanager/v1/service_services_pb" +require "google/cloud/workload_manager/v1/workload_manager" + +class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb new file mode 100644 index 000000000000..1bce9f8de208 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_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/workload_manager/v1/workload_manager" + +class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_path project: "value0", location: "value1", evaluation: "value2" + assert_equal "projects/value0/locations/value1/evaluations/value2", path + 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.execution_path project: "value0", location: "value1", evaluation: "value2", execution: "value3" + assert_equal "projects/value0/locations/value1/evaluations/value2/executions/value3", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb new file mode 100644 index 000000000000..6e2379af24a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb @@ -0,0 +1,779 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/workloadmanager/v1/service_pb" +require "google/cloud/workload_manager/v1/workload_manager/rest" + + +class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new + http_response = OpenStruct.new 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_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluations_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_count + end + end + end + + def test_get_evaluation + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::Evaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_client_stub.call_count + end + end + end + + def test_create_evaluation + # Create test objects. + 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" + evaluation_id = "hello world" + evaluation = {} + request_id = "hello world" + + create_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_create_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_evaluation_client_stub.call_count + end + end + end + + def test_update_evaluation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + evaluation = {} + request_id = "hello world" + + update_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_update_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_evaluation_client_stub.call_count + end + end + end + + def test_delete_evaluation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_evaluation name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_evaluation({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_client_stub.call_count + end + end + end + + def test_list_executions + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::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" + 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_executions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_executions_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_count + end + end + end + + def test_get_execution + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::Execution.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_execution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_execution_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_execution({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_execution name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_execution({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation + # Create test objects. + 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" + execution_id = "hello world" + execution = {} + request_id = "hello world" + + run_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_run_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_evaluation_client_stub.call_count + end + end + end + + def test_delete_execution + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_execution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_execution_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_execution({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_execution name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_execution({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_execution_client_stub.call_count + end + end + end + + def test_list_execution_results + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_execution_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_execution_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_execution_results_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_execution_results_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + custom_rules_bucket = "hello world" + evaluation_type = :EVALUATION_TYPE_UNSPECIFIED + + list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_count + end + end + end + + def test_list_scanned_resources + # Create test objects. + client_result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_scanned_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_scanned_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scanned_resources_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb new file mode 100644 index 000000000000..bbb1a73f506a --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb @@ -0,0 +1,923 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workloadmanager/v1/service_pb" +require "google/cloud/workload_manager/v1/workload_manager" + +class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluations, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, 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_evaluations_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_rpc_count + end + end + + def test_get_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::V1::Evaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_evaluation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_evaluation_client_stub.call_rpc_count + end + end + + def test_create_evaluation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + evaluation_id = "hello world" + evaluation = {} + request_id = "hello world" + + create_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_evaluation, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["evaluation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_evaluation_client_stub.call_rpc_count + end + end + + def test_update_evaluation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + evaluation = {} + request_id = "hello world" + + update_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_evaluation, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_evaluation_client_stub.call_rpc_count + end + end + + def test_delete_evaluation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_evaluation name: name, request_id: request_id, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_evaluation({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_evaluation_client_stub.call_rpc_count + end + end + + def test_list_executions + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::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" + 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::WorkloadManager::V1::ListExecutionsRequest, 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_executions_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_rpc_count + end + end + + def test_get_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::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" + + get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_execution, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_execution_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_execution({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_execution name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_execution({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + execution_id = "hello world" + execution = {} + request_id = "hello world" + + run_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_evaluation, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["execution_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Execution), request["execution"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_evaluation_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_evaluation_client_stub.call_rpc_count + end + end + + def test_delete_execution + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_execution, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_execution_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_execution({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_execution name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_execution({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_execution_client_stub.call_rpc_count + end + end + + def test_list_execution_results + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_execution_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_execution_results, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_execution_results_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_execution_results_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + custom_rules_bucket = "hello world" + evaluation_type = :EVALUATION_TYPE_UNSPECIFIED + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListRulesRequest, 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["custom_rules_bucket"] + assert_equal :EVALUATION_TYPE_UNSPECIFIED, request["evaluation_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rules_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_rpc_count + end + end + + def test_list_scanned_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_scanned_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scanned_resources, name + assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rule"] + 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_scanned_resources_client_stub do + # Create client + c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.gitignore b/owl-bot-staging/google-cloud-workstations-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..6db623fc6fde --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..58a485375923 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-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..85f95a678c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb @@ -0,0 +1,2620 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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 result, 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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. Workstation configuration to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. + # @param boost_config [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/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 result, 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + # + # @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, port: 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. + # @param port [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + # + # @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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_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..2087f38ccf61 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..aa208259fcfa --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb @@ -0,0 +1,2445 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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 result, 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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. Workstation configuration to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. + # @param boost_config [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/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 result, 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + # + # @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, port: 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. + # @param port [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + # @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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_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..c6115b5ff1ff --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..67ef7e156c15 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb @@ -0,0 +1,85 @@ +# 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/field_info_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\x1bgoogle/api/field_info.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\"\xf1\x0c\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12Y\n\rdomain_config\x18\x11 \x01(\x0b\x32=.google.cloud.workstations.v1.WorkstationCluster.DomainConfigB\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\x12S\n\x04tags\x18\x14 \x03(\x0b\x32:.google.cloud.workstations.v1.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12[\n\x0egateway_config\x18\x15 \x01(\x0b\x32>.google.cloud.workstations.v1.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\xea*\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12\x66\n\x15\x65phemeral_directories\x18\x16 \x03(\x0b\x32\x42.google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectoryB\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\x12\x1f\n\x12\x65nable_audit_agent\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\rallowed_ports\x18\x19 \x03(\x0b\x32\x39.google.cloud.workstations.v1.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x1a\x85\x0e\n\x04Host\x12X\n\x0cgce_instance\x18\x01 \x01(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstanceH\x00\x1a\x98\r\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\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12h\n\rboost_configs\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x07vm_tags\x18\x0e \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12v\n\x11instance_metadata\x18\x1b \x03(\x0b\x32V.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x85\x02\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xe3\x08\n\x13PersistentDirectory\x12o\n\x06gce_pd\x18\x02 \x01(\x0b\x32].google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12z\n\x06gce_hd\x18\x03 \x01(\x0b\x32h.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa4\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x8c\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x93\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32v.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\xa5\x02\n\x12\x45phemeralDirectory\x12\x66\n\x06gce_pd\x18\x03 \x01(\x0b\x32T.google.cloud.workstations.v1.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\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\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\x9b\r\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12m\n\x16persistent_directories\x18\x19 \x03(\x0b\x32H.google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectoryB\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\x12\x44\n\x03\x65nv\x18\x0c \x03(\x0b\x32\x32.google.cloud.workstations.v1.Workstation.EnvEntryB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12S\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x35.google.cloud.workstations.v1.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd1\x01\n\x0bRuntimeHost\x12\x62\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32\x45.google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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 +pool.add_serialized_file(descriptor_data) + +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 + WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.DomainConfig").msgclass + WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.GatewayConfig").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::Host::GceInstance::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.Accelerator").msgclass + WorkstationConfig::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfig").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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass + WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicy").enummodule + WorkstationConfig::EphemeralDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory").msgclass + WorkstationConfig::EphemeralDirectory::GcePersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory.GcePersistentDisk").msgclass + 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 + WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PortRange").msgclass + Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation").msgclass + Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectory").msgclass + Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost").msgclass + Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHost").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..792cd03236da --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb @@ -0,0 +1,88 @@ +# 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 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + 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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..6047b249e889 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb @@ -0,0 +1,1678 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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] + # Identifier. 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 [rw] domain_config + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::DomainConfig] + # Optional. Configuration options for a custom domain. + # @!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. The + # {::Google::Cloud::Workstations::V1::WorkstationCluster#conditions conditions} + # field contains detailed information about the status of the cluster. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation cluster's current + # state. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + # @!attribute [rw] gateway_config + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::GatewayConfig] + # Optional. Configuration options for Cluster HTTP Gateway. + # @!attribute [rw] workstation_authorization_url + # @return [::String] + # Optional. Specifies the redirect URL for unauthorized requests received by + # workstation VMs in this cluster. + # + # Redirects to this endpoint will send a base64 encoded `state` query param + # containing the target workstation name and original request hostname. The + # endpoint is responsible for retrieving a token using `GenerateAccessToken` + # and redirecting back to the original hostname with the token. + # @!attribute [rw] workstation_launch_url + # @return [::String] + # Optional. Specifies the launch URL for workstations in this cluster. + # Requests sent to unstarted workstations will be redirected to this URL. + # + # Requests redirected to the launch endpoint will be sent with a + # `workstation` and `project` query parameter containing the full workstation + # resource name and project ID, respectively. The launch endpoint is + # responsible for starting the workstation, polling it until it reaches + # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. + 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 attachment 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 + + # Configuration options for a custom domain. + # @!attribute [rw] domain + # @return [::String] + # Immutable. Domain used by Workstations for HTTP ingress. + class DomainConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration options for Cluster HTTP Gateway. + # @!attribute [rw] http2_enabled + # @return [::Boolean] + # Optional. Whether HTTP/2 is enabled for this workstation cluster. + # Defaults to false. + class GatewayConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + 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] + # Identifier. 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] max_usable_workstations + # @return [::Integer] + # Optional. Maximum number of workstations under this configuration a user + # can have `workstations.workstation.use` permission on. + # + # Only enforced on CreateWorkstation API calls on the user issuing the API + # request. Can be overridden by: + # + # - granting a user + # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, + # or + # - having a user with that permission create a workstation and + # granting another user `workstations.workstation.use` permission on + # that workstation. + # + # If not specified, defaults to `0`, which indicates unlimited. + # @!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] ephemeral_directories + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory>] + # Optional. Ephemeral directories which won't 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 workstation configuration is in degraded mode, in + # which case it may require user action to restore full functionality. The + # {::Google::Cloud::Workstations::V1::WorkstationConfig#conditions conditions} + # field contains detailed information about the status of the configuration. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation configuration's + # current state. + # @!attribute [rw] enable_audit_agent + # @return [::Boolean] + # Optional. Whether to enable Linux `auditd` logging on the workstation. When + # enabled, a + # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#service_account service_account} + # must also be specified that has `roles/logging.logWriter` and + # `roles/monitoring.metricWriter` on the project. Operating system audit + # logging is distinct from [Cloud Audit + # Logs](https://cloud.google.com/workstations/docs/audit-logging) and + # [Container output + # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). + # Operating system audit logs are available in the + # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: + # + # resource.type="gce_instance" + # log_name:"/logs/linux-auditd" + # @!attribute [rw] disable_tcp_connections + # @return [::Boolean] + # Optional. Disables support for plain TCP connections in the workstation. + # By default the service supports TCP connections through a websocket relay. + # Setting this option to true disables that relay, which prevents the usage + # of services that require plain TCP connections, such as SSH. + # When enabled, all communication must occur over HTTPS or WSS. + # @!attribute [rw] allowed_ports + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange>] + # Optional. A list of + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange PortRange}s + # specifying single ports or ranges of ports that are externally accessible + # in the workstation. Allowed ports must be one of 22, 80, or within range + # 1024-65535. If not specified defaults to ports 22, 80, and ports + # 1024-65535. + # @!attribute [rw] grant_workstation_admin_role_on_create + # @return [::Boolean] + # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` + # role along with `roles/workstations.user` role on the workstation created + # by them. This allows workstation users to share access to either their + # entire workstation, or individual ports. Defaults to false. + 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 `logging.logEntries.create` and + # `monitoring.timeSeries.create` permissions on the project so it can + # write logs out to Cloud Logging. If using a custom container image, the + # service account must have [Artifact Registry + # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) + # permission 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}. + # 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 using this workstation configuration. + # + # Defaults to false. + # + # 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. + # @!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. + # @!attribute [rw] accelerators + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] + # Optional. A list of the type and count of accelerator cards attached to + # the instance. + # @!attribute [rw] boost_configs + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig>] + # Optional. A list of the boost configurations that workstations created + # using this workstation configuration are allowed to use. If specified, + # users will have the option to choose from the list of boost configs + # when starting a workstation. + # @!attribute [rw] disable_ssh + # @return [::Boolean] + # Optional. Whether to disable SSH access to the VM. + # @!attribute [rw] vm_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to this instance. + # Tag keys and values have the same definition as [resource manager + # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). + # Keys must be in the format `tagKeys/{tag_key_id}`, and + # values are in the format `tagValues/456`. + # @!attribute [rw] startup_script_uri + # @return [::String] + # Optional. Link to the startup script stored in Cloud Storage. This + # script will be run on the host workstation VM when the VM is created. + # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If + # specifying a startup script, the service account must have [Permission + # to access the bucket and script file in Cloud + # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). + # Otherwise, the script must be publicly accessible. + # Note that the service regularly updates the OS version of the host VM, + # and it is the responsibility of the user to ensure the script stays + # compatible with the OS version. + # @!attribute [rw] instance_metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Custom metadata to apply to Compute Engine instances. + 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 + + # A boost configuration is a set of resources that a workstation can use + # to increase its performance. If you specify a boost configuration, upon + # startup, workstation users can choose to use a VM provisioned under the + # boost config by passing the boost config ID in the start request. If + # the workstation user does not provide a boost config ID in the start + # request, the system will choose a VM from the pool provisioned under + # the default config. + # @!attribute [rw] id + # @return [::String] + # Required. The ID to be used for the boost configuration. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. The type of machine that boosted VM instances will use—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). + # Defaults to `e2-standard-4`. + # @!attribute [rw] accelerators + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] + # Optional. A list of the type and count of accelerator cards attached + # to the boost instance. Defaults to `none`. + # @!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] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization on boosted Cloud + # Workstations VMs running using this boost configuration. + # + # Defaults to false. + # + # 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 + # boost configurations that specify a + # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} + # in the N1 or N2 machine series. + # @!attribute [rw] pool_size + # @return [::Integer] + # Optional. The number of boost VMs that the system should keep idle so + # that workstations can be boosted quickly. Defaults to `0`. + class BoostConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VmTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class InstanceMetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A directory to persist across workstation sessions. Updates to this field + # will not update existing workstations and will only take effect on new + # workstations. + # @!attribute [rw] gce_pd + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] + # A PersistentDirectory backed by a Compute Engine persistent disk. + # + # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gce_hd + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] + # A PersistentDirectory backed by a Compute Engine hyperdisk high + # availability disk. + # + # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!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 Persistent Directory 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] max_size_gb + # @return [::Integer] + # Optional. Maximum size in GB to which this persistent directory can be + # resized. Defaults to unlimited if not set. + # @!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. Must be formatted as ext4 file system with no + # partitions. + # @!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`. + # @!attribute [rw] archive_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait after initially creating or + # subsequently shutting down the workstation before converting its disk + # into a snapshot. This generally saves costs at the expense of greater + # startup time on next workstation start, as the service will need to + # create a disk from the archival snapshot. + # + # A value of `"0s"` indicates that the disk will never be archived. + 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 + + # A Persistent Directory backed by a Compute Engine + # [Hyperdisk Balanced High Availability + # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). + # This is a high-availability block storage solution that offers a balance + # between performance and cost for most general-purpose workloads. + # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} + # is set. + # + # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. + # Defaults to `200`. + # @!attribute [rw] max_size_gb + # @return [::Integer] + # Optional. Maximum size in GB to which this persistent directory can be + # resized. Defaults to unlimited if not set. + # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} + # must be empty. Must be formatted as ext4 file system with no + # partitions. + # @!attribute [rw] reclaim_policy + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] + # Optional. Whether the persistent disk should be deleted when the + # workstation is deleted. Valid values are `DELETE` and `RETAIN`. + # Defaults to `DELETE`. + # @!attribute [rw] archive_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait after initially creating or + # subsequently shutting down the workstation before converting its disk + # into a snapshot. This generally saves costs at the expense of greater + # startup time on next workstation start, as the service will need to + # create a disk from the archival snapshot. + # + # A value of `"0s"` indicates that the disk will never be archived. + class GceHyperdiskBalancedHighAvailability + 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::V1::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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} + # is set. Must be empty if + # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} + # is false. Updating + # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # will update content in the ephemeral directory after the workstation is + # restarted. + # + # Only file systems supported by Container-Optimized OS (COS) + # are explicitly supported. For a list of supported file systems, see + # [the filesystems available in Container-Optimized + # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). + # + # 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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # is set. Updating + # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} + # will update content in the ephemeral directory after the workstation is + # restarted. + # + # Only file systems supported by Container-Optimized OS (COS) + # are explicitly supported. For a list of supported file systems, please + # refer to the [COS + # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). + # + # 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::V1::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. + # If using a custom container image, the service account must have + # [Artifact Registry + # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) + # 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 + + # A PortRange defines a range of ports. Both + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} are + # inclusive. + # To specify a single port, both + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} + # should be the same. + # @!attribute [rw] first + # @return [::Integer] + # Required. Starting port number for the current range of ports. + # Valid ports are 22, 80, and ports within the range 1024-65535. + # @!attribute [rw] last + # @return [::Integer] + # Required. Ending port number for the current range of ports. + # Valid ports are 22, 80, and ports within the range 1024-65535. + class PortRange + 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] + # Identifier. 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 [rw] persistent_directories + # @return [::Array<::Google::Cloud::Workstations::V1::Workstation::WorkstationPersistentDirectory>] + # Optional. Directories to persist across workstation sessions. + # @!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}`. + # @!attribute [rw] env + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Environment variables passed to the workstation container's + # entrypoint. + # @!attribute [r] kms_key + # @return [::String] + # Output only. The name of the Google Cloud KMS encryption key used to + # encrypt this workstation. The KMS key can only be configured in the + # WorkstationConfig. The expected format is + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [rw] source_workstation + # @return [::String] + # Optional. The source workstation from which this workstation's persistent + # directories were cloned on creation. + # @!attribute [r] runtime_host + # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost] + # Optional. Output only. Runtime host for the workstation when in + # STATE_RUNNING. + class Workstation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A directory to persist across workstation sessions. Updates to this field + # will only take effect on this workstation after it is restarted. + # @!attribute [rw] mount_path + # @return [::String] + # Optional. The mount path of the persistent directory. + # @!attribute [rw] size_gb + # @return [::Integer] + # Optional. Size of the persistent directory in GB. If specified in an + # update request, this is the desired size of the directory. + class WorkstationPersistentDirectory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime host for the workstation. + # @!attribute [rw] gce_instance_host + # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost::GceInstanceHost] + # Specifies a Compute Engine instance as the host. + class RuntimeHost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The Compute Engine instance host. + # @!attribute [r] name + # @return [::String] + # Optional. Output only. The name of the Compute Engine instance. + # @!attribute [r] id + # @return [::String] + # Optional. Output only. The ID of the Compute Engine instance. + # @!attribute [r] zone + # @return [::String] + # Optional. Output only. The zone of the Compute Engine instance. + class GceInstanceHost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + 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 + + # @!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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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 result, 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 result, 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 result, 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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. Workstation configuration to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. + # @!attribute [rw] boost_config + # @return [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + 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 result, 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. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..52bdf0f508ad --- /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 + c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::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..cc8f0344b566 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb @@ -0,0 +1,1225 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation_cluster({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation_cluster name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation_cluster({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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" + boost_config = "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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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" + port = 42 + + 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 + c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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..545fb10d714e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb @@ -0,0 +1,1451 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions 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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation_cluster({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation_cluster name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstations_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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" + boost_config = "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"] + assert_equal "hello world", request["boost_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_workstation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, 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 + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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" + port = 42 + + 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"] + assert_equal 42, request["port"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_access_token_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..4f31bc6c1e9e --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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..141653bdb44a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.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" + ] + }, + "PushCredentials": { + "methods": [ + "push_credentials" + ] + } + } + } + } + } + } +} 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..b0bd3f899607 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-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..7aa5892babd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb @@ -0,0 +1,2728 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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 result, 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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. Workstation configuration to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + # + # @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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. + # @param boost_config [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/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 result, 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + # + # @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, port: 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. + # @param port [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + # + # @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 + + ## + # Pushes credentials to a running workstation on behalf of a user. Once + # complete, supported credential types (application_default_credentials) are + # made available to processes running in the user container. + # + # @overload push_credentials(request, options = nil) + # Pass arguments to `push_credentials` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload push_credentials(workstation: nil, application_default_credentials: nil) + # Pass arguments to `push_credentials` via keyword arguments. Note that at + # least one keyword argument is 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 [::String] + # Required. Name of the workstation for which the credentials should be + # pushed. + # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] + # Optional. Credentials used by Cloud Client Libraries, Google API Client + # Libraries, and other tooling within the user conainer: + # https://cloud.google.com/docs/authentication/application-default-credentials + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::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::PushCredentialsRequest.new + # + # # Call the push_credentials method. + # result = client.push_credentials request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def push_credentials request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.push_credentials.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"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.push_credentials.timeout, + metadata: metadata, + retry_policy: @config.rpcs.push_credentials.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :push_credentials, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_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 + ## + # RPC-specific configuration for `push_credentials` + # @return [::Gapic::Config::Method] + # + attr_reader :push_credentials + + # @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 + push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials + @push_credentials = ::Gapic::Config::Method.new push_credentials_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..620b2be83356 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..c39d1909ad91 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb @@ -0,0 +1,2546 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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 result, 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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. Workstation configuration to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. + # @param filter [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + # @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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. + # @param boost_config [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/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 result, 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + # + # @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, port: 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. + # @param port [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + # @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 + + ## + # Pushes credentials to a running workstation on behalf of a user. Once + # complete, supported credential types (application_default_credentials) are + # made available to processes running in the user container. + # + # @overload push_credentials(request, options = nil) + # Pass arguments to `push_credentials` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload push_credentials(workstation: nil, application_default_credentials: nil) + # Pass arguments to `push_credentials` via keyword arguments. Note that at + # least one keyword argument is 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 [::String] + # Required. Name of the workstation for which the credentials should be + # pushed. + # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] + # Optional. Credentials used by Cloud Client Libraries, Google API Client + # Libraries, and other tooling within the user conainer: + # https://cloud.google.com/docs/authentication/application-default-credentials + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @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::PushCredentialsRequest.new + # + # # Call the push_credentials method. + # result = client.push_credentials request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def push_credentials request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.push_credentials.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"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.push_credentials.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.push_credentials.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.push_credentials request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_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 + ## + # RPC-specific configuration for `push_credentials` + # @return [::Gapic::Config::Method] + # + attr_reader :push_credentials + + # @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 + push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials + @push_credentials = ::Gapic::Config::Method.new push_credentials_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..a100147caf77 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-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..1af97769fe62 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb @@ -0,0 +1,1372 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 + + ## + # Baseline implementation for the push_credentials REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def push_credentials request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_push_credentials_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "push_credentials", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_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 + + ## + # @private + # + # GRPC transcoding helper method for the push_credentials REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_push_credentials_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{workstation}:pushCredentials", + 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..7c7e03bcb3f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb @@ -0,0 +1,92 @@ +# 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/field_info_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\x1bgoogle/api/field_info.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\"\xc1\r\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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]\n\rdomain_config\x18\x11 \x01(\x0b\x32\x41.google.cloud.workstations.v1beta.WorkstationCluster.DomainConfigB\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\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x04tags\x18\x14 \x03(\x0b\x32>.google.cloud.workstations.v1beta.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12_\n\x0egateway_config\x18\x15 \x01(\x0b\x32\x42.google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\x9d\x32\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12Z\n\x0chttp_options\x18\x15 \x01(\x0b\x32?.google.cloud.workstations.v1beta.WorkstationConfig.HttpOptionsB\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12Y\n\rallowed_ports\x18\x19 \x03(\x0b\x32=.google.cloud.workstations.v1beta.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_pushing_credentials\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x1a\xc6\x12\n\x04Host\x12\\\n\x0cgce_instance\x18\x01 \x01(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstanceH\x00\x1a\xd5\x11\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\x12l\n\rboost_configs\x18\x19 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x07vm_tags\x18\x0e \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x0f \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12z\n\x11instance_metadata\x18\x1b \x03(\x0b\x32Z.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x86\x03\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12k\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x06 \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x1a\xa4\x02\n\x13ReservationAffinity\x12\x84\x01\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32].google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xf3\x08\n\x13PersistentDirectory\x12s\n\x06gce_pd\x18\x02 \x01(\x0b\x32\x61.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12~\n\x06gce_hd\x18\x03 \x01(\x0b\x32l.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa8\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x90\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x97\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32z.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1aw\n\x0bHttpOptions\x12<\n/allowed_unauthenticated_cors_preflight_requests\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1d\x64isable_localhost_replacement\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x32\n\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\xd6\x0f\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12q\n\x16persistent_directories\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectoryB\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\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12`\n\rboost_configs\x18\x10 \x03(\x0b\x32\x44.google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfigB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x39.google.cloud.workstations.v1beta.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x12\x15\n\x08\x64\x65graded\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x18 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a?\n\x16WorkstationBoostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07running\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xd5\x01\n\x0bRuntimeHost\x12\x66\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32I.google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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\"\xda\x02\n\x16PushCredentialsRequest\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12q\n\x1f\x61pplication_default_credentials\x18\x02 \x01(\x0b\x32\x43.google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthTokenB\x03\xe0\x41\x01\x1a\x86\x01\n\nOAuthToken\x12\x12\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06scopes\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61\x63\x63\x65ss_token\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x19\n\x17PushCredentialsMetadata\"\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\x87.\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*\x12\xa5\x02\n\x0fPushCredentials\x12\x38.google.cloud.workstations.v1beta.PushCredentialsRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41&\n\x0bWorkstation\x12\x17PushCredentialsMetadata\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02{\"v/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:pushCredentials:\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 +pool.add_serialized_file(descriptor_data) + +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 + WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.DomainConfig").msgclass + WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfig").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::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfig").msgclass + WorkstationConfig::Host::GceInstance::ReservationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity").msgclass + WorkstationConfig::Host::GceInstance::ReservationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.Type").enummodule + 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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass + WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.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 + WorkstationConfig::HttpOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.HttpOptions").msgclass + WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PortRange").msgclass + Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation").msgclass + Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectory").msgclass + Workstation::WorkstationBoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfig").msgclass + Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost").msgclass + Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHost").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 + PushCredentialsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest").msgclass + PushCredentialsRequest::OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthToken").msgclass + PushCredentialsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsMetadata").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..bddade12446d --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb @@ -0,0 +1,92 @@ +# 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 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. + # Once generated this token cannot be revoked and is good for the lifetime + # of the token. + rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse + # Pushes credentials to a running workstation on behalf of a user. Once + # complete, supported credential types (application_default_credentials) are + # made available to processes running in the user container. + rpc :PushCredentials, ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Google::Longrunning::Operation + 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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..b9791493eed8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb @@ -0,0 +1,1874 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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] + # Identifier. 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 [rw] domain_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::DomainConfig] + # Optional. Configuration options for a custom domain. + # @!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. The + # {::Google::Cloud::Workstations::V1beta::WorkstationCluster#conditions conditions} + # field contains detailed information about the status of the cluster. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation cluster's current + # state. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + # @!attribute [rw] gateway_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::GatewayConfig] + # Optional. Configuration options for Cluster HTTP Gateway. + # @!attribute [rw] workstation_authorization_url + # @return [::String] + # Optional. Specifies the redirect URL for unauthorized requests received by + # workstation VMs in this cluster. + # + # Redirects to this endpoint will send a base64 encoded `state` query param + # containing the target workstation name and original request hostname. The + # endpoint is responsible for retrieving a token using `GenerateAccessToken` + # and redirecting back to the original hostname with the token. + # @!attribute [rw] workstation_launch_url + # @return [::String] + # Optional. Specifies the launch URL for workstations in this cluster. + # Requests sent to unstarted workstations will be redirected to this URL. + # + # Requests redirected to the launch endpoint will be sent with a + # `workstation` and `project` query parameter containing the full workstation + # resource name and project ID, respectively. The launch endpoint is + # responsible for starting the workstation, polling it until it reaches + # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. + 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 attachment 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 + + # Configuration options for a custom domain. + # @!attribute [rw] domain + # @return [::String] + # Immutable. Domain used by Workstations for HTTP ingress. + class DomainConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration options for Cluster HTTP Gateway. + # @!attribute [rw] http2_enabled + # @return [::Boolean] + # Optional. Whether HTTP/2 is enabled for this workstation cluster. + # Defaults to false. + class GatewayConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + 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] + # Identifier. 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] max_usable_workstations + # @return [::Integer] + # Optional. Maximum number of workstations under this configuration a user + # can have `workstations.workstation.use` permission on. + # + # Only enforced on CreateWorkstation API calls on the user issuing the API + # request. Can be overridden by: + # + # - granting a user + # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, + # or + # - having a user with that permission create a workstation and + # granting another user `workstations.workstation.use` permission on + # that workstation. + # + # If not specified, defaults to `0`, which indicates unlimited. + # @!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 workstation configuration is in degraded mode, in + # which case it may require user action to restore full functionality. The + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#conditions conditions} + # field contains detailed information about the status of the configuration. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation configuration's + # current state. + # @!attribute [rw] enable_audit_agent + # @return [::Boolean] + # Optional. Whether to enable Linux `auditd` logging on the workstation. When + # enabled, a + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#service_account service_account} + # must also be specified that has `roles/logging.logWriter` and + # `roles/monitoring.metricWriter` on the project. Operating system audit + # logging is distinct from [Cloud Audit + # Logs](https://cloud.google.com/workstations/docs/audit-logging) and + # [Container output + # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). + # Operating system audit logs are available in the + # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: + # + # resource.type="gce_instance" + # log_name:"/logs/linux-auditd" + # @!attribute [rw] http_options + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::HttpOptions] + # Optional. HTTP options that customize the behavior of the workstation + # service's HTTP proxy. + # @!attribute [rw] disable_tcp_connections + # @return [::Boolean] + # Optional. Disables support for plain TCP connections in the workstation. + # By default the service supports TCP connections through a websocket relay. + # Setting this option to true disables that relay, which prevents the usage + # of services that require plain TCP connections, such as SSH. + # When enabled, all communication must occur over HTTPS or WSS. + # @!attribute [rw] allowed_ports + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange>] + # Optional. A list of + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange PortRange}s + # specifying single ports or ranges of ports that are externally accessible + # in the workstation. Allowed ports must be one of 22, 80, or within range + # 1024-65535. If not specified defaults to ports 22, 80, and ports + # 1024-65535. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [rw] grant_workstation_admin_role_on_create + # @return [::Boolean] + # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` + # role along with `roles/workstations.user` role on the workstation created + # by them. This allows workstation users to share access to either their + # entire workstation, or individual ports. Defaults to false. + # @!attribute [rw] enable_pushing_credentials + # @return [::Boolean] + # Optional. Enables pushing user provided credentials to Workstations by + # calling workstations.pushCredentials. If application_default_credentials + # are supplied to pushCredentials, the provided token is returned when tools + # and applications running in the user container make a request for Default + # Application Credentials. Please note that any credentials supplied are made + # available to all users with access to the workstation. + 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 `logging.logEntries.create` and + # `monitoring.timeSeries.create` permissions on the project so it can + # write logs out to Cloud Logging. If using a custom container image, the + # service account must have [Artifact Registry + # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) + # permission 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}. + # 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 using this workstation configuration. + # + # Defaults to false. + # + # 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. + # @!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. + # @!attribute [rw] boost_configs + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig>] + # Optional. A list of the boost configurations that workstations created + # using this workstation configuration are allowed to use. If specified, + # users will have the option to choose from the list of boost configs + # when starting a workstation. + # @!attribute [rw] disable_ssh + # @return [::Boolean] + # Optional. Whether to disable SSH access to the VM. + # @!attribute [rw] vm_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to this instance. + # Tag keys and values have the same definition as [resource manager + # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). + # Keys must be in the format `tagKeys/{tag_key_id}`, and + # values are in the format `tagValues/456`. + # @!attribute [rw] reservation_affinity + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] + # Optional. + # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + # specifies a reservation that can be consumed to create VM + # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations + # will only create VMs in the zone where the reservation is located. + # This would affect availability since the service will no longer be + # resilient to zonal outages. If ANY_RESERVATION is specified, creating + # reservations in both zones that the config creates VMs in will ensure + # higher availability. + # **Important Considerations for Reservation Affinity:** + # + # * This feature is intended for advanced users and requires + # familiarity with Google Compute Engine reservations. + # * Using reservations incurs charges, regardless of utilization. + # * The resources in the pool will consume the specified + # reservation. Take this into account when setting the + # pool size. + # @!attribute [rw] startup_script_uri + # @return [::String] + # Optional. Link to the startup script stored in Cloud Storage. This + # script will be run on the host workstation VM when the VM is created. + # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If + # specifying a startup script, the service account must have [Permission + # to access the bucket and script file in Cloud + # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). + # Otherwise, the script must be publicly accessible. + # Note that the service regularly updates the OS version of the host VM, + # and it is the responsibility of the user to ensure the script stays + # compatible with the OS version. + # @!attribute [rw] instance_metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Custom metadata to apply to Compute Engine instances. + 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 + + # A boost configuration is a set of resources that a workstation can use + # to increase its performance. If you specify a boost configuration, upon + # startup, workstation users can choose to use a VM provisioned under the + # boost config by passing the boost config ID in the start request. If + # the workstation user does not provide a boost config ID in the start + # request, the system will choose a VM from the pool provisioned under + # the default config. + # @!attribute [rw] id + # @return [::String] + # Required. The ID to be used for the boost configuration. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. The type of machine that boosted VM instances will use—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). + # Defaults to `e2-standard-4`. + # @!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 boost instance. Defaults to `none`. + # @!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] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization on boosted Cloud + # Workstations VMs running using this boost configuration. + # + # Defaults to false. + # + # 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 + # boost configurations that specify a + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} + # in the N1 or N2 machine series. + # @!attribute [rw] pool_size + # @return [::Integer] + # Optional. The number of boost VMs that the system should keep idle so + # that workstations can be boosted quickly. Defaults to `0`. + # @!attribute [rw] reservation_affinity + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] + # Optional. + # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + # specifies a reservation that can be consumed to create boost VM + # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations + # will only create VMs in the zone where the reservation is located. + # This would affect availability since the service will no longer be + # resilient to zonal outages. If ANY_RESERVATION is specified, creating + # reservations in both zones that the config creates VMs in will ensure + # higher availability. + # **Important Considerations for Reservation Affinity:** + # + # * This feature is intended for advanced users and requires + # familiarity with Google Compute Engine reservations. + # * Using reservations incurs charges, regardless of utilization. + # * The resources in the pool will consume the specified + # reservation. Take this into account when setting the + # pool size. + class BoostConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReservationAffinity is the configuration of the desired reservation + # from which instances can consume resources. + # @!attribute [rw] consume_reservation_type + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity::Type] + # Optional. Corresponds to the type of reservation consumption. + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of reservation resource. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of reservation resources. + # Valid values are either the name of a reservation in the same project + # or "projects/\\{project}/reservations/\\{reservation}" to target a shared + # reservation in the same zone but in a different project. + class ReservationAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether to consume capacity from a reservation or not. + module Type + # Default value. This should not be used. + TYPE_UNSPECIFIED = 0 + + # Do not consume from any reserved capacity. + NO_RESERVATION = 1 + + # Consume any reservation available. + ANY_RESERVATION = 2 + + # Must consume from a specific reservation. Must specify key value + # fields for specifying the reservations. + SPECIFIC_RESERVATION = 3 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VmTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class InstanceMetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A directory to persist across workstation sessions. Updates to this field + # will not update existing workstations and will only take effect on new + # workstations. + # @!attribute [rw] gce_pd + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] + # A PersistentDirectory backed by a Compute Engine persistent disk. + # + # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gce_hd + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] + # A PersistentDirectory backed by a Compute Engine hyperdisk high + # availability disk. + # + # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!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 Persistent Directory 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] max_size_gb + # @return [::Integer] + # Optional. Maximum size in GB to which this persistent directory can be + # resized. Defaults to unlimited if not set. + # @!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. Must be formatted as ext4 file system with no + # partitions. + # @!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`. + # @!attribute [rw] archive_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait after initially creating or + # subsequently shutting down the workstation before converting its disk + # into a snapshot. This generally saves costs at the expense of greater + # startup time on next workstation start, as the service will need to + # create a disk from the archival snapshot. + # + # A value of `"0s"` indicates that the disk will never be archived. + 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 + + # A Persistent Directory backed by a Compute Engine + # [Hyperdisk Balanced High Availability + # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). + # This is a high-availability block storage solution that offers a balance + # between performance and cost for most general-purpose workloads. + # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} + # is set. + # + # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. + # Defaults to `200`. + # @!attribute [rw] max_size_gb + # @return [::Integer] + # Optional. Maximum size in GB to which this persistent directory can be + # resized. Defaults to unlimited if not set. + # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} + # must be empty. Must be formatted as ext4 file system with no + # partitions. + # @!attribute [rw] reclaim_policy + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] + # Optional. Whether the persistent disk should be deleted when the + # workstation is deleted. Valid values are `DELETE` and `RETAIN`. + # Defaults to `DELETE`. + # @!attribute [rw] archive_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait after initially creating or + # subsequently shutting down the workstation before converting its disk + # into a snapshot. This generally saves costs at the expense of greater + # startup time on next workstation start, as the service will need to + # create a disk from the archival snapshot. + # + # A value of `"0s"` indicates that the disk will never be archived. + class GceHyperdiskBalancedHighAvailability + 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. Must be empty if + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} + # is false. Updating + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # will update content in the ephemeral directory after the workstation is + # restarted. + # + # Only file systems supported by Container-Optimized OS (COS) + # are explicitly supported. For a list of supported file systems, see + # [the filesystems available in Container-Optimized + # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). + # + # 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. + # + # Only file systems supported by Container-Optimized OS (COS) + # are explicitly supported. For a list of supported file systems, please + # refer to the [COS + # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). + # + # 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. + # If using a custom container image, the service account must have + # [Artifact Registry + # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) + # 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 + + # HTTP options for the running workstations. + # @!attribute [rw] allowed_unauthenticated_cors_preflight_requests + # @return [::Boolean] + # Optional. By default, the workstations service makes sure that all + # requests to the workstation are authenticated. CORS preflight requests do + # not include cookies or custom headers, and so are considered + # unauthenticated and blocked by the workstations service. Enabling this + # option allows these unauthenticated CORS preflight requests through to + # the workstation, where it becomes the responsibility of the destination + # server in the workstation to validate the request. + # @!attribute [rw] disable_localhost_replacement + # @return [::Boolean] + # Optional. By default, the workstations service replaces references to + # localhost, 127.0.0.1, and 0.0.0.0 with the workstation's hostname in http + # responses from the workstation so that applications under development run + # properly on the workstation. This may intefere with some applications, + # and so this option allows that behavior to be disabled. + class HttpOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A PortRange defines a range of ports. Both + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} + # and + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} + # are inclusive. To specify a single port, both + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} + # and + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} + # should be the same. + # @!attribute [rw] first + # @return [::Integer] + # Required. Starting port number for the current range of ports. + # Valid ports are 22, 80, and ports within the range 1024-65535. + # @!attribute [rw] last + # @return [::Integer] + # Required. Ending port number for the current range of ports. + # Valid ports are 22, 80, and ports within the range 1024-65535. + class PortRange + 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] + # Identifier. 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 [rw] persistent_directories + # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationPersistentDirectory>] + # Optional. Directories to persist across workstation sessions. + # @!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. + # @!attribute [r] kms_key + # @return [::String] + # Output only. The name of the Google Cloud KMS encryption key used to + # encrypt this workstation. The KMS key can only be configured in the + # WorkstationConfig. The expected format is + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [r] boost_configs + # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationBoostConfig>] + # Output only. List of available boost configuration IDs that this + # workstation can be boosted up to. + # @!attribute [rw] source_workstation + # @return [::String] + # Optional. The source workstation from which this workstation's persistent + # directories were cloned on creation. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] runtime_host + # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost] + # Optional. Output only. Runtime host for the workstation when in + # STATE_RUNNING. + # @!attribute [r] degraded + # @return [::Boolean] + # Output only. Whether this workstation is in degraded mode, in which case it + # may require user action to restore full functionality. The + # {::Google::Cloud::Workstations::V1beta::Workstation#conditions conditions} field + # contains detailed information about the status of the workstation. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation's current state. + class Workstation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A directory to persist across workstation sessions. Updates to this field + # will only take effect on this workstation after it is restarted. + # @!attribute [rw] mount_path + # @return [::String] + # Optional. The mount path of the persistent directory. + # @!attribute [rw] size_gb + # @return [::Integer] + # Optional. Size of the persistent directory in GB. If specified in an + # update request, this is the desired size of the directory. + class WorkstationPersistentDirectory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Boost configuration for this workstation. This object is populated from the + # parent workstation configuration. + # @!attribute [r] id + # @return [::String] + # Output only. Boost configuration ID. + # @!attribute [r] running + # @return [::Boolean] + # Output only. Whether or not the current workstation is actively boosted + # with this id. + class WorkstationBoostConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime host for the workstation. + # @!attribute [rw] gce_instance_host + # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost::GceInstanceHost] + # Specifies a Compute Engine instance as the host. + class RuntimeHost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The Compute Engine instance host. + # @!attribute [r] name + # @return [::String] + # Optional. Output only. The name of the Compute Engine instance. + # @!attribute [r] id + # @return [::String] + # Optional. Output only. The ID of the Compute Engine instance. + # @!attribute [r] zone + # @return [::String] + # Optional. Output only. The zone of the Compute Engine instance. + class GceInstanceHost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + 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 + + # @!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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the WorkstationClusters to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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 result, 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 result, 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 result, 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the WorkstationConfigs to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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. Workstation configuration to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the Workstations to be listed. Possible filters are + # described in https://google.aip.dev/160. + 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. If source_workstation is specified, the + # user must have `workstations.workstations.use` permission on the source + # workstation, and the Cloud Workstations Service Agent for the project where + # you are creating the new workstation must have compute.disks.createSnapshot + # and compute.snapshots.useReadOnly on the source project. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, 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 should be + # updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the result, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. + # @!attribute [rw] boost_config + # @return [::String] + # Optional. If set, the workstation starts using the boost configuration with + # the specified ID. + 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 result, 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. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Port for which the access token should be generated. If + # specified, the generated access token grants access only to the + # specified port of the workstation. If specified, values must be within the + # range [1 - 65535]. If not specified, the generated access token grants + # access to all ports of the workstation. + 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 + + # Request message for PushCredentials. + # @!attribute [rw] workstation + # @return [::String] + # Required. Name of the workstation for which the credentials should be + # pushed. + # @!attribute [rw] application_default_credentials + # @return [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken] + # Optional. Credentials used by Cloud Client Libraries, Google API Client + # Libraries, and other tooling within the user conainer: + # https://cloud.google.com/docs/authentication/application-default-credentials + class PushCredentialsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # OAuth token. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address encapsulated in the OAuth token. + # @!attribute [rw] scopes + # @return [::String] + # Optional. The scopes encapsulated in the OAuth token. + # See https://developers.google.com/identity/protocols/oauth2/scopes for + # more information. + # @!attribute [rw] access_token + # @return [::String] + # Required. The OAuth token. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time the OAuth access token will expire. This should be the + # time the access token was generated plus the expires_in offset returned + # from the Access Token Response. + class OAuthToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata message for PushCredentials. + class PushCredentialsMetadata + 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-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..2f6ae6f951ca --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json @@ -0,0 +1,855 @@ +{ + "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" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_PushCredentials_sync", + "title": "Snippet for the push_credentials call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials.", + "file": "workstations/push_credentials.rb", + "language": "RUBY", + "client_method": { + "short_name": "push_credentials", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::PushCredentialsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "PushCredentials", + "full_name": "google.cloud.workstations.v1beta.Workstations.PushCredentials", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "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-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/push_credentials.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb new file mode 100644 index 000000000000..a2f4b5c117f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_PushCredentials_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the push_credentials 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#push_credentials. +# +def push_credentials + # 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::PushCredentialsRequest.new + + # Call the push_credentials method. + result = client.push_credentials request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to 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_PushCredentials_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..af5378e9c6a7 --- /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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::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..2484c4f4930c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb @@ -0,0 +1,1280 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation_cluster({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation_cluster name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation_cluster({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_workstation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_workstation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_workstation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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" + filter = "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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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" + boost_config = "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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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" + port = 42 + + 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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials + # Create test objects. + 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 = "hello world" + application_default_credentials = {} + + push_credentials_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-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_push_credentials_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, push_credentials_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, push_credentials_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..b76165c92c75 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb @@ -0,0 +1,1516 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions 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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation_cluster({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation_cluster name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_workstation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_workstation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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" + filter = "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"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workstations_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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" + boost_config = "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"] + assert_equal "hello world", request["boost_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_workstation_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, 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 + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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" + port = 42 + + 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"] + assert_equal 42, request["port"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_access_token_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" + application_default_credentials = {} + + push_credentials_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :push_credentials, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, request + assert_equal "hello world", request["workstation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken), request["application_default_credentials"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, push_credentials_client_stub do + # Create client + c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, push_credentials_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore b/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json new file mode 100644 index 000000000000..b76a2b576cdf --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "developerknowledge.googleapis.com", + "api_shortname": "developerknowledge", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest", + "distribution_name": "google-developers-developer_knowledge-v1", + "is_cloud": true, + "language": "ruby", + "name": "developerknowledge", + "name_pretty": "Developer Knowledge V1 API", + "product_documentation": "https://developers.google.com/knowledge", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/knowledge", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml b/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml new file mode 100644 index 000000000000..eca990fb3b4d --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-developers-developer_knowledge-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-developers-developer_knowledge-v1.rb" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/.yardopts b/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts new file mode 100644 index 000000000000..029e31f7886d --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Developer Knowledge 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-developers-developer_knowledge-v1/AUTHENTICATION.md b/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..cb46050750cd --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1" + +client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/developers/developer_knowledge/v1" + +::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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/developers/developer_knowledge/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-v1/CHANGELOG.md b/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md b/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/README.md new file mode 100644 index 000000000000..b4b5340b19fc --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Developer Knowledge V1 API + +The Developer Knowledge API provides access to Google's developer knowledge. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Developer Knowledge V1 API. Most users should consider using +the main client gem, +[google-developers-developer_knowledge](https://rubygems.org/gems/google-developers-developer_knowledge). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-developers-developer_knowledge-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/developerknowledge.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/developers/developer_knowledge/v1" + +client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new +request = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new # (request fields as keyword arguments...) +response = client.search_document_chunks request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/knowledge) +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/developers/developer_knowledge/v1" +require "logger" + +client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-developers-developer_knowledge`, +and lower-level _versioned_ client libraries with names such as +`google-developers-developer_knowledge-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-developers-developer_knowledge`. +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-developers-developer_knowledge-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-developers-developer_knowledge-v1/Rakefile b/owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile new file mode 100644 index 000000000000..ca756f3b2f8a --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1/developer_knowledge/credentials" + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-developers-developer_knowledge-v1" + header "google-developers-developer_knowledge-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-developers-developer_knowledge-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1/gapic_metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json new file mode 100644 index 000000000000..37fb4a1b5f6d --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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.developers.knowledge.v1", + "libraryPackage": "::Google::Developers::DeveloperKnowledge::V1", + "services": { + "DeveloperKnowledge": { + "clients": { + "grpc": { + "libraryClient": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client", + "rpcs": { + "SearchDocumentChunks": { + "methods": [ + "search_document_chunks" + ] + }, + "GetDocument": { + "methods": [ + "get_document" + ] + }, + "BatchGetDocuments": { + "methods": [ + "batch_get_documents" + ] + }, + "AnswerQuery": { + "methods": [ + "answer_query" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec b/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec new file mode 100644 index 000000000000..ff236befee57 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/developers/developer_knowledge/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-developers-developer_knowledge-v1" + gem.version = Google::Developers::DeveloperKnowledge::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details." + gem.summary = "The Developer Knowledge API provides access to Google's developer knowledge." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb new file mode 100644 index 000000000000..b1e644ed99d8 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-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/developers/developer_knowledge/v1" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb new file mode 100644 index 000000000000..d9cee294ec23 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge" +require "google/developers/developer_knowledge/v1/version" + +module Google + module Developers + module DeveloperKnowledge + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/developers/developer_knowledge/v1" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/developers/developer_knowledge/v1" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/developers/developer_knowledge/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb new file mode 100644 index 000000000000..e18de241d98e --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/developers/developer_knowledge/v1/version" + +require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" +require "google/developers/developer_knowledge/v1/developer_knowledge/paths" +require "google/developers/developer_knowledge/v1/developer_knowledge/client" +require "google/developers/developer_knowledge/v1/developer_knowledge/rest" + +module Google + module Developers + module DeveloperKnowledge + module V1 + ## + # The Developer Knowledge API provides programmatic access to Google's public + # developer documentation, enabling you to integrate this knowledge base into + # your own applications and workflows. + # + # The API is designed to be the canonical source for machine-readable access to + # Google's developer documentation. + # + # A typical use case is to first use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} + # to find relevant page URIs based on a query, and then use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to fetch the full content of the top results. + # + # All document content is provided in Markdown format. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/developers/developer_knowledge/v1/developer_knowledge" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + module DeveloperKnowledge + end + end + end + end +end + +helper_path = ::File.join __dir__, "developer_knowledge", "helpers.rb" +require "google/developers/developer_knowledge/v1/developer_knowledge/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb new file mode 100644 index 000000000000..5b31292cee99 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb @@ -0,0 +1,847 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/developers/knowledge/v1/developerknowledge_pb" + +module Google + module Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + ## + # Client for the DeveloperKnowledge service. + # + # The Developer Knowledge API provides programmatic access to Google's public + # developer documentation, enabling you to integrate this knowledge base into + # your own applications and workflows. + # + # The API is designed to be the canonical source for machine-readable access to + # Google's developer documentation. + # + # A typical use case is to first use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} + # to find relevant page URIs based on a query, and then use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to fetch the full content of the top results. + # + # All document content is provided in Markdown format. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_knowledge_stub + + ## + # Configure the DeveloperKnowledge Client class. + # + # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperKnowledge clients + # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 + default_config.rpcs.get_document.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_documents.timeout = 60.0 + default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @developer_knowledge_stub.universe_domain + end + + ## + # Create a new DeveloperKnowledge client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperKnowledge 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/developers/knowledge/v1/developerknowledge_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 + + @developer_knowledge_stub = ::Gapic::ServiceStub.new( + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @developer_knowledge_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 + @developer_knowledge_stub.logger + end + + # Service calls + + ## + # Searches for developer knowledge across Google's developer documentation. + # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s + # based on the user's query. There may be many chunks from the same + # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full + # documents, use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # with the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} + # returned in the + # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. + # + # @overload search_document_chunks(request, options = nil) + # Pass arguments to `search_document_chunks` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `search_document_chunks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param query [::String] + # Required. Provides the raw query string provided by the user, such as "How + # to create a Cloud Storage bucket?". + # @param page_size [::Integer] + # Optional. Specifies the maximum number of results to return. The service + # may return fewer than this value. + # + # If unspecified, at most 5 results will be returned. + # + # The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. Contains a page token, received from a previous + # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Applies a strict filter to the search results. The expression + # supports a subset of the syntax described at https://google.aip.dev/160. + # + # While `SearchDocumentChunks` returns + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter + # is applied to `DocumentChunk.document` fields. + # + # Supported fields for filtering: + # + # * `data_source` (STRING): The source of the document, e.g. + # `docs.cloud.google.com`. See + # https://developers.google.com/knowledge/reference/corpus-reference for + # the complete list of data sources in the corpus. + # * `update_time` (TIMESTAMP): The timestamp of when the document was last + # meaningfully updated. A meaningful update is one that changes document's + # markdown content or metadata. + # * `uri` (STRING): The document URI, e.g. + # `https://docs.cloud.google.com/bigquery/docs/tables`. + # + # STRING fields support `=` (equals) and `!=` (not equals) operators for + # **exact match** on the whole string. Partial match, prefix match, and + # regexp match are not supported. + # + # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. + # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. + # + # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on + # the right-hand side of filtering expressions must be string literals + # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). + # + # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical + # operators. `OR` has higher precedence than `AND`. Use parentheses for + # explicit precedence grouping. + # + # Examples: + # + # * `data_source = "docs.cloud.google.com" OR data_source = + # "firebase.google.com"` + # * `data_source != "firebase.google.com"` + # * `update_time < "2024-01-01T00:00:00Z"` + # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = + # "developer.chrome.com" OR data_source = "web.dev")` + # * `uri = "https://docs.cloud.google.com/release-notes"` + # + # The `filter` string must not exceed 500 characters; values longer than 500 + # characters will result in an `INVALID_ARGUMENT` error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new + # + # # Call the search_document_chunks method. + # result = client.search_document_chunks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. + # p item + # end + # + def search_document_chunks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest + + # Converts hash and nil to 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_document_chunks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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_document_chunks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_document_chunks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.call_rpc :search_document_chunks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single document with its full Markdown content. + # + # @overload get_document(request, options = nil) + # Pass arguments to `get_document` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_document(name: nil, view: nil) + # Pass arguments to `get_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Specifies the name of the document to retrieve. + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # defaults to `DOCUMENT_VIEW_CONTENT`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::Document] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::Document] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new + # + # # Call the get_document method. + # result = client.get_document request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. + # p result + # + def get_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.call_rpc :get_document, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves multiple documents, each with its full Markdown content. + # + # @overload batch_get_documents(request, options = nil) + # Pass arguments to `batch_get_documents` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_get_documents(names: nil, view: nil) + # Pass arguments to `batch_get_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param names [::Array<::String>] + # Required. Specifies the names of the documents to retrieve. A maximum of 20 + # documents can be retrieved in a batch. The documents are returned in the + # same order as the `names` in the request. + # + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # defaults to `DOCUMENT_VIEW_CONTENT`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new + # + # # Call the batch_get_documents method. + # result = client.batch_get_documents request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. + # p result + # + def batch_get_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_get_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.batch_get_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.call_rpc :batch_get_documents, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Answers a query using grounded generation. + # + # @overload answer_query(request, options = nil) + # Pass arguments to `answer_query` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload answer_query(query: nil) + # Pass arguments to `answer_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param query [::String] + # Required. The query to answer. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new + # + # # Call the answer_query method. + # result = client.answer_query request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. + # p result + # + def answer_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.answer_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.answer_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.answer_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.call_rpc :answer_query, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DeveloperKnowledge API. + # + # This class represents the configuration for DeveloperKnowledge, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search_document_chunks to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search_document_chunks.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search_document_chunks.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DeveloperKnowledge API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search_document_chunks` + # @return [::Gapic::Config::Method] + # + attr_reader :search_document_chunks + ## + # RPC-specific configuration for `get_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_document + ## + # RPC-specific configuration for `batch_get_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_documents + ## + # RPC-specific configuration for `answer_query` + # @return [::Gapic::Config::Method] + # + attr_reader :answer_query + + # @private + def initialize parent_rpcs = nil + search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks + @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config + get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document + @get_document = ::Gapic::Config::Method.new get_document_config + batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents + @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config + answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query + @answer_query = ::Gapic::Config::Method.new answer_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb new file mode 100644 index 000000000000..4d6b73d55cf7 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + # Credentials for the DeveloperKnowledge 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-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb new file mode 100644 index 000000000000..6389c8f3c5e6 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + # Path helper methods for the DeveloperKnowledge API. + module Paths + ## + # Create a fully-qualified Document resource string. + # + # The resource will be in the following format: + # + # `documents/{document}` + # + # @param document [String] + # + # @return [::String] + def document_path document: + "documents/#{document}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb new file mode 100644 index 000000000000..6b7630f75bd6 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/developers/developer_knowledge/v1/version" + +require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" +require "google/developers/developer_knowledge/v1/developer_knowledge/paths" +require "google/developers/developer_knowledge/v1/developer_knowledge/rest/client" + +module Google + module Developers + module DeveloperKnowledge + module V1 + ## + # The Developer Knowledge API provides programmatic access to Google's public + # developer documentation, enabling you to integrate this knowledge base into + # your own applications and workflows. + # + # The API is designed to be the canonical source for machine-readable access to + # Google's developer documentation. + # + # A typical use case is to first use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} + # to find relevant page URIs based on a query, and then use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to fetch the full content of the top results. + # + # All document content is provided in Markdown format. + # + # To load this service and instantiate a REST client: + # + # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + module DeveloperKnowledge + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/developers/developer_knowledge/v1/developer_knowledge/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb new file mode 100644 index 000000000000..a0c05ad489da --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb @@ -0,0 +1,800 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/developers/knowledge/v1/developerknowledge_pb" +require "google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub" + +module Google + module Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + module Rest + ## + # REST client for the DeveloperKnowledge service. + # + # The Developer Knowledge API provides programmatic access to Google's public + # developer documentation, enabling you to integrate this knowledge base into + # your own applications and workflows. + # + # The API is designed to be the canonical source for machine-readable access to + # Google's developer documentation. + # + # A typical use case is to first use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} + # to find relevant page URIs based on a query, and then use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to fetch the full content of the top results. + # + # All document content is provided in Markdown format. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_knowledge_stub + + ## + # Configure the DeveloperKnowledge Client class. + # + # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperKnowledge clients + # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 + default_config.rpcs.get_document.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_documents.timeout = 60.0 + default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 + @developer_knowledge_stub.universe_domain + end + + ## + # Create a new DeveloperKnowledge REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperKnowledge 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 + + @developer_knowledge_stub = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @developer_knowledge_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 + @developer_knowledge_stub.logger + end + + # Service calls + + ## + # Searches for developer knowledge across Google's developer documentation. + # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s + # based on the user's query. There may be many chunks from the same + # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full + # documents, use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # with the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} + # returned in the + # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. + # + # @overload search_document_chunks(request, options = nil) + # Pass arguments to `search_document_chunks` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `search_document_chunks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param query [::String] + # Required. Provides the raw query string provided by the user, such as "How + # to create a Cloud Storage bucket?". + # @param page_size [::Integer] + # Optional. Specifies the maximum number of results to return. The service + # may return fewer than this value. + # + # If unspecified, at most 5 results will be returned. + # + # The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. Contains a page token, received from a previous + # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Applies a strict filter to the search results. The expression + # supports a subset of the syntax described at https://google.aip.dev/160. + # + # While `SearchDocumentChunks` returns + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter + # is applied to `DocumentChunk.document` fields. + # + # Supported fields for filtering: + # + # * `data_source` (STRING): The source of the document, e.g. + # `docs.cloud.google.com`. See + # https://developers.google.com/knowledge/reference/corpus-reference for + # the complete list of data sources in the corpus. + # * `update_time` (TIMESTAMP): The timestamp of when the document was last + # meaningfully updated. A meaningful update is one that changes document's + # markdown content or metadata. + # * `uri` (STRING): The document URI, e.g. + # `https://docs.cloud.google.com/bigquery/docs/tables`. + # + # STRING fields support `=` (equals) and `!=` (not equals) operators for + # **exact match** on the whole string. Partial match, prefix match, and + # regexp match are not supported. + # + # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. + # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. + # + # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on + # the right-hand side of filtering expressions must be string literals + # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). + # + # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical + # operators. `OR` has higher precedence than `AND`. Use parentheses for + # explicit precedence grouping. + # + # Examples: + # + # * `data_source = "docs.cloud.google.com" OR data_source = + # "firebase.google.com"` + # * `data_source != "firebase.google.com"` + # * `update_time < "2024-01-01T00:00:00Z"` + # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = + # "developer.chrome.com" OR data_source = "web.dev")` + # * `uri = "https://docs.cloud.google.com/release-notes"` + # + # The `filter` string must not exceed 500 characters; values longer than 500 + # characters will result in an `INVALID_ARGUMENT` error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new + # + # # Call the search_document_chunks method. + # result = client.search_document_chunks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. + # p item + # end + # + def search_document_chunks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest + + # Converts hash and nil to an 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_document_chunks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_document_chunks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_document_chunks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.search_document_chunks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, "results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single document with its full Markdown content. + # + # @overload get_document(request, options = nil) + # Pass arguments to `get_document` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_document(name: nil, view: nil) + # Pass arguments to `get_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Specifies the name of the document to retrieve. + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} + # defaults to `DOCUMENT_VIEW_CONTENT`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::Document] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new + # + # # Call the get_document method. + # result = client.get_document request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. + # p result + # + def get_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.get_document request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves multiple documents, each with its full Markdown content. + # + # @overload batch_get_documents(request, options = nil) + # Pass arguments to `batch_get_documents` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_get_documents(names: nil, view: nil) + # Pass arguments to `batch_get_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param names [::Array<::String>] + # Required. Specifies the names of the documents to retrieve. A maximum of 20 + # documents can be retrieved in a batch. The documents are returned in the + # same order as the `names` in the request. + # + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # defaults to `DOCUMENT_VIEW_CONTENT`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new + # + # # Call the batch_get_documents method. + # result = client.batch_get_documents request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. + # p result + # + def batch_get_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_get_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.batch_get_documents request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Answers a query using grounded generation. + # + # @overload answer_query(request, options = nil) + # Pass arguments to `answer_query` via a request object, either of type + # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload answer_query(query: nil) + # Pass arguments to `answer_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param query [::String] + # Required. The query to answer. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/developers/developer_knowledge/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new + # + # # Call the answer_query method. + # result = client.answer_query request + # + # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. + # p result + # + def answer_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.answer_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.answer_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.answer_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_knowledge_stub.answer_query request, 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 DeveloperKnowledge REST API. + # + # This class represents the configuration for DeveloperKnowledge 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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 + # # search_document_chunks to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search_document_chunks.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search_document_chunks.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" + + config_attr :endpoint, nil, ::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 DeveloperKnowledge API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search_document_chunks` + # @return [::Gapic::Config::Method] + # + attr_reader :search_document_chunks + ## + # RPC-specific configuration for `get_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_document + ## + # RPC-specific configuration for `batch_get_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_documents + ## + # RPC-specific configuration for `answer_query` + # @return [::Gapic::Config::Method] + # + attr_reader :answer_query + + # @private + def initialize parent_rpcs = nil + search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks + @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config + get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document + @get_document = ::Gapic::Config::Method.new get_document_config + batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents + @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config + answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query + @answer_query = ::Gapic::Config::Method.new answer_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb new file mode 100644 index 000000000000..2b64ff55126a --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb @@ -0,0 +1,320 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/developers/knowledge/v1/developerknowledge_pb" + +module Google + module Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + module Rest + ## + # REST service stub for the DeveloperKnowledge 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 search_document_chunks REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] + # A result object deserialized from the server's reply + def search_document_chunks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_document_chunks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_document_chunks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_document REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::Document] + # A result object deserialized from the server's reply + def get_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Developers::DeveloperKnowledge::V1::Document.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_get_documents REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] + # A result object deserialized from the server's reply + def batch_get_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_get_documents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the answer_query REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] + # A result object deserialized from the server's reply + def answer_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_answer_query_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "answer_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.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 search_document_chunks REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] + # 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_document_chunks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/documents:searchDocumentChunks", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_document REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^documents(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_documents REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_get_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/documents:batchGet", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the answer_query REST call + # + # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_answer_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1:answerQuery", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb new file mode 100644 index 000000000000..564abffb5326 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge/rest" +require "google/developers/developer_knowledge/v1/version" + +module Google + module Developers + module DeveloperKnowledge + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/developers/developer_knowledge/v1/rest" + # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb new file mode 100644 index 000000000000..27f225b083b3 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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 Developers + module DeveloperKnowledge + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb new file mode 100644 index 000000000000..1b5fb1c2dc8e --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/developers/knowledge/v1/developerknowledge.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 = "\n7google/developers/knowledge/v1/developerknowledge.proto\x12\x1egoogle.developers.knowledge.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x04view\x18\x08 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x03\x12!\n\x14\x63ontent_length_bytes\x18\t \x01(\x05\x42\x03\xe0\x41\x03:Z\xea\x41W\n*developerknowledge.googleapis.com/Document\x12\x14\x64ocuments/{document}*\tdocuments2\x08\x64ocument\"w\n\x1bSearchDocumentChunksRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"|\n\x1cSearchDocumentChunksResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.developers.knowledge.v1.DocumentChunk\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x12GetDocumentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"\x9e\x01\n\x18\x42\x61tchGetDocumentsRequest\x12\x41\n\x05names\x18\x01 \x03(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"X\n\x19\x42\x61tchGetDocumentsResponse\x12;\n\tdocuments\x18\x01 \x03(\x0b\x32(.google.developers.knowledge.v1.Document\"(\n\x12\x41nswerQueryRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\"M\n\x13\x41nswerQueryResponse\x12\x36\n\x06\x61nswer\x18\x01 \x01(\x0b\x32&.google.developers.knowledge.v1.Answer\"\xdb\x04\n\x06\x41nswer\x12\x13\n\x0b\x61nswer_text\x18\x01 \x01(\t\x12M\n\tcitations\x18\x02 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.AnswerCitationB\x03\xe0\x41\x03\x12O\n\nreferences\x18\x03 \x03(\x0b\x32\x36.google.developers.knowledge.v1.Answer.AnswerReferenceB\x03\xe0\x41\x03\x1a\x8f\x01\n\x0e\x41nswerCitation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.CitationSourceB\x03\xe0\x41\x03\x1a.\n\x0e\x43itationSource\x12\x1c\n\x0freference_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x1ay\n\x0f\x41nswerReference\x12[\n\x12\x64ocument_reference\x18\x01 \x01(\x0b\x32\x38.google.developers.knowledge.v1.Answer.DocumentReferenceB\x03\xe0\x41\x03H\x00\x42\t\n\x07\x63ontent\x1a_\n\x11\x44ocumentReference\x12J\n\x0e\x64ocument_chunk\x18\x01 \x01(\x0b\x32-.google.developers.knowledge.v1.DocumentChunkB\x03\xe0\x41\x03\"\xbb\x01\n\rDocumentChunk\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x08\x64ocument\x18\x04 \x01(\x0b\x32(.google.developers.knowledge.v1.DocumentB\x03\xe0\x41\x03*y\n\x0c\x44ocumentView\x12\x1d\n\x19\x44OCUMENT_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44OCUMENT_VIEW_BASIC\x10\x01\x12\x16\n\x12\x44OCUMENT_VIEW_FULL\x10\x02\x12\x19\n\x15\x44OCUMENT_VIEW_CONTENT\x10\x03\x32\x81\x06\n\x12\x44\x65veloperKnowledge\x12\xbd\x01\n\x14SearchDocumentChunks\x12;.google.developers.knowledge.v1.SearchDocumentChunksRequest\x1a<.google.developers.knowledge.v1.SearchDocumentChunksResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/documents:searchDocumentChunks\x12\x93\x01\n\x0bGetDocument\x12\x32.google.developers.knowledge.v1.GetDocumentRequest\x1a(.google.developers.knowledge.v1.Document\"&\xda\x41\x04name\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=documents/**}\x12\xa8\x01\n\x11\x42\x61tchGetDocuments\x12\x38.google.developers.knowledge.v1.BatchGetDocumentsRequest\x1a\x39.google.developers.knowledge.v1.BatchGetDocumentsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/documents:batchGet\x12\x92\x01\n\x0b\x41nswerQuery\x12\x32.google.developers.knowledge.v1.AnswerQueryRequest\x1a\x33.google.developers.knowledge.v1.AnswerQueryResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1:answerQuery:\x01*\x1aU\xca\x41!developerknowledge.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x02\n\"com.google.developers.knowledge.v1B\x17\x44\x65veloperKnowledgeProtoP\x01ZGgoogle.golang.org/genproto/googleapis/developers/knowledge/v1;knowledge\xaa\x02\'Google.Developers.DeveloperKnowledge.V1\xca\x02\'Google\\Developers\\DeveloperKnowledge\\V1\xea\x02*Google::Developers::DeveloperKnowledge::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Developers + module DeveloperKnowledge + module V1 + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Document").msgclass + SearchDocumentChunksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksRequest").msgclass + SearchDocumentChunksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksResponse").msgclass + GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.GetDocumentRequest").msgclass + BatchGetDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsRequest").msgclass + BatchGetDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsResponse").msgclass + AnswerQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryRequest").msgclass + AnswerQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryResponse").msgclass + Answer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer").msgclass + Answer::AnswerCitation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerCitation").msgclass + Answer::CitationSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.CitationSource").msgclass + Answer::AnswerReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerReference").msgclass + Answer::DocumentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.DocumentReference").msgclass + DocumentChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentChunk").msgclass + DocumentView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb new file mode 100644 index 000000000000..c89acbf572dd --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/developers/knowledge/v1/developerknowledge.proto for package 'Google.Developers.DeveloperKnowledge.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/developers/knowledge/v1/developerknowledge_pb' + +module Google + module Developers + module DeveloperKnowledge + module V1 + module DeveloperKnowledge + # The Developer Knowledge API provides programmatic access to Google's public + # developer documentation, enabling you to integrate this knowledge base into + # your own applications and workflows. + # + # The API is designed to be the canonical source for machine-readable access to + # Google's developer documentation. + # + # A typical use case is to first use + # [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks] + # to find relevant page URIs based on a query, and then use + # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] + # or + # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] + # to fetch the full content of the top results. + # + # All document content is provided in Markdown format. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.developers.knowledge.v1.DeveloperKnowledge' + + # Searches for developer knowledge across Google's developer documentation. + # Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s + # based on the user's query. There may be many chunks from the same + # [Document][google.developers.knowledge.v1.Document]. To retrieve full + # documents, use + # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] + # or + # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] + # with the + # [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] + # returned in the + # [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results]. + rpc :SearchDocumentChunks, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse + # Retrieves a single document with its full Markdown content. + rpc :GetDocument, ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Google::Developers::DeveloperKnowledge::V1::Document + # Retrieves multiple documents, each with its full Markdown content. + rpc :BatchGetDocuments, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse + # Answers a query using grounded generation. + rpc :AnswerQuery, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md new file mode 100644 index 000000000000..76079269bdd8 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Developer Knowledge 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-developers-developer_knowledge-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb new file mode 100644 index 000000000000..60e74d520a79 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb @@ -0,0 +1,371 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Developers + module DeveloperKnowledge + module V1 + # A Document represents a piece of content from the Developer Knowledge corpus. + # @!attribute [rw] name + # @return [::String] + # Identifier. Contains the resource name of the document. + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @!attribute [r] uri + # @return [::String] + # Output only. Provides the URI of the content, such as + # `docs.cloud.google.com/storage/docs/creating-buckets`. + # @!attribute [r] content + # @return [::String] + # Output only. Contains the full content of the document in Markdown format. + # @!attribute [r] description + # @return [::String] + # Output only. Provides a description of the document. + # @!attribute [r] data_source + # @return [::String] + # Output only. Specifies the data source of the document. + # Example data source: `firebase.google.com` + # @!attribute [r] title + # @return [::String] + # Output only. Provides the title of the document. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Represents the timestamp when the content or metadata of the + # document was last updated. + # @!attribute [r] view + # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Output only. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. + # @!attribute [r] content_length_bytes + # @return [::Integer] + # Output only. The length of the `content` field in bytes. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. + # @!attribute [rw] query + # @return [::String] + # Required. Provides the raw query string provided by the user, such as "How + # to create a Cloud Storage bucket?". + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Specifies the maximum number of results to return. The service + # may return fewer than this value. + # + # If unspecified, at most 5 results will be returned. + # + # The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Contains a page token, received from a previous + # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Applies a strict filter to the search results. The expression + # supports a subset of the syntax described at https://google.aip.dev/160. + # + # While `SearchDocumentChunks` returns + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter + # is applied to `DocumentChunk.document` fields. + # + # Supported fields for filtering: + # + # * `data_source` (STRING): The source of the document, e.g. + # `docs.cloud.google.com`. See + # https://developers.google.com/knowledge/reference/corpus-reference for + # the complete list of data sources in the corpus. + # * `update_time` (TIMESTAMP): The timestamp of when the document was last + # meaningfully updated. A meaningful update is one that changes document's + # markdown content or metadata. + # * `uri` (STRING): The document URI, e.g. + # `https://docs.cloud.google.com/bigquery/docs/tables`. + # + # STRING fields support `=` (equals) and `!=` (not equals) operators for + # **exact match** on the whole string. Partial match, prefix match, and + # regexp match are not supported. + # + # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. + # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. + # + # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on + # the right-hand side of filtering expressions must be string literals + # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). + # + # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical + # operators. `OR` has higher precedence than `AND`. Use parentheses for + # explicit precedence grouping. + # + # Examples: + # + # * `data_source = "docs.cloud.google.com" OR data_source = + # "firebase.google.com"` + # * `data_source != "firebase.google.com"` + # * `update_time < "2024-01-01T00:00:00Z"` + # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = + # "developer.chrome.com" OR data_source = "web.dev")` + # * `uri = "https://docs.cloud.google.com/release-notes"` + # + # The `filter` string must not exceed 500 characters; values longer than 500 + # characters will result in an `INVALID_ARGUMENT` error. + class SearchDocumentChunksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. + # @!attribute [rw] results + # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] + # Contains the search results for the given query. Each + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk} in this list + # contains a snippet of content relevant to the search query. Use the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} + # field of each result with + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to retrieve the full document content. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. Provides a token that can be sent as `page_token` to retrieve the + # next page. If this field is omitted, there are no subsequent pages. + class SearchDocumentChunksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}. + # @!attribute [rw] name + # @return [::String] + # Required. Specifies the name of the document to retrieve. + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @!attribute [rw] view + # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # defaults to `DOCUMENT_VIEW_CONTENT`. + class GetDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. Specifies the names of the documents to retrieve. A maximum of 20 + # documents can be retrieved in a batch. The documents are returned in the + # same order as the `names` in the request. + # + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @!attribute [rw] view + # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] + # Optional. Specifies the + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the + # document. If unspecified, + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # defaults to `DOCUMENT_VIEW_CONTENT`. + class BatchGetDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. + # @!attribute [rw] documents + # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Document>] + # Contains the documents requested. + class BatchGetDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. + # @!attribute [rw] query + # @return [::String] + # Required. The query to answer. + class AnswerQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. + # @!attribute [rw] answer + # @return [::Google::Developers::DeveloperKnowledge::V1::Answer] + # The answer to the query. + class AnswerQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An answer to a query. + # @!attribute [rw] answer_text + # @return [::String] + # Contains the text of the answer. + # @!attribute [r] citations + # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerCitation>] + # Output only. Contains citations for the answer. + # @!attribute [r] references + # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference>] + # Output only. Contains references for the answer. + class Answer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Citation info for a segment. + # @!attribute [r] start_index + # @return [::Integer] + # Output only. Indicates the start of the segment, measured in bytes (UTF-8 + # unicode), inclusive. If there are multi-byte characters, such as + # non-ASCII characters, the index measurement is longer than the string + # length. + # @!attribute [r] end_index + # @return [::Integer] + # Output only. Indicates the end of the segment, measured in bytes (UTF-8 + # unicode), exclusive. If there are multi-byte characters, such as + # non-ASCII characters, the index measurement is longer than the string + # length. + # @!attribute [r] sources + # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::CitationSource>] + # Output only. Contains citation sources for the attributed segment. + class AnswerCitation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Citation source. + # @!attribute [r] reference_index + # @return [::Integer] + # Output only. Contains the index of the + # {::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference Answer.AnswerReference} + # in the `references` repeated field. + class CitationSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a reference to a source. + # @!attribute [r] document_reference + # @return [::Google::Developers::DeveloperKnowledge::V1::Answer::DocumentReference] + # Output only. The reference document. + class AnswerReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a reference to a document. + # @!attribute [r] document_chunk + # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentChunk] + # Output only. Contains the document chunk. The `document_chunk.id` field + # is not set and will be empty. + class DocumentReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A DocumentChunk represents a piece of content from a + # {::Google::Developers::DeveloperKnowledge::V1::Document Document} in the DeveloperKnowledge + # corpus. To fetch the entire document content, pass the `parent` to + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. + # @!attribute [r] parent + # @return [::String] + # Output only. Contains the resource name of the document this chunk is from. + # Format: `documents/{uri_without_scheme}` + # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` + # @!attribute [r] id + # @return [::String] + # Output only. Specifies the ID of this chunk within the document. The chunk + # ID is unique within a document, but not globally unique across documents. + # The chunk ID is not stable and may change over time. + # @!attribute [r] content + # @return [::String] + # Output only. Contains the content of the document chunk. + # @!attribute [r] document + # @return [::Google::Developers::DeveloperKnowledge::V1::Document] + # Output only. Represents metadata about the + # {::Google::Developers::DeveloperKnowledge::V1::Document Document} this chunk is from. The + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of this + # {::Google::Developers::DeveloperKnowledge::V1::Document Document} message will be set to + # `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients + # do not need to call + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # if they only need the metadata fields. Otherwise, clients should use + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # or + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} + # to fetch the full document content. + class DocumentChunk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies which fields of the + # {::Google::Developers::DeveloperKnowledge::V1::Document Document} are included. + module DocumentView + # The default / unset value. See each API method for its default value if + # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} is not + # specified. + DOCUMENT_VIEW_UNSPECIFIED = 0 + + # Includes only the basic metadata fields: + # + # - `name` + # - `uri` + # - `data_source` + # - `title` + # - `description` + # - `update_time` + # - `view` + # - `content_length_bytes` + # + # This is the default of view for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. + DOCUMENT_VIEW_BASIC = 1 + + # Includes all {::Google::Developers::DeveloperKnowledge::V1::Document Document} fields. + DOCUMENT_VIEW_FULL = 2 + + # Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. + # + # This is the default of view for + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} + # and + # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. + DOCUMENT_VIEW_CONTENT = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile new file mode 100644 index 000000000000..c5326ddd4ac6 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1", path: "../" +else + gem "google-developers-developer_knowledge-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-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb new file mode 100644 index 000000000000..1da8579829f3 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] +require "google/developers/developer_knowledge/v1" + +## +# Snippet for the answer_query call in the DeveloperKnowledge service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query. +# +def answer_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new + + # Call the answer_query method. + result = client.answer_query request + + # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. + p result +end +# [END developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb new file mode 100644 index 000000000000..6ea4b06d9af5 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] +require "google/developers/developer_knowledge/v1" + +## +# Snippet for the batch_get_documents call in the DeveloperKnowledge service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents. +# +def batch_get_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new + + # Call the batch_get_documents method. + result = client.batch_get_documents request + + # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. + p result +end +# [END developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb new file mode 100644 index 000000000000..8cee8fa202c9 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] +require "google/developers/developer_knowledge/v1" + +## +# Snippet for the get_document call in the DeveloperKnowledge service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document. +# +def get_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new + + # Call the get_document method. + result = client.get_document request + + # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. + p result +end +# [END developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb new file mode 100644 index 000000000000..bccd09dd9fcf --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] +require "google/developers/developer_knowledge/v1" + +## +# Snippet for the search_document_chunks call in the DeveloperKnowledge service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks. +# +def search_document_chunks + # Create a client object. The client can be reused for multiple calls. + client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new + + # Call the search_document_chunks method. + result = client.search_document_chunks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. + p item + end +end +# [END developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json new file mode 100644 index 000000000000..9a973865b831 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-developers-developer_knowledge-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.developers.knowledge.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync", + "title": "Snippet for the search_document_chunks call in the DeveloperKnowledge service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks.", + "file": "developer_knowledge/search_document_chunks.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_document_chunks", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks", + "async": false, + "parameters": [ + { + "type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest", + "name": "request" + } + ], + "result_type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse", + "client": { + "short_name": "DeveloperKnowledge::Client", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" + }, + "method": { + "short_name": "SearchDocumentChunks", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks", + "service": { + "short_name": "DeveloperKnowledge", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync", + "title": "Snippet for the get_document call in the DeveloperKnowledge service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document.", + "file": "developer_knowledge/get_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_document", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document", + "async": false, + "parameters": [ + { + "type": "::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Developers::DeveloperKnowledge::V1::Document", + "client": { + "short_name": "DeveloperKnowledge::Client", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" + }, + "method": { + "short_name": "GetDocument", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.GetDocument", + "service": { + "short_name": "DeveloperKnowledge", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync", + "title": "Snippet for the batch_get_documents call in the DeveloperKnowledge service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents.", + "file": "developer_knowledge/batch_get_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_documents", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse", + "client": { + "short_name": "DeveloperKnowledge::Client", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" + }, + "method": { + "short_name": "BatchGetDocuments", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments", + "service": { + "short_name": "DeveloperKnowledge", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync", + "title": "Snippet for the answer_query call in the DeveloperKnowledge service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query.", + "file": "developer_knowledge/answer_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "answer_query", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query", + "async": false, + "parameters": [ + { + "type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse", + "client": { + "short_name": "DeveloperKnowledge::Client", + "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" + }, + "method": { + "short_name": "AnswerQuery", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.AnswerQuery", + "service": { + "short_name": "DeveloperKnowledge", + "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" + } + } + }, + "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-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb new file mode 100644 index 000000000000..025870f575c3 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/developer_knowledge/v1/developer_knowledge" + +class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_document_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.document_path document: "value0" + assert_equal "documents/value0", path + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb new file mode 100644 index 000000000000..9521d08dc860 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb @@ -0,0 +1,320 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/developers/knowledge/v1/developerknowledge_pb" +require "google/developers/developer_knowledge/v1/developer_knowledge/rest" + + +class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks + # Create test objects. + client_result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + query = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + search_document_chunks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_search_document_chunks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_document_chunks_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_document_chunks_client_stub.call_count + end + end + end + + def test_get_document + # Create test objects. + client_result = ::Google::Developers::DeveloperKnowledge::V1::Document.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DOCUMENT_VIEW_UNSPECIFIED + + get_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_get_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_document_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_document({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_document name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_document({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_count + end + end + end + + def test_batch_get_documents + # Create test objects. + client_result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + names = ["hello world"] + view = :DOCUMENT_VIEW_UNSPECIFIED + + batch_get_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_batch_get_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_documents_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_get_documents({ names: names, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_get_documents names: names, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_get_documents({ names: names, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_documents_client_stub.call_count + end + end + end + + def test_answer_query + # Create test objects. + client_result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + query = "hello world" + + answer_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_answer_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, answer_query_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.answer_query({ query: query }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.answer_query query: query do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.answer_query({ query: query }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, answer_query_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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb new file mode 100644 index 000000000000..a43b73fefb45 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/knowledge/v1/developerknowledge_pb" +require "google/developers/developer_knowledge/v1/developer_knowledge" + +class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks + # Create GRPC objects. + grpc_response = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + query = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + search_document_chunks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_document_chunks, name + assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, request + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_document_chunks_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_document_chunks_client_stub.call_rpc_count + end + end + + def test_get_document + # Create GRPC objects. + grpc_response = ::Google::Developers::DeveloperKnowledge::V1::Document.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = :DOCUMENT_VIEW_UNSPECIFIED + + get_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_document, name + assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, request + assert_equal "hello world", request["name"] + assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_document_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_document({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_document name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_document({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_rpc_count + end + end + + def test_batch_get_documents + # Create GRPC objects. + grpc_response = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + names = ["hello world"] + view = :DOCUMENT_VIEW_UNSPECIFIED + + batch_get_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_documents, name + assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, request + assert_equal ["hello world"], request["names"] + assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_documents_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_get_documents({ names: names, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_get_documents names: names, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_get_documents({ names: names, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_documents_client_stub.call_rpc_count + end + end + + def test_answer_query + # Create GRPC objects. + grpc_response = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + query = "hello world" + + answer_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :answer_query, name + assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, request + assert_equal "hello world", request["query"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, answer_query_client_stub do + # Create client + c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.answer_query({ query: query }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.answer_query query: query do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.answer_query({ query: query }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, answer_query_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials-v1/.gitignore b/owl-bot-staging/google-iam-credentials-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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..f135131dde2c --- /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.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-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..6165a018ba38 --- /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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + 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..e50c0aa546c8 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb @@ -0,0 +1,33 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..e7e7c3b84421 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb @@ -0,0 +1,856 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..00f36f66f3e4 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb @@ -0,0 +1,785 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..e27e78574f32 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb @@ -0,0 +1,24 @@ +# 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 +pool.add_serialized_file(descriptor_data) + +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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-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..3b870f137cb7 --- /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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.sign_blob({ name: name, delegates: delegates, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.sign_blob name: name, delegates: delegates, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.sign_jwt name: name, delegates: delegates, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..6fc2459f3e5f --- /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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-v2/.gitignore b/owl-bot-staging/google-iam-v2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-v2/.repo-metadata.json b/owl-bot-staging/google-iam-v2/.repo-metadata.json new file mode 100644 index 000000000000..f361454bbf48 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://rubydoc.info/gems/google-iam-v2", + "distribution_name": "google-iam-v2", + "is_cloud": false, + "language": "ruby", + "name": "iam", + "name_pretty": "IAM V2 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. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/iam", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-v2/.rubocop.yml b/owl-bot-staging/google-iam-v2/.rubocop.yml new file mode 100644 index 000000000000..34e52b136070 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-v2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-iam-v2.rb" diff --git a/owl-bot-staging/google-iam-v2/.toys.rb b/owl-bot-staging/google-iam-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-v2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-iam-v2/.yardopts b/owl-bot-staging/google-iam-v2/.yardopts new file mode 100644 index 000000000000..74817379a031 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="IAM V2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-iam-v2/AUTHENTICATION.md b/owl-bot-staging/google-iam-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..6a0825ac614f --- /dev/null +++ b/owl-bot-staging/google-iam-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-v2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-iam-v2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/iam/v2" + +client = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/v2" + +::Google::Iam::V2::Policies::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::V2::Policies::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-v2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/iam/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::V2::Policies::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-v2/CHANGELOG.md b/owl-bot-staging/google-iam-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-v2/Gemfile b/owl-bot-staging/google-iam-v2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v2/LICENSE.md b/owl-bot-staging/google-iam-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-v2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-iam-v2/README.md b/owl-bot-staging/google-iam-v2/README.md new file mode 100644 index 000000000000..52e492f214ea --- /dev/null +++ b/owl-bot-staging/google-iam-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the IAM V2 API + +Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. + +Manages identity and access control policies for Google Cloud Platform 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 IAM V2 API. Most users should consider using +the main client gem, +[google-iam-client](https://rubygems.org/gems/google-iam-client). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-v2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/v2" + +client = ::Google::Iam::V2::Policies::Client.new +request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keyword arguments...) +response = client.list_policies request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-iam-v2) +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/v2" +require "logger" + +client = ::Google::Iam::V2::Policies::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam-client`, +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-client`. +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-v2/Rakefile b/owl-bot-staging/google-iam-v2/Rakefile new file mode 100644 index 000000000000..17091d3aff5d --- /dev/null +++ b/owl-bot-staging/google-iam-v2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-iam-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/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-v2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-iam-v2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-iam-v2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-iam-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-v2" + header "google-iam-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-iam-v2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-iam-v2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-iam-v2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-iam-v2/gapic_metadata.json b/owl-bot-staging/google-iam-v2/gapic_metadata.json new file mode 100644 index 000000000000..f9325ed5c881 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/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.iam.v2", + "libraryPackage": "::Google::Iam::V2", + "services": { + "Policies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V2::Policies::Client", + "rpcs": { + "ListPolicies": { + "methods": [ + "list_policies" + ] + }, + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "CreatePolicy": { + "methods": [ + "create_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, + "DeletePolicy": { + "methods": [ + "delete_policy" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec b/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec new file mode 100644 index 000000000000..e7bf97f93984 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-v2" + gem.version = Google::Iam::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control policies for Google Cloud Platform resources. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details." + gem.summary = "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb b/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb new file mode 100644 index 000000000000..976c5cee3515 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/iam/v2" diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb new file mode 100644 index 000000000000..fc5ba38b2a63 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v2/policies" +require "google/iam/v2/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v2" + # client = ::Google::Iam::V2::Policies::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v2" + # client = ::Google::Iam::V2::Policies::Rest::Client.new + # + module V2 + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/iam/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb new file mode 100644 index 000000000000..13a714e88610 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v2/deny.proto + +require 'google/protobuf' + +require 'google/type/expr_pb' + + +descriptor_data = "\n\x18google/iam/v2/deny.proto\x12\rgoogle.iam.v2\x1a\x16google/type/expr.proto\"\xab\x01\n\x08\x44\x65nyRule\x12\x19\n\x11\x64\x65nied_principals\x18\x01 \x03(\t\x12\x1c\n\x14\x65xception_principals\x18\x02 \x03(\t\x12\x1a\n\x12\x64\x65nied_permissions\x18\x03 \x03(\t\x12\x1d\n\x15\x65xception_permissions\x18\x04 \x03(\t\x12+\n\x10\x64\x65nial_condition\x18\x05 \x01(\x0b\x32\x11.google.type.ExprB{\n\x11\x63om.google.iam.v2B\rDenyRuleProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V2 + DenyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DenyRule").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb new file mode 100644 index 000000000000..7c30e2a1e284 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/iam/v2/version" + +require "google/iam/v2/policies/credentials" +require "google/iam/v2/policies/operations" +require "google/iam/v2/policies/client" +require "google/iam/v2/policies/rest" + +module Google + module Iam + module V2 + ## + # An interface for managing Identity and Access Management (IAM) policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v2/policies" + # client = ::Google::Iam::V2::Policies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v2/policies/rest" + # client = ::Google::Iam::V2::Policies::Rest::Client.new + # + module Policies + end + end + end +end + +helper_path = ::File.join __dir__, "policies", "helpers.rb" +require "google/iam/v2/policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb new file mode 100644 index 000000000000..9484b167af02 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb @@ -0,0 +1,989 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v2/policy_pb" + +module Google + module Iam + module V2 + module Policies + ## + # Client for the Policies service. + # + # An interface for managing Identity and Access Management (IAM) policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :policies_stub + + ## + # Configure the Policies Client class. + # + # See {::Google::Iam::V2::Policies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Policies clients + # ::Google::Iam::V2::Policies::Client.configure do |config| + # config.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", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_policies.timeout = 60.0 + default_config.rpcs.list_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_policy.timeout = 60.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_policy.timeout = 60.0 + default_config.rpcs.create_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy.timeout = 60.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_policy.timeout = 60.0 + default_config.rpcs.delete_policy.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 Policies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V2::Policies::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @policies_stub.universe_domain + end + + ## + # Create a new Policies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V2::Policies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V2::Policies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Policies 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/v2/policy_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @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 + + @policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V2::Policies::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @policies_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::Iam::V2::Policies::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @policies_stub.logger + end + + # Service calls + + ## + # Retrieves the policies of the specified kind that are attached to a + # resource. + # + # The response lists only policy metadata. In particular, policy rules are + # omitted. + # + # @overload list_policies(request, options = nil) + # Pass arguments to `list_policies` via a request object, either of type + # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to list. Format: + # `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param page_size [::Integer] + # The maximum number of policies to return. IAM ignores this value and uses + # the value 1000. + # @param page_token [::String] + # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to + # retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::ListPoliciesRequest.new + # + # # Call the list_policies method. + # result = client.list_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V2::Policy. + # p item + # end + # + def list_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.call_rpc :list_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policies_stub, :list_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the policy to retrieve. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V2::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V2::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Iam::V2::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.call_rpc :get_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a policy. + # + # @overload create_policy(request, options = nil) + # Pass arguments to `create_policy` via a request object, either of type + # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_policy(parent: nil, policy: nil, policy_id: nil) + # Pass arguments to `create_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to create. Format: `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param policy [::Google::Iam::V2::Policy, ::Hash] + # Required. The policy to create. + # @param policy_id [::String] + # The ID to use for this policy, which will become the final component of + # the policy's resource name. The ID must contain 3 to 63 characters. It can + # contain lowercase letters and numbers, as well as dashes (`-`) and periods + # (`.`). The first character must be a lowercase letter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::CreatePolicyRequest.new + # + # # Call the create_policy method. + # result = client.create_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.call_rpc :create_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified policy. + # + # You can update only the rules and the display name for the policy. + # + # To update a policy, you should use a read-modify-write loop: + # + # 1. Use {::Google::Iam::V2::Policies::Client#get_policy GetPolicy} to read the current version of the policy. + # 2. Modify the policy as needed. + # 3. Use `UpdatePolicy` to write the updated policy. + # + # This pattern helps prevent conflicts between concurrent updates. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Iam::V2::Policy, ::Hash] + # Required. The policy to update. + # + # To prevent conflicting updates, the `etag` value must match the value that + # is stored in IAM. If the `etag` values do not match, the request fails with + # a `409` error code and `ABORTED` status. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.call_rpc :update_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy. This action is permanent. + # + # @overload delete_policy(request, options = nil) + # Pass arguments to `delete_policy` via a request object, either of type + # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_policy(name: nil, etag: nil) + # Pass arguments to `delete_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the policy to delete. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param etag [::String] + # Optional. The expected `etag` of the policy to delete. If the value does not match + # the value that is stored in IAM, the request fails with a `409` error code + # and `ABORTED` status. + # + # If you omit this field, the policy is deleted regardless of its current + # `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/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::DeletePolicyRequest.new + # + # # Call the delete_policy method. + # result = client.delete_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.call_rpc :delete_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Policies API. + # + # This class represents the configuration for Policies, + # providing control 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::V2::Policies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V2::Policies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V2::Policies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::V2::Policies::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Policies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policies + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `create_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `delete_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy + + # @private + def initialize parent_rpcs = nil + list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies + @list_policies = ::Gapic::Config::Method.new list_policies_config + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy + @create_policy = ::Gapic::Config::Method.new create_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy + @delete_policy = ::Gapic::Config::Method.new delete_policy_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb new file mode 100644 index 000000000000..99a803e1b8c6 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.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 "googleauth" + +module Google + module Iam + module V2 + module Policies + # Credentials for the Policies 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 diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb new file mode 100644 index 000000000000..1f11efd8851b --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam + module V2 + module Policies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb new file mode 100644 index 000000000000..c1f6d1def0ec --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/iam/v2/version" + +require "google/iam/v2/policies/credentials" +require "google/iam/v2/policies/rest/operations" +require "google/iam/v2/policies/rest/client" + +module Google + module Iam + module V2 + ## + # An interface for managing Identity and Access Management (IAM) policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v2/policies/rest" + # client = ::Google::Iam::V2::Policies::Rest::Client.new + # + module Policies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v2/policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb new file mode 100644 index 000000000000..c440f4d15471 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb @@ -0,0 +1,911 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v2/policy_pb" +require "google/iam/v2/policies/rest/service_stub" + +module Google + module Iam + module V2 + module Policies + module Rest + ## + # REST client for the Policies service. + # + # An interface for managing Identity and Access Management (IAM) policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :policies_stub + + ## + # Configure the Policies Client class. + # + # See {::Google::Iam::V2::Policies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Policies clients + # ::Google::Iam::V2::Policies::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", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_policies.timeout = 60.0 + default_config.rpcs.list_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_policy.timeout = 60.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_policy.timeout = 60.0 + default_config.rpcs.create_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy.timeout = 60.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_policy.timeout = 60.0 + default_config.rpcs.delete_policy.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 Policies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V2::Policies::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 + @policies_stub.universe_domain + end + + ## + # Create a new Policies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Policies 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::Iam::V2::Policies::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 + + @policies_stub = ::Google::Iam::V2::Policies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @policies_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::Iam::V2::Policies::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @policies_stub.logger + end + + # Service calls + + ## + # Retrieves the policies of the specified kind that are attached to a + # resource. + # + # The response lists only policy metadata. In particular, policy rules are + # omitted. + # + # @overload list_policies(request, options = nil) + # Pass arguments to `list_policies` via a request object, either of type + # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to list. Format: + # `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param page_size [::Integer] + # The maximum number of policies to return. IAM ignores this value and uses + # the value 1000. + # @param page_token [::String] + # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to + # retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::ListPoliciesRequest.new + # + # # Call the list_policies method. + # result = client.list_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V2::Policy. + # p item + # end + # + def list_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.list_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policies_stub, :list_policies, "policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a policy. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the policy to retrieve. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V2::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V2::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Iam::V2::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.get_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a policy. + # + # @overload create_policy(request, options = nil) + # Pass arguments to `create_policy` via a request object, either of type + # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_policy(parent: nil, policy: nil, policy_id: nil) + # Pass arguments to `create_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to create. Format: `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param policy [::Google::Iam::V2::Policy, ::Hash] + # Required. The policy to create. + # @param policy_id [::String] + # The ID to use for this policy, which will become the final component of + # the policy's resource name. The ID must contain 3 to 63 characters. It can + # contain lowercase letters and numbers, as well as dashes (`-`) and periods + # (`.`). The first character must be a lowercase letter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::CreatePolicyRequest.new + # + # # Call the create_policy method. + # result = client.create_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest + + # Converts hash and nil to an 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_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.create_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified policy. + # + # You can update only the rules and the display name for the policy. + # + # To update a policy, you should use a read-modify-write loop: + # + # 1. Use {::Google::Iam::V2::Policies::Rest::Client#get_policy GetPolicy} to read the current version of the policy. + # 2. Modify the policy as needed. + # 3. Use `UpdatePolicy` to write the updated policy. + # + # This pattern helps prevent conflicts between concurrent updates. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Iam::V2::Policy, ::Hash] + # Required. The policy to update. + # + # To prevent conflicting updates, the `etag` value must match the value that + # is stored in IAM. If the `etag` values do not match, the request fails with + # a `409` error code and `ABORTED` status. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.update_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy. This action is permanent. + # + # @overload delete_policy(request, options = nil) + # Pass arguments to `delete_policy` via a request object, either of type + # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_policy(name: nil, etag: nil) + # Pass arguments to `delete_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the policy to delete. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @param etag [::String] + # Optional. The expected `etag` of the policy to delete. If the value does not match + # the value that is stored in IAM, the request fails with a `409` error code + # and `ABORTED` status. + # + # If you omit this field, the policy is deleted regardless of its current + # `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/iam/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V2::Policies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V2::DeletePolicyRequest.new + # + # # Call the delete_policy method. + # result = client.delete_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policies_stub.delete_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Policies REST API. + # + # This class represents the configuration for Policies 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::V2::Policies::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_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V2::Policies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 Policies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policies + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `create_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `delete_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy + + # @private + def initialize parent_rpcs = nil + list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies + @list_policies = ::Gapic::Config::Method.new list_policies_config + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy + @create_policy = ::Gapic::Config::Method.new create_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy + @delete_policy = ::Gapic::Config::Method.new delete_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb new file mode 100644 index 000000000000..389d302a8513 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam + module V2 + module Policies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^policies/[^/]+/[^/]+/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb new file mode 100644 index 000000000000..cfcc7003472b --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb @@ -0,0 +1,386 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v2/policy_pb" + +module Google + module Iam + module V2 + module Policies + module Rest + ## + # REST service stub for the Policies 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_policies REST call + # + # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V2::ListPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V2::ListPoliciesResponse] + # A result object deserialized from the server's reply + def list_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V2::ListPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_policy REST call + # + # @param request_pb [::Google::Iam::V2::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V2::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V2::Policy] + # A result object deserialized from the server's reply + def get_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V2::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_policy REST call + # + # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy REST call + # + # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_policy REST call + # + # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_policies REST call + # + # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}", + matches: [ + ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy REST call + # + # @param request_pb [::Google::Iam::V2::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_policy REST call + # + # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] + # 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_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}", + body: "policy", + matches: [ + ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy REST call + # + # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v2/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_policy REST call + # + # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb new file mode 100644 index 000000000000..ac1b3aaac015 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v2/policy.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/iam/v2/deny_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\x1agoogle/iam/v2/policy.proto\x12\rgoogle.iam.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/iam/v2/deny.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x03\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x11\n\x04kind\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12;\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32&.google.iam.v2.Policy.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12(\n\x05rules\x18\n \x03(\x0b\x32\x19.google.iam.v2.PolicyRule\x12\x1f\n\x12managing_authority\x18\x0b \x01(\tB\x03\xe0\x41\x05\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\nPolicyRule\x12,\n\tdeny_rule\x18\x02 \x01(\x0b\x32\x17.google.iam.v2.DenyRuleH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x06\n\x04kind\"Q\n\x13ListPoliciesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"X\n\x14ListPoliciesResponse\x12\'\n\x08policies\x18\x01 \x03(\x0b\x32\x15.google.iam.v2.Policy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"%\n\x10GetPolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"i\n\x13\x43reatePolicyRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\x12\x11\n\tpolicy_id\x18\x03 \x01(\t\"A\n\x13UpdatePolicyRequest\x12*\n\x06policy\x18\x01 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\";\n\x13\x44\x65letePolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"J\n\x17PolicyOperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xd0\x06\n\x08Policies\x12\x83\x01\n\x0cListPolicies\x12\".google.iam.v2.ListPoliciesRequest\x1a#.google.iam.v2.ListPoliciesResponse\"*\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{parent=policies/*/*}\x12m\n\tGetPolicy\x12\x1f.google.iam.v2.GetPolicyRequest\x1a\x15.google.iam.v2.Policy\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{name=policies/*/*/*}\x12\xba\x01\n\x0c\x43reatePolicy\x12\".google.iam.v2.CreatePolicyRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x17parent,policy,policy_id\x82\xd3\xe4\x93\x02#\"\x19/v2/{parent=policies/*/*}:\x06policy\x12\xa7\x01\n\x0cUpdatePolicy\x12\".google.iam.v2.UpdatePolicyRequest\x1a\x1d.google.longrunning.Operation\"T\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\x82\xd3\xe4\x93\x02*\x1a /v2/{policy.name=policies/*/*/*}:\x06policy\x12\x9f\x01\n\x0c\x44\x65letePolicy\x12\".google.iam.v2.DeletePolicyRequest\x1a\x1d.google.longrunning.Operation\"L\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v2/{name=policies/*/*/*}\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBy\n\x11\x63om.google.iam.v2B\x0bPolicyProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V2 + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.Policy").msgclass + PolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyRule").msgclass + ListPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesRequest").msgclass + ListPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesResponse").msgclass + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.GetPolicyRequest").msgclass + CreatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.CreatePolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.UpdatePolicyRequest").msgclass + DeletePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DeletePolicyRequest").msgclass + PolicyOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyOperationMetadata").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb new file mode 100644 index 000000000000..bd26fe57cd18 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v2/policy.proto for package 'google.iam.v2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v2/policy_pb' + +module Google + module Iam + module V2 + module Policies + # An interface for managing Identity and Access Management (IAM) policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v2.Policies' + + # Retrieves the policies of the specified kind that are attached to a + # resource. + # + # The response lists only policy metadata. In particular, policy rules are + # omitted. + rpc :ListPolicies, ::Google::Iam::V2::ListPoliciesRequest, ::Google::Iam::V2::ListPoliciesResponse + # Gets a policy. + rpc :GetPolicy, ::Google::Iam::V2::GetPolicyRequest, ::Google::Iam::V2::Policy + # Creates a policy. + rpc :CreatePolicy, ::Google::Iam::V2::CreatePolicyRequest, ::Google::Longrunning::Operation + # Updates the specified policy. + # + # You can update only the rules and the display name for the policy. + # + # To update a policy, you should use a read-modify-write loop: + # + # 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. + # 2. Modify the policy as needed. + # 3. Use `UpdatePolicy` to write the updated policy. + # + # This pattern helps prevent conflicts between concurrent updates. + rpc :UpdatePolicy, ::Google::Iam::V2::UpdatePolicyRequest, ::Google::Longrunning::Operation + # Deletes a policy. This action is permanent. + rpc :DeletePolicy, ::Google::Iam::V2::DeletePolicyRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb new file mode 100644 index 000000000000..d430e48053e6 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v2/policies/rest" +require "google/iam/v2/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v2/rest" + # client = ::Google::Iam::V2::Policies::Rest::Client.new + # + module V2 + end + end +end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb new file mode 100644 index 000000000000..da9bc723e32d --- /dev/null +++ b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/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 V2 + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/README.md b/owl-bot-staging/google-iam-v2/proto_docs/README.md new file mode 100644 index 000000000000..155a17d3cb7c --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# IAM V2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb new file mode 100644 index 000000000000..85ac06367665 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.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 Iam + module V2 + # A deny rule in an IAM deny policy. + # @!attribute [rw] denied_principals + # @return [::Array<::String>] + # The identities that are prevented from using one or more permissions on + # Google Cloud resources. This field can contain the following values: + # + # * `principalSet://goog/public:all`: A special identifier that represents + # any principal that is on the internet, even if they do not have a Google + # Account or are not logged in. + # + # * `principal://goog/subject/{email_id}`: A specific Google Account. + # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + # example, `principal://goog/subject/alice@example.com`. + # + # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + # Google Account that was deleted recently. For example, + # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + # the Google Account is recovered, this identifier reverts to the standard + # identifier for a Google Account. + # + # * `principalSet://goog/group/{group_id}`: A Google group. For example, + # `principalSet://goog/group/admins@example.com`. + # + # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + # that was deleted recently. For example, + # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + # the Google group is restored, this identifier reverts to the standard + # identifier for a Google group. + # + # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + # A Google Cloud service account. For example, + # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + # + # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + # A Google Cloud service account that was deleted recently. For example, + # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + # If the service account is undeleted, this identifier reverts to the + # standard identifier for a service account. + # + # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + # principals associated with the specified Google Workspace or Cloud + # Identity customer ID. For example, + # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + # @!attribute [rw] exception_principals + # @return [::Array<::String>] + # The identities that are excluded from the deny rule, even if they are + # listed in the `denied_principals`. For example, you could add a Google + # group to the `denied_principals`, then exclude specific users who belong to + # that group. + # + # This field can contain the same values as the `denied_principals` field, + # excluding `principalSet://goog/public:all`, which represents all users on + # the internet. + # @!attribute [rw] denied_permissions + # @return [::Array<::String>] + # The permissions that are explicitly denied by this rule. Each permission + # uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + # is the fully qualified domain name for the service. For example, + # `iam.googleapis.com/roles.list`. + # @!attribute [rw] exception_permissions + # @return [::Array<::String>] + # Specifies the permissions that this rule excludes from the set of denied + # permissions given by `denied_permissions`. If a permission appears in + # `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + # denied. + # + # The excluded permissions can be specified using the same syntax as + # `denied_permissions`. + # @!attribute [rw] denial_condition + # @return [::Google::Type::Expr] + # The condition that determines whether this deny rule applies to a request. + # If the condition expression evaluates to `true`, then the deny rule is + # applied; otherwise, the deny rule is not applied. + # + # Each deny rule is evaluated independently. If this deny rule does not apply + # to a request, other deny rules might still apply. + # + # The condition can use CEL functions that evaluate + # [resource + # tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + # functions and operators are not supported. + class DenyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb new file mode 100644 index 000000000000..917b870c27c0 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V2 + # Data for an IAM policy. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the `Policy`, which must be unique. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, requests can use the alphanumeric or the numeric ID. + # Responses always contain the numeric ID. + # @!attribute [rw] uid + # @return [::String] + # Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + # `Policy` is created. + # @!attribute [r] kind + # @return [::String] + # Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + # @!attribute [rw] display_name + # @return [::String] + # A user-specified description of the `Policy`. This value can be up to 63 + # characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # A key-value map to store arbitrary metadata for the `Policy`. Keys + # can be up to 63 characters. Values can be up to 255 characters. + # @!attribute [rw] etag + # @return [::String] + # An opaque tag that identifies the current version of the `Policy`. IAM uses + # this value to help manage concurrent updates, so they do not cause one + # update to be overwritten by another. + # + # If this field is present in a [CreatePolicy][] request, the value is + # ignored. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the `Policy` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the `Policy` was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V2::PolicyRule>] + # A list of rules that specify the behavior of the `Policy`. All of the rules + # should be of the `kind` specified in the `Policy`. + # @!attribute [rw] managing_authority + # @return [::String] + # Immutable. Specifies that this policy is managed by an authority and can only be + # modified by that authority. Usage is restricted. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A single rule in a `Policy`. + # @!attribute [rw] deny_rule + # @return [::Google::Iam::V2::DenyRule] + # A rule for a deny policy. + # @!attribute [rw] description + # @return [::String] + # A user-specified description of the rule. This value can be up to 256 + # characters. + class PolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ListPolicies`. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to list. Format: + # `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of policies to return. IAM ignores this value and uses + # the value 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to + # retrieve the next page. + class ListPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `ListPolicies`. + # @!attribute [rw] policies + # @return [::Array<::Google::Iam::V2::Policy>] + # Metadata for the policies that are attached to the resource. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that you can use in a {::Google::Iam::V2::ListPoliciesRequest ListPoliciesRequest} to retrieve the + # next page. If this field is omitted, there are no additional pages. + class ListPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetPolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the policy to retrieve. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `CreatePolicy`. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource that the policy is attached to, along with the kind of policy + # to create. Format: `policies/{attachment_point}/denypolicies` + # + # + # The attachment point is identified by its URL-encoded full resource name, + # which means that the forward-slash character, `/`, must be written as + # `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @!attribute [rw] policy + # @return [::Google::Iam::V2::Policy] + # Required. The policy to create. + # @!attribute [rw] policy_id + # @return [::String] + # The ID to use for this policy, which will become the final component of + # the policy's resource name. The ID must contain 3 to 63 characters. It can + # contain lowercase letters and numbers, as well as dashes (`-`) and periods + # (`.`). The first character must be a lowercase letter. + class CreatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `UpdatePolicy`. + # @!attribute [rw] policy + # @return [::Google::Iam::V2::Policy] + # Required. The policy to update. + # + # To prevent conflicting updates, the `etag` value must match the value that + # is stored in IAM. If the `etag` values do not match, the request fails with + # a `409` error code and `ABORTED` status. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DeletePolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the policy to delete. Format: + # `policies/{attachment_point}/denypolicies/{policy_id}` + # + # + # Use the URL-encoded full resource name, which means that the forward-slash + # character, `/`, must be written as `%2F`. For example, + # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + # + # For organizations and folders, use the numeric ID in the full resource + # name. For projects, you can use the alphanumeric or the numeric ID. + # @!attribute [rw] etag + # @return [::String] + # Optional. The expected `etag` of the policy to delete. If the value does not match + # the value that is stored in IAM, the request fails with a `409` error code + # and `ABORTED` status. + # + # If you omit this field, the policy is deleted regardless of its current + # `etag`. + class DeletePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for long-running `Policy` operations. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp when the `google.longrunning.Operation` was created. + class PolicyOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v2/snippets/Gemfile b/owl-bot-staging/google-iam-v2/snippets/Gemfile new file mode 100644 index 000000000000..0b586e897f32 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-iam-v2", path: "../" +else + gem "google-iam-v2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb new file mode 100644 index 000000000000..992efa4ac456 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v2_generated_Policies_CreatePolicy_sync] +require "google/iam/v2" + +## +# Snippet for the create_policy call in the Policies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#create_policy. +# +def create_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V2::Policies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V2::CreatePolicyRequest.new + + # Call the create_policy method. + result = client.create_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb new file mode 100644 index 000000000000..97dbcb650132 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v2_generated_Policies_DeletePolicy_sync] +require "google/iam/v2" + +## +# Snippet for the delete_policy call in the Policies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#delete_policy. +# +def delete_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V2::Policies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V2::DeletePolicyRequest.new + + # Call the delete_policy method. + result = client.delete_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb new file mode 100644 index 000000000000..6820282d9a3b --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v2_generated_Policies_GetPolicy_sync] +require "google/iam/v2" + +## +# Snippet for the get_policy call in the Policies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#get_policy. +# +def get_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V2::Policies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V2::GetPolicyRequest.new + + # Call the get_policy method. + result = client.get_policy request + + # The returned object is of type Google::Iam::V2::Policy. + p result +end +# [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb b/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb new file mode 100644 index 000000000000..d7d580e8441f --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v2_generated_Policies_ListPolicies_sync] +require "google/iam/v2" + +## +# Snippet for the list_policies call in the Policies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#list_policies. +# +def list_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V2::Policies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V2::ListPoliciesRequest.new + + # Call the list_policies method. + result = client.list_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V2::Policy. + p item + end +end +# [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb new file mode 100644 index 000000000000..417fd211883b --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v2_generated_Policies_UpdatePolicy_sync] +require "google/iam/v2" + +## +# Snippet for the update_policy call in the Policies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#update_policy. +# +def update_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V2::Policies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V2::UpdatePolicyRequest.new + + # Call the update_policy method. + result = client.update_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json b/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json new file mode 100644 index 000000000000..a44511598630 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-iam-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "iam_v2_generated_Policies_ListPolicies_sync", + "title": "Snippet for the list_policies call in the Policies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#list_policies.", + "file": "policies/list_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_policies", + "full_name": "::Google::Iam::V2::Policies::Client#list_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V2::ListPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V2::ListPoliciesResponse", + "client": { + "short_name": "Policies::Client", + "full_name": "::Google::Iam::V2::Policies::Client" + }, + "method": { + "short_name": "ListPolicies", + "full_name": "google.iam.v2.Policies.ListPolicies", + "service": { + "short_name": "Policies", + "full_name": "google.iam.v2.Policies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v2_generated_Policies_GetPolicy_sync", + "title": "Snippet for the get_policy call in the Policies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#get_policy.", + "file": "policies/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Iam::V2::Policies::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V2::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V2::Policy", + "client": { + "short_name": "Policies::Client", + "full_name": "::Google::Iam::V2::Policies::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.iam.v2.Policies.GetPolicy", + "service": { + "short_name": "Policies", + "full_name": "google.iam.v2.Policies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v2_generated_Policies_CreatePolicy_sync", + "title": "Snippet for the create_policy call in the Policies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#create_policy.", + "file": "policies/create_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_policy", + "full_name": "::Google::Iam::V2::Policies::Client#create_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V2::CreatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Policies::Client", + "full_name": "::Google::Iam::V2::Policies::Client" + }, + "method": { + "short_name": "CreatePolicy", + "full_name": "google.iam.v2.Policies.CreatePolicy", + "service": { + "short_name": "Policies", + "full_name": "google.iam.v2.Policies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v2_generated_Policies_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the Policies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#update_policy.", + "file": "policies/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Iam::V2::Policies::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V2::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Policies::Client", + "full_name": "::Google::Iam::V2::Policies::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.iam.v2.Policies.UpdatePolicy", + "service": { + "short_name": "Policies", + "full_name": "google.iam.v2.Policies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v2_generated_Policies_DeletePolicy_sync", + "title": "Snippet for the delete_policy call in the Policies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#delete_policy.", + "file": "policies/delete_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_policy", + "full_name": "::Google::Iam::V2::Policies::Client#delete_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V2::DeletePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Policies::Client", + "full_name": "::Google::Iam::V2::Policies::Client" + }, + "method": { + "short_name": "DeletePolicy", + "full_name": "google.iam.v2.Policies.DeletePolicy", + "service": { + "short_name": "Policies", + "full_name": "google.iam.v2.Policies" + } + } + }, + "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-iam-v2/test/google/iam/v2/policies_operations_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb new file mode 100644 index 000000000000..7dcd32b68c5f --- /dev/null +++ b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_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/iam/v2/policy_pb" +require "google/iam/v2/policy_services_pb" +require "google/iam/v2/policies" + +class ::Google::Iam::V2::Policies::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb new file mode 100644 index 000000000000..fbecbeaf511a --- /dev/null +++ b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v2/policy_pb" +require "google/iam/v2/policies/rest" + + +class ::Google::Iam::V2::Policies::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_policies + # Create test objects. + client_result = ::Google::Iam::V2::ListPoliciesResponse.new + http_response = OpenStruct.new 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_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_list_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_policies_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_count + end + end + end + + def test_get_policy + # Create test objects. + client_result = ::Google::Iam::V2::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_count + end + end + end + + def test_create_policy + # Create test objects. + 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" + policy = {} + policy_id = "hello world" + + create_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_create_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_policy parent: parent, policy: policy, policy_id: policy_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_policy_client_stub.call_count + end + end + end + + def test_update_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_policy({ policy: policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_policy policy: policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_policy({ policy: policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_count + end + end + end + + def test_delete_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_delete_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_policy({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_policy name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_policy({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_policy_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Iam::V2::Policies::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::V2::Policies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb new file mode 100644 index 000000000000..8a3804aaab70 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v2/policy_pb" +require "google/iam/v2/policies" + +class ::Google::Iam::V2::Policies::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_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V2::ListPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_policies, name + assert_kind_of ::Google::Iam::V2::ListPoliciesRequest, 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_policies_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_rpc_count + end + end + + def test_get_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V2::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Iam::V2::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_rpc_count + end + end + + def test_create_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy = {} + policy_id = "hello world" + + create_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_policy, name + assert_kind_of ::Google::Iam::V2::CreatePolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] + assert_equal "hello world", request["policy_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_policy parent: parent, policy: policy, policy_id: policy_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_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_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Iam::V2::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy({ policy: policy }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy policy: policy do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy({ policy: policy }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| + assert_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_policy_client_stub.call_rpc_count + end + end + + def test_delete_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_policy, name + assert_kind_of ::Google::Iam::V2::DeletePolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_policy_client_stub do + # Create client + c = ::Google::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_policy({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_policy name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_policy({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_policy_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V2::Policies::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::V2::Policies::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::V2::Policies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V2::Policies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v2/test/helper.rb b/owl-bot-staging/google-iam-v2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-iam-v2/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-v3/.gitignore b/owl-bot-staging/google-iam-v3/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-v3/.repo-metadata.json b/owl-bot-staging/google-iam-v3/.repo-metadata.json new file mode 100644 index 000000000000..99b5e3acd3ae --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest", + "distribution_name": "google-iam-v3", + "is_cloud": true, + "language": "ruby", + "name": "iam", + "name_pretty": "Identity and Access Management (IAM) V3 API", + "product_documentation": "https://cloud.google.com/iam/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-v3/.rubocop.yml b/owl-bot-staging/google-iam-v3/.rubocop.yml new file mode 100644 index 000000000000..a513a8400ebb --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-v3.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-v3.rb" diff --git a/owl-bot-staging/google-iam-v3/.toys.rb b/owl-bot-staging/google-iam-v3/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.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-v3/.yardopts b/owl-bot-staging/google-iam-v3/.yardopts new file mode 100644 index 000000000000..b0b7998f4801 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Identity and Access Management (IAM) V3 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-v3/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md new file mode 100644 index 000000000000..8f81a23b250f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-v3 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-v3 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/v3" + +client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/v3" + +::Google::Iam::V3::AccessPolicies::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::V3::AccessPolicies::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-v3 +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/v3" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::V3::AccessPolicies::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-v3/CHANGELOG.md b/owl-bot-staging/google-iam-v3/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-v3/Gemfile b/owl-bot-staging/google-iam-v3/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3/LICENSE.md b/owl-bot-staging/google-iam-v3/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3/README.md b/owl-bot-staging/google-iam-v3/README.md new file mode 100644 index 000000000000..d40036b5625e --- /dev/null +++ b/owl-bot-staging/google-iam-v3/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Identity and Access Management (IAM) V3 API + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Identity and Access Management (IAM) V3 API. Most users should consider using +the main client gem, +[google-iam](https://rubygems.org/gems/google-iam). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-v3 +``` + +## 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/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/v3" + +client = ::Google::Iam::V3::AccessPolicies::Client.new +request = ::Google::Iam::V3::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) +response = client.create_access_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/iam/v3" +require "logger" + +client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam`, +and lower-level _versioned_ client libraries with names such as +`google-iam-v3`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-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-v3`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-iam-v3/Rakefile b/owl-bot-staging/google-iam-v3/Rakefile new file mode 100644 index 000000000000..0b6c7b75d2e4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3 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/v3/access_policies/credentials" + ::Google::Iam::V3::AccessPolicies::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-v3 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-v3 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-v3 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-v3 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-v3" + header "google-iam-v3 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-v3 yard", "*" + Rake::Task[:yard].invoke + header "google-iam-v3 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-v3 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-v3 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-v3/gapic_metadata.json b/owl-bot-staging/google-iam-v3/gapic_metadata.json new file mode 100644 index 000000000000..62878ea653a0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/gapic_metadata.json @@ -0,0 +1,126 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.iam.v3", + "libraryPackage": "::Google::Iam::V3", + "services": { + "AccessPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3::AccessPolicies::Client", + "rpcs": { + "CreateAccessPolicy": { + "methods": [ + "create_access_policy" + ] + }, + "GetAccessPolicy": { + "methods": [ + "get_access_policy" + ] + }, + "UpdateAccessPolicy": { + "methods": [ + "update_access_policy" + ] + }, + "DeleteAccessPolicy": { + "methods": [ + "delete_access_policy" + ] + }, + "ListAccessPolicies": { + "methods": [ + "list_access_policies" + ] + }, + "SearchAccessPolicyBindings": { + "methods": [ + "search_access_policy_bindings" + ] + } + } + } + } + }, + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3::PolicyBindings::Client", + "rpcs": { + "CreatePolicyBinding": { + "methods": [ + "create_policy_binding" + ] + }, + "GetPolicyBinding": { + "methods": [ + "get_policy_binding" + ] + }, + "UpdatePolicyBinding": { + "methods": [ + "update_policy_binding" + ] + }, + "DeletePolicyBinding": { + "methods": [ + "delete_policy_binding" + ] + }, + "ListPolicyBindings": { + "methods": [ + "list_policy_bindings" + ] + }, + "SearchTargetPolicyBindings": { + "methods": [ + "search_target_policy_bindings" + ] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": [ + "create_principal_access_boundary_policy" + ] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": [ + "get_principal_access_boundary_policy" + ] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": [ + "update_principal_access_boundary_policy" + ] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": [ + "delete_principal_access_boundary_policy" + ] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": [ + "list_principal_access_boundary_policies" + ] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": [ + "search_principal_access_boundary_policy_bindings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec new file mode 100644 index 000000000000..36aa9ae1b51a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/v3/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-v3" + gem.version = Google::Iam::V3::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." + gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb new file mode 100644 index 000000000000..567b503c671b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.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/v3" diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb new file mode 100644 index 000000000000..b4c095ee8854 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.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/v3/access_policies" +require "google/iam/v3/policy_bindings" +require "google/iam/v3/principal_access_boundary_policies" +require "google/iam/v3/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v3" + # client = ::Google::Iam::V3::AccessPolicies::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v3" + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new + # + module V3 + end + end +end + +helper_path = ::File.join __dir__, "v3", "_helpers.rb" +require "google/iam/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb new file mode 100644 index 000000000000..5127f5311dc8 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3/version" + +require "google/iam/v3/access_policies/credentials" +require "google/iam/v3/access_policies/paths" +require "google/iam/v3/access_policies/operations" +require "google/iam/v3/access_policies/client" +require "google/iam/v3/access_policies/rest" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) access policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3/access_policies" + # client = ::Google::Iam::V3::AccessPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3/access_policies/rest" + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new + # + module AccessPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "access_policies", "helpers.rb" +require "google/iam/v3/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb new file mode 100644 index 000000000000..64961d0c2f2b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb @@ -0,0 +1,1113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/access_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3 + module AccessPolicies + ## + # Client for the AccessPolicies service. + # + # Manages Identity and Access Management (IAM) access policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_policies_stub + + ## + # Configure the AccessPolicies Client class. + # + # See {::Google::Iam::V3::AccessPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessPolicies clients + # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| + # config.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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_access_policy.timeout = 30.0 + + default_config.rpcs.get_access_policy.timeout = 60.0 + default_config.rpcs.get_access_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_access_policy.timeout = 30.0 + + default_config.rpcs.delete_access_policy.timeout = 30.0 + + default_config.rpcs.list_access_policies.timeout = 60.0 + default_config.rpcs.list_access_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_access_policy_bindings.timeout = 60.0 + default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @access_policies_stub.universe_domain + end + + ## + # Create a new AccessPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessPolicies 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/v3/access_policies_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @access_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3::AccessPolicies::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @access_policies_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 = @access_policies_stub.endpoint + config.universe_domain = @access_policies_stub.universe_domain + config.logger = @access_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::AccessPolicies::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 + @access_policies_stub.logger + end + + # Service calls + + ## + # Creates an access policy, and returns a long running operation. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param access_policy_id [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] + # Required. The access policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreateAccessPolicyRequest.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an access policy. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3::AccessPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Iam::V3::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an access policy. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_policy(access_policy: nil, validate_only: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.access_policy&.name + header_params["access_policy.name"] = request.access_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an access policy. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @param etag [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 access policies. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_access_policy_bindings(request, options = nil) + # Pass arguments to `search_access_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new + # + # # Call the search_access_policy_bindings method. + # result = client.search_access_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_access_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest + + # Converts hash and nil to 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_access_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. + # + # This class represents the configuration for AccessPolicies, + # providing control 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::V3::AccessPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_access_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccessPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `search_access_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_access_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings + @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb new file mode 100644 index 000000000000..f165dafeae74 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3 + module AccessPolicies + # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb new file mode 100644 index 000000000000..706c5cd82a59 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/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 Iam + module V3 + module AccessPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb new file mode 100644 index 000000000000..870d21d50a77 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + module AccessPolicies + # Path helper methods for the AccessPolicies API. + module Paths + ## + # Create a fully-qualified AccessPolicy resource string. + # + # @overload access_policy_path(organization:, location:, access_policy:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` + # + # @param organization [String] + # @param location [String] + # @param access_policy [String] + # + # @overload access_policy_path(folder:, location:, access_policy:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` + # + # @param folder [String] + # @param location [String] + # @param access_policy [String] + # + # @overload access_policy_path(project:, location:, access_policy:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` + # + # @param project [String] + # @param location [String] + # @param access_policy [String] + # + # @return [::String] + def access_policy_path **args + resources = { + "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" + end), + "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" + end), + "access_policy:location:project" => (proc do |project:, location:, access_policy:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb new file mode 100644 index 000000000000..df4af139d08c --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/iam/v3/version" + +require "google/iam/v3/access_policies/credentials" +require "google/iam/v3/access_policies/paths" +require "google/iam/v3/access_policies/rest/operations" +require "google/iam/v3/access_policies/rest/client" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) access policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3/access_policies/rest" + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new + # + module AccessPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb new file mode 100644 index 000000000000..3d26c85246d0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb @@ -0,0 +1,1028 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/access_policies_service_pb" +require "google/iam/v3/access_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3 + module AccessPolicies + module Rest + ## + # REST client for the AccessPolicies service. + # + # Manages Identity and Access Management (IAM) access policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_policies_stub + + ## + # Configure the AccessPolicies Client class. + # + # See {::Google::Iam::V3::AccessPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessPolicies clients + # ::Google::Iam::V3::AccessPolicies::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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_access_policy.timeout = 30.0 + + default_config.rpcs.get_access_policy.timeout = 60.0 + default_config.rpcs.get_access_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_access_policy.timeout = 30.0 + + default_config.rpcs.delete_access_policy.timeout = 30.0 + + default_config.rpcs.list_access_policies.timeout = 60.0 + default_config.rpcs.list_access_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_access_policy_bindings.timeout = 60.0 + default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::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 + @access_policies_stub.universe_domain + end + + ## + # Create a new AccessPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessPolicies 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::Iam::V3::AccessPolicies::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 + + @access_policies_stub = ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @access_policies_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 = @access_policies_stub.endpoint + config.universe_domain = @access_policies_stub.universe_domain + config.logger = @access_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::AccessPolicies::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 + @access_policies_stub.logger + end + + # Service calls + + ## + # Creates an access policy, and returns a long running operation. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param access_policy_id [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] + # Required. The access policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreateAccessPolicyRequest.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest + + # Converts hash and nil to an 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_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.create_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an access policy. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Iam::V3::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.get_access_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an access policy. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_policy(access_policy: nil, validate_only: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.update_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an access policy. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @param etag [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.delete_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.list_access_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_access_policy_bindings(request, options = nil) + # Pass arguments to `search_access_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new + # + # # Call the search_access_policy_bindings method. + # result = client.search_access_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_access_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest + + # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.search_access_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. + # + # This class represents the configuration for AccessPolicies 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::V3::AccessPolicies::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_access_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::AccessPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 AccessPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `search_access_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_access_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings + @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb new file mode 100644 index 000000000000..45a22d4ef879 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module AccessPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb new file mode 100644 index 000000000000..78afacefef95 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3/access_policies_service_pb" + +module Google + module Iam + module V3 + module AccessPolicies + module Rest + ## + # REST service stub for the AccessPolicies 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_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::AccessPolicy] + # A result object deserialized from the server's reply + def get_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::AccessPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_access_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::ListAccessPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::ListAccessPoliciesResponse] + # A result object deserialized from the server's reply + def list_access_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::ListAccessPoliciesResponse.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_access_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::SearchAccessPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::SearchAccessPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_access_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] + # 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_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/accessPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/accessPolicies", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/accessPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_access_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] + # 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_access_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb new file mode 100644 index 000000000000..2f20e83c23b6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/access_policies_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3/access_policy_resources_pb' +require 'google/iam/v3/operation_metadata_pb' +require 'google/iam/v3/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n+google/iam/v3/access_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/iam/v3/access_policy_resources.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc8\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"p\n\x19UpdateAccessPolicyRequest\x12\x37\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"p\n\x1aListAccessPoliciesResponse\x12\x34\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1b.google.iam.v3.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchAccessPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xd2\x10\n\x0e\x41\x63\x63\x65ssPolicies\x12\x84\x03\n\x12\x43reateAccessPolicy\x12(.google.iam.v3.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa4\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xd1\x01\"2/v3/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZB\"1/v3/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZH\"7/v3/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x8a\x02\n\x0fGetAccessPolicy\x12%.google.iam.v3.GetAccessPolicyRequest\x1a\x1b.google.iam.v3.AccessPolicy\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/accessPolicies/*}Z3\x12\x31/v3/{name=folders/*/locations/*/accessPolicies/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\x86\x03\n\x12UpdateAccessPolicy\x12(.google.iam.v3.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xfb\x01\x32@/v3/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZP2?/v3/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZV2E/v3/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xbf\x02\n\x12\x44\x65leteAccessPolicy\x12(.google.iam.v3.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/accessPolicies/*}Z3*1/v3/{name=folders/*/locations/*/accessPolicies/*}Z9*7/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\xa0\x02\n\x12ListAccessPolicies\x12(.google.iam.v3.ListAccessPoliciesRequest\x1a).google.iam.v3.ListAccessPoliciesResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/accessPoliciesZ3\x12\x31/v3/{parent=folders/*/locations/*}/accessPoliciesZ9\x12\x37/v3/{parent=organizations/*/locations/*}/accessPolicies\x12\xf5\x02\n\x1aSearchAccessPolicyBindings\x12\x30.google.iam.v3.SearchAccessPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchAccessPolicyBindingsResponse\"\xf1\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe3\x01\x12L/v3/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZH\x12\x46/v3/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZI\x12G/v3/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\x11\x63om.google.iam.v3B\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreateAccessPolicyRequest").msgclass + GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetAccessPolicyRequest").msgclass + UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdateAccessPolicyRequest").msgclass + DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeleteAccessPolicyRequest").msgclass + ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesRequest").msgclass + ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesResponse").msgclass + SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsRequest").msgclass + SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb new file mode 100644 index 000000000000..7f9dfed767c4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3/access_policies_service.proto for package 'google.iam.v3' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3/access_policies_service_pb' + +module Google + module Iam + module V3 + module AccessPolicies + # Manages Identity and Access Management (IAM) access policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3.AccessPolicies' + + # Creates an access policy, and returns a long running operation. + rpc :CreateAccessPolicy, ::Google::Iam::V3::CreateAccessPolicyRequest, ::Google::Longrunning::Operation + # Gets an access policy. + rpc :GetAccessPolicy, ::Google::Iam::V3::GetAccessPolicyRequest, ::Google::Iam::V3::AccessPolicy + # Updates an access policy. + rpc :UpdateAccessPolicy, ::Google::Iam::V3::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation + # Deletes an access policy. + rpc :DeleteAccessPolicy, ::Google::Iam::V3::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation + # Lists access policies. + rpc :ListAccessPolicies, ::Google::Iam::V3::ListAccessPoliciesRequest, ::Google::Iam::V3::ListAccessPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchAccessPolicyBindings, ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3::SearchAccessPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb new file mode 100644 index 000000000000..71dd0c5bd31b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/access_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n+google/iam/v3/access_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb1\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32,.google.iam.v3.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\".google.iam.v3.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"J\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x33\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3.AccessPolicyRuleB\x03\xe0\x41\x02\"\x9d\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12@\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32&.google.iam.v3.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x41\n\toperation\x18\n \x01(\x0b\x32).google.iam.v3.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12H\n\nconditions\x18\t \x03(\x0b\x32/.google.iam.v3.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x88\x01\n\x11\x63om.google.iam.v3B\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicy").msgclass + AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyDetails").msgclass + AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule").msgclass + AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Operation").msgclass + AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb new file mode 100644 index 000000000000..d0c9141ce226 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/operation_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/iam/v3/operation_metadata.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x84\x01\n\x11\x63om.google.iam.v3B\x16OperationMetadataProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.OperationMetadata").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb new file mode 100644 index 000000000000..efa28f12adb1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/policy_binding_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n,google/iam/v3/policy_binding_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xfb\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.google.iam.v3.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x06target\x18\x06 \x01(\x0b\x32#.google.iam.v3.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x41\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32\'.google.iam.v3.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x89\x01\n\x11\x63om.google.iam.v3B\x1bPolicyBindingResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding").msgclass + PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.Target").msgclass + PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.PolicyKind").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb new file mode 100644 index 000000000000..89b89d81de14 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.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/iam/v3/version" + +require "google/iam/v3/policy_bindings/credentials" +require "google/iam/v3/policy_bindings/paths" +require "google/iam/v3/policy_bindings/operations" +require "google/iam/v3/policy_bindings/client" +require "google/iam/v3/policy_bindings/rest" + +module Google + module Iam + module V3 + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3/policy_bindings" + # client = ::Google::Iam::V3::PolicyBindings::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3/policy_bindings/rest" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module PolicyBindings + end + end + end +end + +helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" +require "google/iam/v3/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb new file mode 100644 index 000000000000..cafa48df11dd --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb @@ -0,0 +1,1157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/policy_bindings_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3 + module PolicyBindings + ## + # Client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| + # config.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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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/v3/policy_bindings_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @policy_bindings_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3::PolicyBindings::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3::PolicyBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy_binding&.name + header_params["policy_binding.name"] = request.policy_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param filter [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. + # + # This class represents the configuration for PolicyBindings, + # providing control 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::V3::PolicyBindings::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::V3::PolicyBindings::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb new file mode 100644 index 000000000000..a3f91a0fb8fe --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.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 "googleauth" + +module Google + module Iam + module V3 + module PolicyBindings + # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb new file mode 100644 index 000000000000..c0c1fbc2d13c --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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 Iam + module V3 + module PolicyBindings + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb new file mode 100644 index 000000000000..cc9e0c46ea72 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + module PolicyBindings + # Path helper methods for the PolicyBindings API. + module Paths + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PolicyBinding resource string. + # + # @overload policy_binding_path(organization:, location:, policy_binding:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` + # + # @param organization [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(folder:, location:, policy_binding:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` + # + # @param folder [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(project:, location:, policy_binding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` + # + # @param project [String] + # @param location [String] + # @param policy_binding [String] + # + # @return [::String] + def policy_binding_path **args + resources = { + "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb new file mode 100644 index 000000000000..102093998bd5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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/iam/v3/version" + +require "google/iam/v3/policy_bindings/credentials" +require "google/iam/v3/policy_bindings/paths" +require "google/iam/v3/policy_bindings/rest/operations" +require "google/iam/v3/policy_bindings/rest/client" + +module Google + module Iam + module V3 + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3/policy_bindings/rest" + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + module PolicyBindings + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb new file mode 100644 index 000000000000..5b8aac9f4ccf --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb @@ -0,0 +1,1072 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3 + module PolicyBindings + module Rest + ## + # REST client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3::PolicyBindings::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3::PolicyBindings::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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 + + @policy_bindings_stub = ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.create_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.get_policy_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.update_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.delete_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.list_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param filter [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. + # + # This class represents the configuration for PolicyBindings 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::V3::PolicyBindings::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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PolicyBindings::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb new file mode 100644 index 000000000000..0856b3e5604d --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PolicyBindings + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb new file mode 100644 index 000000000000..ba0446cdb560 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3/policy_bindings_service_pb" + +module Google + module Iam + module V3 + module PolicyBindings + module Rest + ## + # REST service stub for the PolicyBindings 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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PolicyBinding] + # A result object deserialized from the server's reply + def get_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::PolicyBinding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::ListPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::ListPolicyBindingsResponse] + # A result object deserialized from the server's reply + def list_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::ListPolicyBindingsResponse.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_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::SearchTargetPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::SearchTargetPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_target_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_target_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] + # 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_target_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb new file mode 100644 index 000000000000..15d4b16597d4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/policy_bindings_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3/operation_metadata_pb' +require 'google/iam/v3/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n+google/iam/v3/policy_bindings_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xcd\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xa9\x01\n\x1aUpdatePolicyBindingRequest\x12\x39\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x1aListPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchTargetPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa0\x11\n\x0ePolicyBindings\x12\x8c\x03\n\x13\x43reatePolicyBinding\x12).google.iam.v3.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xd4\x01\"2/v3/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZI\"7/v3/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\x8d\x02\n\x10GetPolicyBinding\x12&.google.iam.v3.GetPolicyBindingRequest\x1a\x1c.google.iam.v3.PolicyBinding\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/policyBindings/*}Z3\x12\x31/v3/{name=folders/*/locations/*/policyBindings/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xac\x03\n\x13UpdatePolicyBinding\x12).google.iam.v3.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xca\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZR2@/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZX2F/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xc1\x02\n\x13\x44\x65letePolicyBinding\x12).google.iam.v3.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/locations/*/policyBindings/*}Z9*7/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xa0\x02\n\x12ListPolicyBindings\x12(.google.iam.v3.ListPolicyBindingsRequest\x1a).google.iam.v3.ListPolicyBindingsResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/policyBindingsZ3\x12\x31/v3/{parent=folders/*/locations/*}/policyBindingsZ9\x12\x37/v3/{parent=organizations/*/locations/*}/policyBindings\x12\x90\x03\n\x1aSearchTargetPolicyBindings\x12\x30.google.iam.v3.SearchTargetPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchTargetPolicyBindingsResponse\"\x8c\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\xf5\x01\x12M/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZN\x12L/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZT\x12R/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb4\x02\n\x11\x63om.google.iam.v3B\x1aPolicyBindingsServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePolicyBindingRequest").msgclass + GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPolicyBindingRequest").msgclass + UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePolicyBindingRequest").msgclass + DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePolicyBindingRequest").msgclass + ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsRequest").msgclass + ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsResponse").msgclass + SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsRequest").msgclass + SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb new file mode 100644 index 000000000000..dc8f9d8742f2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.v3' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3/policy_bindings_service_pb' + +module Google + module Iam + module V3 + module PolicyBindings + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3.PolicyBindings' + + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + rpc :CreatePolicyBinding, ::Google::Iam::V3::CreatePolicyBindingRequest, ::Google::Longrunning::Operation + # Gets a policy binding. + rpc :GetPolicyBinding, ::Google::Iam::V3::GetPolicyBindingRequest, ::Google::Iam::V3::PolicyBinding + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + rpc :UpdatePolicyBinding, ::Google::Iam::V3::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + rpc :DeletePolicyBinding, ::Google::Iam::V3::DeletePolicyBindingRequest, ::Google::Longrunning::Operation + # Lists policy bindings. + rpc :ListPolicyBindings, ::Google::Iam::V3::ListPolicyBindingsRequest, ::Google::Iam::V3::ListPolicyBindingsResponse + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + rpc :SearchTargetPolicyBindings, ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3::SearchTargetPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb new file mode 100644 index 000000000000..74a5371b0372 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.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/iam/v3/version" + +require "google/iam/v3/principal_access_boundary_policies/credentials" +require "google/iam/v3/principal_access_boundary_policies/paths" +require "google/iam/v3/principal_access_boundary_policies/operations" +require "google/iam/v3/principal_access_boundary_policies/client" +require "google/iam/v3/principal_access_boundary_policies/rest" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3/principal_access_boundary_policies" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" +require "google/iam/v3/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb new file mode 100644 index 000000000000..48eb0922884c --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb @@ -0,0 +1,1102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/principal_access_boundary_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + ## + # Client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3/principal_access_boundary_policies_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.principal_access_boundary_policy&.name + header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies, + # providing control 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb new file mode 100644 index 000000000000..84103a366146 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb new file mode 100644 index 000000000000..9d3205859719 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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 Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb new file mode 100644 index 000000000000..d7fbd72948b5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Path helper methods for the PrincipalAccessBoundaryPolicies API. + module Paths + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` + # + # @param organization [String] + # @param location [String] + # @param principal_access_boundary_policy [String] + # + # @return [::String] + def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb new file mode 100644 index 000000000000..8e3308deab2f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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/iam/v3/version" + +require "google/iam/v3/principal_access_boundary_policies/credentials" +require "google/iam/v3/principal_access_boundary_policies/paths" +require "google/iam/v3/principal_access_boundary_policies/rest/operations" +require "google/iam/v3/principal_access_boundary_policies/rest/client" + +module Google + module Iam + module V3 + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb new file mode 100644 index 000000000000..0ee7f3632d2b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb @@ -0,0 +1,1017 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "V3"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 + + @principal_access_boundary_policies_stub = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb new file mode 100644 index 000000000000..7063c8a578e1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb new file mode 100644 index 000000000000..f1c525adbc3a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3/principal_access_boundary_policies_service_pb" + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # A result object deserialized from the server's reply + def get_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::ListPrincipalAccessBoundaryPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse] + # A result object deserialized from the server's reply + def list_principal_access_boundary_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_principal_access_boundary_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_principal_access_boundary_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_principal_access_boundary_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", + body: "principal_access_boundary_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{principal_access_boundary_policy.name}", + body: "principal_access_boundary_policy", + matches: [ + ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_principal_access_boundary_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # 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_principal_access_boundary_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb new file mode 100644 index 000000000000..56f9951c56c1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/principal_access_boundary_policies_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3/operation_metadata_pb' +require 'google/iam/v3/policy_binding_resources_pb' +require 'google/iam/v3/principal_access_boundary_policy_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n>google/iam/v3/principal_access_boundary_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a>google/iam/v3/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdb\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12[\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa5\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12X\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xec\x0e\n\x1fPrincipalAccessBoundaryPolicies\x12\xf7\x02\n#CreatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02l\"H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xe1\x01\n GetPrincipalAccessBoundaryPolicy\x12\x36.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest\x1a,.google.iam.v3.PrincipalAccessBoundaryPolicy\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xfa\x02\n#UpdatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x8d\x01\x32i/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x86\x02\n#DeletePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xf7\x01\n#ListPrincipalAccessBoundaryPolicies\x12\x39.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest\x1a:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xa2\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x41.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x42.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest").msgclass + GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest").msgclass + UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass + DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest").msgclass + ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest").msgclass + ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb new file mode 100644 index 000000000000..4b3c7a40557b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.v3' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3/principal_access_boundary_policies_service_pb' + +module Google + module Iam + module V3 + module PrincipalAccessBoundaryPolicies + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3.PrincipalAccessBoundaryPolicies' + + # Creates a principal access boundary policy, and returns a long running + # operation. + rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Gets a principal access boundary policy. + rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3::PrincipalAccessBoundaryPolicy + # Updates a principal access boundary policy. + rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Deletes a principal access boundary policy. + rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Lists principal access boundary policies. + rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb new file mode 100644 index 000000000000..2a5009d8b3b2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3/principal_access_boundary_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n>google/iam/v3/principal_access_boundary_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12W\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32=.google.iam.v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x33.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x8e\x01\n$PrincipalAccessBoundaryPolicyDetails\x12\x44\n\x05rules\x18\x01 \x03(\x0b\x32\x30.google.iam.v3.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd0\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12L\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32\x37.google.iam.v3.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3 + PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicy").msgclass + PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyDetails").msgclass + PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule").msgclass + PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb new file mode 100644 index 000000000000..05510520f427 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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/v3/access_policies/rest" +require "google/iam/v3/policy_bindings/rest" +require "google/iam/v3/principal_access_boundary_policies/rest" +require "google/iam/v3/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v3/rest" + # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new + # + module V3 + end + end +end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb new file mode 100644 index 000000000000..9892bb2c28a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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 V3 + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/README.md b/owl-bot-staging/google-iam-v3/proto_docs/README.md new file mode 100644 index 000000000000..02d67f814ded --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/README.md @@ -0,0 +1,4 @@ +# Identity and Access Management (IAM) V3 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-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/iam/v3/access_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb new file mode 100644 index 000000000000..b3782521c647 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + # Request message for CreateAccessPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] access_policy_id + # @return [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @!attribute [rw] access_policy + # @return [::Google::Iam::V3::AccessPolicy] + # Required. The access policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetAccessPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + class GetAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateAccessPolicy method. + # @!attribute [rw] access_policy + # @return [::Google::Iam::V3::AccessPolicy] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + class UpdateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteAccessPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + class DeleteAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListAccessPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + class ListAccessPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListAccessPolicies method. + # @!attribute [rw] access_policies + # @return [::Array<::Google::Iam::V3::AccessPolicy>] + # The access policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListAccessPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchAccessPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchAccessPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchAccessPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchAccessPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb new file mode 100644 index 000000000000..e48355d50330 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb @@ -0,0 +1,223 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + # An IAM access policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the access policy. + # + # The following formats are supported: + # + # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` + # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` + # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` + # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the access policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the access policy. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the access policy. Must be less than + # or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the access policy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the access policy was most recently + # updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3::AccessPolicyDetails] + # Optional. The details for the access policy. + class AccessPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Access policy details. + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3::AccessPolicyRule>] + # Required. A list of access policy rules. + class AccessPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Access Policy Rule that determines the behavior of the policy. + # @!attribute [rw] description + # @return [::String] + # Optional. Customer specified description of the rule. Must be less than or + # equal to 256 characters. + # @!attribute [rw] effect + # @return [::Google::Iam::V3::AccessPolicyRule::Effect] + # Required. The effect of the rule. + # @!attribute [rw] principals + # @return [::Array<::String>] + # Required. The identities for which this rule's effect governs using one or + # more permissions on Google Cloud resources. This field can contain the + # following values: + # + # * `principal://goog/subject/{email_id}`: A specific Google Account. + # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + # example, `principal://goog/subject/alice@example.com`. + # + # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + # A Google Cloud service account. For example, + # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + # + # * `principalSet://goog/group/{group_id}`: A Google group. For example, + # `principalSet://goog/group/admins@example.com`. + # + # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + # principals associated with the specified Google Workspace or Cloud + # Identity customer ID. For example, + # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + # + # + # If an identifier that was previously set on a policy is soft deleted, then + # calls to read that policy will return the identifier with a deleted + # prefix. Users cannot set identifiers with this syntax. + # + # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + # Google Account that was deleted recently. For example, + # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + # the Google Account is recovered, this identifier reverts to the standard + # identifier for a Google Account. + # + # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + # that was deleted recently. For example, + # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. + # If the Google group is restored, this identifier reverts to the standard + # identifier for a Google group. + # + # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + # A Google Cloud service account that was deleted recently. For example, + # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + # If the service account is undeleted, this identifier reverts to the + # standard identifier for a service account. + # @!attribute [rw] excluded_principals + # @return [::Array<::String>] + # Optional. The identities that are excluded from the access policy rule, + # even if they are listed in the `principals`. For example, you could add a + # Google group to the `principals`, then exclude specific users who belong to + # that group. + # @!attribute [rw] operation + # @return [::Google::Iam::V3::AccessPolicyRule::Operation] + # Required. Attributes that are used to determine whether this rule applies + # to a request. + # @!attribute [rw] conditions + # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] + # Optional. The conditions that determine whether this rule applies to a + # request. Conditions are identified by their key, which is the FQDN of the + # service that they are relevant to. For example: + # + # ``` + # "conditions": { + # "iam.googleapis.com": { + # "expression": + # } + # } + # ``` + # + # Each rule is evaluated independently. If this rule does not apply + # to a request, other rules might still apply. + # Currently supported keys are as follows: + # + # + # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate + # resource fields. + # + # * `iam.googleapis.com`: Can use `CEL` functions that evaluate + # [resource + # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and + # combine them using boolean and logical operators. Other functions and + # operators are not supported. + class AccessPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Attributes that are used to determine whether this rule applies to a + # request. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # Optional. The permissions that are explicitly affected by this rule. Each + # permission uses the format `{service_fqdn}/{resource}.{verb}`, where + # `{service_fqdn}` is the fully qualified domain name for the service. + # Currently supported permissions are as follows: + # + # * `eventarc.googleapis.com/messageBuses.publish`. + # @!attribute [rw] excluded_permissions + # @return [::Array<::String>] + # Optional. Specifies the permissions that this rule excludes from the set + # of affected permissions given by `permissions`. If a permission appears + # in `permissions` _and_ in `excluded_permissions` then it will _not_ be + # subject to the policy effect. + # + # The excluded permissions can be specified using the same syntax as + # `permissions`. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Type::Expr] + class ConditionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An effect to describe the access relationship. + module Effect + # The effect is unspecified. + EFFECT_UNSPECIFIED = 0 + + # The policy will deny access if it evaluates to true. + DENY = 1 + + # The policy will grant access if it evaluates to true. + ALLOW = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb new file mode 100644 index 000000000000..42ec222a1f98 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.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! + + +module Google + module Iam + module V3 + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb new file mode 100644 index 000000000000..129656c0a2bd --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb @@ -0,0 +1,193 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + # IAM policy binding resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the policy binding, in the format + # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + # The binding parent is the closest Resource Manager resource (project, + # folder, or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the policy binding. Assigned when + # the policy binding is created. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the policy binding. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the policy binding. Must be less than or equal + # to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [rw] target + # @return [::Google::Iam::V3::PolicyBinding::Target] + # Required. Immutable. The full resource name of the resource to which the + # policy will be bound. Immutable once set. + # @!attribute [rw] policy_kind + # @return [::Google::Iam::V3::PolicyBinding::PolicyKind] + # Immutable. The kind of the policy to attach in this binding. This field + # must be one of the following: + # + # - Left empty (will be automatically set to the policy kind) + # - The input policy kind + # @!attribute [rw] policy + # @return [::String] + # Required. Immutable. The resource name of the policy to be bound. The + # binding parent and policy must belong to the same organization. + # @!attribute [r] policy_uid + # @return [::String] + # Output only. The globally unique ID of the policy to be bound. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. The condition to apply to the policy binding. When set, the + # `expression` field in the `Expr` must include from 1 to 10 subexpressions, + # joined by the + # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + # cannot contain more than 250 characters. + # + # The condition is currently only supported when bound to policies of kind + # principal access boundary. + # + # When the bound policy is a principal access boundary policy, the only + # supported attributes in any subexpression are `principal.type` and + # `principal.subject`. An example expression is: "principal.type == + # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + # 'bob@example.com'". + # + # Allowed operations for `principal.subject`: + # + # - `principal.subject == ` + # - `principal.subject != ` + # - `principal.subject in []` + # - `principal.subject.startsWith()` + # - `principal.subject.endsWith()` + # + # Allowed operations for `principal.type`: + # + # - `principal.type == ` + # - `principal.type != ` + # - `principal.type in []` + # + # Supported principal types are workspace, workforce pool, workload pool, + # service account, and agent identity. Allowed string must be one of: + # + # - `iam.googleapis.com/WorkspaceIdentity` + # - `iam.googleapis.com/WorkforcePoolIdentity` + # - `iam.googleapis.com/WorkloadPoolIdentity` + # - `iam.googleapis.com/ServiceAccount` + # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was most recently updated. + class PolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The full resource name of the resource to which the policy will + # be bound. Immutable once set. + # @!attribute [rw] principal_set + # @return [::String] + # Immutable. The full resource name that's used for principal access + # boundary policy bindings. The principal set must be directly parented + # by the policy binding's parent or same as the parent if the target is a + # project, folder, or organization. + # + # Examples: + # + # * For bindings parented by an organization: + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Workforce Identity: + # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + # * Workspace Identity: + # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * For bindings parented by a folder: + # * Folder: + # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * For bindings parented by a project: + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # * Workload Identity Pool: + # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + # + # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource + # @return [::String] + # Immutable. The full resource name that's used for access policy + # bindings. + # + # Examples: + # + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # + # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Target + 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 + + # The different policy kinds supported in this binding. + module PolicyKind + # Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0 + + # Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1 + + # Access policy kind. + ACCESS = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb new file mode 100644 index 000000000000..57bd8a00aca7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3 + # Request message for CreatePolicyBinding method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] policy_binding_id + # @return [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3::PolicyBinding] + # Required. The policy binding to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + class GetPolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePolicyBinding method. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3::PolicyBinding] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + class DeletePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPolicyBindings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + class ListPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchTargetPolicyBindings method. + # @!attribute [rw] target + # @return [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + class SearchTargetPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchTargetPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings bound to the specified target. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchTargetPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb new file mode 100644 index 000000000000..bd02495524b4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.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 Iam + module V3 + # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] principal_access_boundary_policy_id + # @return [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + class GetPrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + class DeletePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + class ListPrincipalAccessBoundaryPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] principal_access_boundary_policies + # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] + # The principal access boundary policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPrincipalAccessBoundaryPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchPrincipalAccessBoundaryPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchPrincipalAccessBoundaryPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb new file mode 100644 index 000000000000..40b6170b1a17 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.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 Iam + module V3 + # An IAM principal access boundary policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the principal access boundary policy. + # + # The following format is supported: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the principal access boundary + # policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the principal access boundary. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the principal access boundary policy. Must be + # less than or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was most + # recently updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyDetails] + # Optional. The details for the principal access boundary policy. + class PrincipalAccessBoundaryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Principal access boundary policy details + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule>] + # Required. A list of principal access boundary policy rules. The number of + # rules in a policy is limited to 500. + # @!attribute [rw] enforcement_version + # @return [::String] + # Optional. + # The version number (for example, `1` or `latest`) that indicates which + # permissions are able to be blocked by the policy. If empty, the PAB policy + # version will be set to the most recent version number at the time of the + # policy's creation. + class PrincipalAccessBoundaryPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Principal access boundary policy rule that defines the resource boundary. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the principal access boundary policy rule. + # Must be less than or equal to 256 characters. + # @!attribute [rw] resources + # @return [::Array<::String>] + # Required. A list of Resource Manager resources. If a resource is listed in + # the rule, then the rule applies for that resource and its descendants. The + # number of resources in a policy is limited to 500 across all rules in the + # policy. + # + # The following resource types are supported: + # + # * Organizations, such as + # `//cloudresourcemanager.googleapis.com/organizations/123`. + # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + # @!attribute [rw] effect + # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule::Effect] + # Required. The access relationship of principals to the resources in this + # rule. + class PrincipalAccessBoundaryPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An effect to describe the access relationship. + module Effect + # Effect unspecified. + EFFECT_UNSPECIFIED = 0 + + # Allows access to the resources in this rule. + ALLOW = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-iam-v3/snippets/Gemfile b/owl-bot-staging/google-iam-v3/snippets/Gemfile new file mode 100644 index 000000000000..1ae54b711716 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/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-v3", path: "../" +else + gem "google-iam-v3" +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-v3/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb new file mode 100644 index 000000000000..ccba13dceefe --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the create_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#create_access_policy. +# +def create_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::CreateAccessPolicyRequest.new + + # Call the create_access_policy method. + result = client.create_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb new file mode 100644 index 000000000000..57f7195106d1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the delete_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#delete_access_policy. +# +def delete_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::DeleteAccessPolicyRequest.new + + # Call the delete_access_policy method. + result = client.delete_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb new file mode 100644 index 000000000000..8337285156bd --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the get_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#get_access_policy. +# +def get_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::GetAccessPolicyRequest.new + + # Call the get_access_policy method. + result = client.get_access_policy request + + # The returned object is of type Google::Iam::V3::AccessPolicy. + p result +end +# [END iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb new file mode 100644 index 000000000000..a0b969343be2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] +require "google/iam/v3" + +## +# Snippet for the list_access_policies call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#list_access_policies. +# +def list_access_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::ListAccessPoliciesRequest.new + + # Call the list_access_policies method. + result = client.list_access_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::AccessPolicy. + p item + end +end +# [END iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb new file mode 100644 index 000000000000..7ae560724f08 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the search_access_policy_bindings call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#search_access_policy_bindings. +# +def search_access_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new + + # Call the search_access_policy_bindings method. + result = client.search_access_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb new file mode 100644 index 000000000000..983d990c3afd --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the update_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#update_access_policy. +# +def update_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::UpdateAccessPolicyRequest.new + + # Call the update_access_policy method. + result = client.update_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb new file mode 100644 index 000000000000..df4ee7219d1d --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the create_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#create_policy_binding. +# +def create_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::CreatePolicyBindingRequest.new + + # Call the create_policy_binding method. + result = client.create_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb new file mode 100644 index 000000000000..55f3efffd3e3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the delete_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#delete_policy_binding. +# +def delete_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::DeletePolicyBindingRequest.new + + # Call the delete_policy_binding method. + result = client.delete_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb new file mode 100644 index 000000000000..94c0c21f6316 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the get_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#get_policy_binding. +# +def get_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::GetPolicyBindingRequest.new + + # Call the get_policy_binding method. + result = client.get_policy_binding request + + # The returned object is of type Google::Iam::V3::PolicyBinding. + p result +end +# [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb new file mode 100644 index 000000000000..2dbb442b3771 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the list_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#list_policy_bindings. +# +def list_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::ListPolicyBindingsRequest.new + + # Call the list_policy_bindings method. + result = client.list_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb new file mode 100644 index 000000000000..46f121f588f0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the search_target_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#search_target_policy_bindings. +# +def search_target_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new + + # Call the search_target_policy_bindings method. + result = client.search_target_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb new file mode 100644 index 000000000000..10cbd400a9ef --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] +require "google/iam/v3" + +## +# Snippet for the update_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#update_policy_binding. +# +def update_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::UpdatePolicyBindingRequest.new + + # Call the update_policy_binding method. + result = client.update_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..b4700ad72f99 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. +# +def create_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new + + # Call the create_principal_access_boundary_policy method. + result = client.create_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..85f48ef8c04a --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. +# +def delete_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new + + # Call the delete_principal_access_boundary_policy method. + result = client.delete_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..ac50d60e307f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. +# +def get_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new + + # Call the get_principal_access_boundary_policy method. + result = client.get_principal_access_boundary_policy request + + # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. + p result +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb new file mode 100644 index 000000000000..b3c624c9b24f --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +require "google/iam/v3" + +## +# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. +# +def list_principal_access_boundary_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new + + # Call the list_principal_access_boundary_policies method. + result = client.list_principal_access_boundary_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. + p item + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb new file mode 100644 index 000000000000..7a39b0874454 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +require "google/iam/v3" + +## +# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. +# +def search_principal_access_boundary_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + + # Call the search_principal_access_boundary_policy_bindings method. + result = client.search_principal_access_boundary_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3::PolicyBinding. + p item + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..0b6bc521c7f0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3" + +## +# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. +# +def update_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new + + # Call the update_principal_access_boundary_policy method. + result = client.update_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json new file mode 100644 index 000000000000..8bdcc14e1760 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json @@ -0,0 +1,735 @@ +{ + "client_library": { + "name": "google-iam-v3", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v3", + "version": "v3" + } + ] + }, + "snippets": [ + { + "region_tag": "iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync", + "title": "Snippet for the create_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#create_access_policy.", + "file": "access_policies/create_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_policy", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#create_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::CreateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "CreateAccessPolicy", + "full_name": "google.iam.v3.AccessPolicies.CreateAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_AccessPolicies_GetAccessPolicy_sync", + "title": "Snippet for the get_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#get_access_policy.", + "file": "access_policies/get_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_policy", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#get_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::GetAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::AccessPolicy", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "GetAccessPolicy", + "full_name": "google.iam.v3.AccessPolicies.GetAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync", + "title": "Snippet for the update_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#update_access_policy.", + "file": "access_policies/update_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_policy", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#update_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::UpdateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "UpdateAccessPolicy", + "full_name": "google.iam.v3.AccessPolicies.UpdateAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync", + "title": "Snippet for the delete_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#delete_access_policy.", + "file": "access_policies/delete_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_policy", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#delete_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::DeleteAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "DeleteAccessPolicy", + "full_name": "google.iam.v3.AccessPolicies.DeleteAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_AccessPolicies_ListAccessPolicies_sync", + "title": "Snippet for the list_access_policies call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#list_access_policies.", + "file": "access_policies/list_access_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_policies", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#list_access_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::ListAccessPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::ListAccessPoliciesResponse", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "ListAccessPolicies", + "full_name": "google.iam.v3.AccessPolicies.ListAccessPolicies", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync", + "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings.", + "file": "access_policies/search_access_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_access_policy_bindings", + "full_name": "::Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::SearchAccessPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::SearchAccessPolicyBindingsResponse", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3::AccessPolicies::Client" + }, + "method": { + "short_name": "SearchAccessPolicyBindings", + "full_name": "google.iam.v3.AccessPolicies.SearchAccessPolicyBindings", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync", + "title": "Snippet for the create_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#create_policy_binding.", + "file": "policy_bindings/create_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#create_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::CreatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "CreatePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.CreatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_GetPolicyBinding_sync", + "title": "Snippet for the get_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#get_policy_binding.", + "file": "policy_bindings/get_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#get_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::GetPolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::PolicyBinding", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "GetPolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.GetPolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync", + "title": "Snippet for the update_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#update_policy_binding.", + "file": "policy_bindings/update_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#update_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::UpdatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "UpdatePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.UpdatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync", + "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#delete_policy_binding.", + "file": "policy_bindings/delete_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_policy_binding", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#delete_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::DeletePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "DeletePolicyBinding", + "full_name": "google.iam.v3.PolicyBindings.DeletePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_ListPolicyBindings_sync", + "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#list_policy_bindings.", + "file": "policy_bindings/list_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_policy_bindings", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#list_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::ListPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::ListPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "ListPolicyBindings", + "full_name": "google.iam.v3.PolicyBindings.ListPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync", + "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings.", + "file": "policy_bindings/search_target_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_target_policy_bindings", + "full_name": "::Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::SearchTargetPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::SearchTargetPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3::PolicyBindings::Client" + }, + "method": { + "short_name": "SearchTargetPolicyBindings", + "full_name": "google.iam.v3.PolicyBindings.SearchTargetPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "CreatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::PrincipalAccessBoundaryPolicy", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "GetPrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "UpdatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "DeletePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", + "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", + "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_principal_access_boundary_policies", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "ListPrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", + "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", + "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_principal_access_boundary_policy_bindings", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" + } + } + }, + "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-iam-v3/test/google/iam/v3/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb new file mode 100644 index 000000000000..838351043997 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_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/iam/v3/access_policies_service_pb" +require "google/iam/v3/access_policies_service_services_pb" +require "google/iam/v3/access_policies" + +class ::Google::Iam::V3::AccessPolicies::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb new file mode 100644 index 000000000000..3d3d9f4eab12 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3/access_policies" + +class ::Google::Iam::V3::AccessPolicies::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_access_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" + assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path + + path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" + assert_equal "folders/value0/locations/value1/accessPolicies/value2", path + + path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" + assert_equal "projects/value0/locations/value1/accessPolicies/value2", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb new file mode 100644 index 000000000000..b216679e69d9 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v3/access_policies_service_pb" +require "google/iam/v3/access_policies/rest" + + +class ::Google::Iam::V3::AccessPolicies::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_access_policy + # Create test objects. + 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" + access_policy_id = "hello world" + access_policy = {} + validate_only = true + + create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_policy_client_stub.call_count + end + end + end + + def test_get_access_policy + # Create test objects. + client_result = ::Google::Iam::V3::AccessPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_count + end + end + end + + def test_update_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + access_policy = {} + validate_only = true + + update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_access_policy_client_stub.call_count + end + end + end + + def test_delete_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_policy_client_stub.call_count + end + end + end + + def test_list_access_policies + # Create test objects. + client_result = ::Google::Iam::V3::ListAccessPoliciesResponse.new + http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count + end + end + end + + def test_search_access_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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" + + search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3::AccessPolicies::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::V3::AccessPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb new file mode 100644 index 000000000000..38eee57ac950 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb @@ -0,0 +1,513 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3/access_policies_service_pb" +require "google/iam/v3/access_policies" + +class ::Google::Iam::V3::AccessPolicies::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_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_policy_id = "hello world" + access_policy = {} + validate_only = true + + create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_policy, name + assert_kind_of ::Google::Iam::V3::CreateAccessPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["access_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_get_access_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::AccessPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_policy, name + assert_kind_of ::Google::Iam::V3::GetAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_access_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_access_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_access_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_rpc_count + end + end + + def test_update_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + access_policy = {} + validate_only = true + + update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_policy, name + assert_kind_of ::Google::Iam::V3::UpdateAccessPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_access_policy_client_stub.call_rpc_count + end + end + + def test_delete_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_policy, name + assert_kind_of ::Google::Iam::V3::DeleteAccessPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_list_access_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::ListAccessPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_policies, name + assert_kind_of ::Google::Iam::V3::ListAccessPoliciesRequest, 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_access_policies_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count + end + end + + def test_search_access_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_access_policy_bindings, name + assert_kind_of ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::AccessPolicies::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::V3::AccessPolicies::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::V3::AccessPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3::AccessPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb new file mode 100644 index 000000000000..e943464fa885 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings_service_services_pb" +require "google/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb new file mode 100644 index 000000000000..e21017f180db --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::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_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_policy_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" + assert_equal "organizations/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" + assert_equal "folders/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" + assert_equal "projects/value0/locations/value1/policyBindings/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb new file mode 100644 index 000000000000..b5dc95e769d7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb @@ -0,0 +1,437 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings/rest" + + +class ::Google::Iam::V3::PolicyBindings::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_policy_binding + # Create test objects. + 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" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_count + end + end + end + + def test_get_policy_binding + # Create test objects. + client_result = ::Google::Iam::V3::PolicyBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_policy_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_policy_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_policy_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_count + end + end + end + + def test_update_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_count + end + end + end + + def test_delete_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_count + end + end + end + + def test_list_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::ListPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_policy_bindings_client_stub.call_count + end + end + end + + def test_search_target_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + filter = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_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::V3::PolicyBindings::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::V3::PolicyBindings::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb new file mode 100644 index 000000000000..4b213c2a9bdc --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb @@ -0,0 +1,519 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3/policy_bindings_service_pb" +require "google/iam/v3/policy_bindings" + +class ::Google::Iam::V3::PolicyBindings::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_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_policy_binding, name + assert_kind_of ::Google::Iam::V3::CreatePolicyBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["policy_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count + end + end + + def test_get_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::PolicyBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy_binding, name + assert_kind_of ::Google::Iam::V3::GetPolicyBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_rpc_count + end + end + + def test_update_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy_binding, name + assert_kind_of ::Google::Iam::V3::UpdatePolicyBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_rpc_count + end + end + + def test_delete_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_policy_binding, name + assert_kind_of ::Google::Iam::V3::DeletePolicyBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_rpc_count + end + end + + def test_list_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::ListPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_policy_bindings, name + assert_kind_of ::Google::Iam::V3::ListPolicyBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_policy_bindings_client_stub.call_rpc_count + end + end + + def test_search_target_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + filter = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_target_policy_bindings, name + assert_kind_of ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, request + assert_equal "hello world", request["target"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PolicyBindings::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::V3::PolicyBindings::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::V3::PolicyBindings::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3::PolicyBindings::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb new file mode 100644 index 000000000000..0a55e6e6e754 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies_service_services_pb" +require "google/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb new file mode 100644 index 000000000000..28fb979db795 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_principal_access_boundary_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" + assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb new file mode 100644 index 000000000000..49521b2824c3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies/rest" + + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create test objects. + 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" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_get_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_principal_access_boundary_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_principal_access_boundary_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_update_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_delete_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_list_principal_access_boundary_policies + # Create test objects. + client_result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new + http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count + end + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb new file mode 100644 index 000000000000..414ee9e0e6e3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb @@ -0,0 +1,515 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3/principal_access_boundary_policies_service_pb" +require "google/iam/v3/principal_access_boundary_policies" + +class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["principal_access_boundary_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_get_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_principal_access_boundary_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_principal_access_boundary_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_update_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_delete_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_list_principal_access_boundary_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_principal_access_boundary_policies, name + assert_kind_of ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_principal_access_boundary_policy_bindings, name + assert_kind_of ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3/test/helper.rb b/owl-bot-staging/google-iam-v3/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-v3beta/.gitignore b/owl-bot-staging/google-iam-v3beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json new file mode 100644 index 000000000000..ef94dec23f48 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest", + "distribution_name": "google-iam-v3beta", + "is_cloud": true, + "language": "ruby", + "name": "iam", + "name_pretty": "Identity and Access Management (IAM) V3BETA API", + "product_documentation": "https://cloud.google.com/iam/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-v3beta/.rubocop.yml b/owl-bot-staging/google-iam-v3beta/.rubocop.yml new file mode 100644 index 000000000000..b142b763dfa7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-v3beta.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-v3beta.rb" diff --git a/owl-bot-staging/google-iam-v3beta/.toys.rb b/owl-bot-staging/google-iam-v3beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.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-v3beta/.yardopts b/owl-bot-staging/google-iam-v3beta/.yardopts new file mode 100644 index 000000000000..10df2b7003ed --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Identity and Access Management (IAM) V3BETA 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-v3beta/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md new file mode 100644 index 000000000000..c0ff8a06e810 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-v3beta 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-v3beta 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/v3beta" + +client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/v3beta" + +::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta +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/v3beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta/CHANGELOG.md b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-v3beta/Gemfile b/owl-bot-staging/google-iam-v3beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3beta/LICENSE.md b/owl-bot-staging/google-iam-v3beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta/README.md b/owl-bot-staging/google-iam-v3beta/README.md new file mode 100644 index 000000000000..704ed8c7a1e5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Identity and Access Management (IAM) V3BETA API + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Identity and Access Management (IAM) V3BETA API. Most users should consider using +the main client gem, +[google-iam](https://rubygems.org/gems/google-iam). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-v3beta +``` + +## 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/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/v3beta" + +client = ::Google::Iam::V3beta::AccessPolicies::Client.new +request = ::Google::Iam::V3beta::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) +response = client.create_access_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/iam/v3beta" +require "logger" + +client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam`, +and lower-level _versioned_ client libraries with names such as +`google-iam-v3beta`. +_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-v3beta`. + +### 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-v3beta/Rakefile b/owl-bot-staging/google-iam-v3beta/Rakefile new file mode 100644 index 000000000000..14994400cce6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta 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/v3beta/access_policies/credentials" + ::Google::Iam::V3beta::AccessPolicies::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-v3beta 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-v3beta 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-v3beta 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-v3beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-v3beta" + header "google-iam-v3beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-v3beta yard", "*" + Rake::Task[:yard].invoke + header "google-iam-v3beta 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-v3beta 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-v3beta 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-v3beta/gapic_metadata.json b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json new file mode 100644 index 000000000000..13391b62f322 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json @@ -0,0 +1,126 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.iam.v3beta", + "libraryPackage": "::Google::Iam::V3beta", + "services": { + "AccessPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3beta::AccessPolicies::Client", + "rpcs": { + "CreateAccessPolicy": { + "methods": [ + "create_access_policy" + ] + }, + "GetAccessPolicy": { + "methods": [ + "get_access_policy" + ] + }, + "UpdateAccessPolicy": { + "methods": [ + "update_access_policy" + ] + }, + "DeleteAccessPolicy": { + "methods": [ + "delete_access_policy" + ] + }, + "ListAccessPolicies": { + "methods": [ + "list_access_policies" + ] + }, + "SearchAccessPolicyBindings": { + "methods": [ + "search_access_policy_bindings" + ] + } + } + } + } + }, + "PolicyBindings": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3beta::PolicyBindings::Client", + "rpcs": { + "CreatePolicyBinding": { + "methods": [ + "create_policy_binding" + ] + }, + "GetPolicyBinding": { + "methods": [ + "get_policy_binding" + ] + }, + "UpdatePolicyBinding": { + "methods": [ + "update_policy_binding" + ] + }, + "DeletePolicyBinding": { + "methods": [ + "delete_policy_binding" + ] + }, + "ListPolicyBindings": { + "methods": [ + "list_policy_bindings" + ] + }, + "SearchTargetPolicyBindings": { + "methods": [ + "search_target_policy_bindings" + ] + } + } + } + } + }, + "PrincipalAccessBoundaryPolicies": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client", + "rpcs": { + "CreatePrincipalAccessBoundaryPolicy": { + "methods": [ + "create_principal_access_boundary_policy" + ] + }, + "GetPrincipalAccessBoundaryPolicy": { + "methods": [ + "get_principal_access_boundary_policy" + ] + }, + "UpdatePrincipalAccessBoundaryPolicy": { + "methods": [ + "update_principal_access_boundary_policy" + ] + }, + "DeletePrincipalAccessBoundaryPolicy": { + "methods": [ + "delete_principal_access_boundary_policy" + ] + }, + "ListPrincipalAccessBoundaryPolicies": { + "methods": [ + "list_principal_access_boundary_policies" + ] + }, + "SearchPrincipalAccessBoundaryPolicyBindings": { + "methods": [ + "search_principal_access_boundary_policy_bindings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec new file mode 100644 index 000000000000..8665c0d463a7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/v3beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-v3beta" + gem.version = Google::Iam::V3beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." + gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb new file mode 100644 index 000000000000..462c76ed1789 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.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/v3beta" diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb new file mode 100644 index 000000000000..890afcf2e734 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.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/v3beta/access_policies" +require "google/iam/v3beta/policy_bindings" +require "google/iam/v3beta/principal_access_boundary_policies" +require "google/iam/v3beta/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v3beta" + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v3beta" + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + module V3beta + end + end +end + +helper_path = ::File.join __dir__, "v3beta", "_helpers.rb" +require "google/iam/v3beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb new file mode 100644 index 000000000000..20869cea6d21 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3beta/version" + +require "google/iam/v3beta/access_policies/credentials" +require "google/iam/v3beta/access_policies/paths" +require "google/iam/v3beta/access_policies/operations" +require "google/iam/v3beta/access_policies/client" +require "google/iam/v3beta/access_policies/rest" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) access policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3beta/access_policies" + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3beta/access_policies/rest" + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + module AccessPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "access_policies", "helpers.rb" +require "google/iam/v3beta/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb new file mode 100644 index 000000000000..31f774afb06b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb @@ -0,0 +1,1113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/access_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3beta + module AccessPolicies + ## + # Client for the AccessPolicies service. + # + # Manages Identity and Access Management (IAM) access policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_policies_stub + + ## + # Configure the AccessPolicies Client class. + # + # See {::Google::Iam::V3beta::AccessPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessPolicies clients + # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| + # config.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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_access_policy.timeout = 30.0 + + default_config.rpcs.get_access_policy.timeout = 60.0 + default_config.rpcs.get_access_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_access_policy.timeout = 30.0 + + default_config.rpcs.delete_access_policy.timeout = 30.0 + + default_config.rpcs.list_access_policies.timeout = 60.0 + default_config.rpcs.list_access_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_access_policy_bindings.timeout = 60.0 + default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @access_policies_stub.universe_domain + end + + ## + # Create a new AccessPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessPolicies 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/v3beta/access_policies_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @access_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3beta::AccessPolicies::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @access_policies_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 = @access_policies_stub.endpoint + config.universe_domain = @access_policies_stub.universe_domain + config.logger = @access_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::AccessPolicies::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 + @access_policies_stub.logger + end + + # Service calls + + ## + # Creates an access policy, and returns a long running operation. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param access_policy_id [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] + # Required. The access policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an access policy. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3beta::AccessPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3beta::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Iam::V3beta::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an access policy. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_policy(access_policy: nil, validate_only: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.access_policy&.name + header_params["access_policy.name"] = request.access_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an access policy. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @param etag [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 access policies. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_access_policy_bindings(request, options = nil) + # Pass arguments to `search_access_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new + # + # # Call the search_access_policy_bindings method. + # result = client.search_access_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_access_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest + + # Converts hash and nil to 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_access_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. + # + # This class represents the configuration for AccessPolicies, + # providing control 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::V3beta::AccessPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_access_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccessPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `search_access_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_access_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings + @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb new file mode 100644 index 000000000000..c1cd49c60577 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3beta + module AccessPolicies + # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb new file mode 100644 index 000000000000..975565993773 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/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 Iam + module V3beta + module AccessPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb new file mode 100644 index 000000000000..84aeb6908123 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + module AccessPolicies + # Path helper methods for the AccessPolicies API. + module Paths + ## + # Create a fully-qualified AccessPolicy resource string. + # + # @overload access_policy_path(organization:, location:, access_policy:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` + # + # @param organization [String] + # @param location [String] + # @param access_policy [String] + # + # @overload access_policy_path(folder:, location:, access_policy:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` + # + # @param folder [String] + # @param location [String] + # @param access_policy [String] + # + # @overload access_policy_path(project:, location:, access_policy:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` + # + # @param project [String] + # @param location [String] + # @param access_policy [String] + # + # @return [::String] + def access_policy_path **args + resources = { + "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" + end), + "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" + end), + "access_policy:location:project" => (proc do |project:, location:, access_policy:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb new file mode 100644 index 000000000000..38167d9c3b28 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/iam/v3beta/version" + +require "google/iam/v3beta/access_policies/credentials" +require "google/iam/v3beta/access_policies/paths" +require "google/iam/v3beta/access_policies/rest/operations" +require "google/iam/v3beta/access_policies/rest/client" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) access policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3beta/access_policies/rest" + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + module AccessPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3beta/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb new file mode 100644 index 000000000000..d1cad6e25fbd --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb @@ -0,0 +1,1028 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/access_policies_service_pb" +require "google/iam/v3beta/access_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3beta + module AccessPolicies + module Rest + ## + # REST client for the AccessPolicies service. + # + # Manages Identity and Access Management (IAM) access policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_policies_stub + + ## + # Configure the AccessPolicies Client class. + # + # See {::Google::Iam::V3beta::AccessPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessPolicies clients + # ::Google::Iam::V3beta::AccessPolicies::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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_access_policy.timeout = 30.0 + + default_config.rpcs.get_access_policy.timeout = 60.0 + default_config.rpcs.get_access_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_access_policy.timeout = 30.0 + + default_config.rpcs.delete_access_policy.timeout = 30.0 + + default_config.rpcs.list_access_policies.timeout = 60.0 + default_config.rpcs.list_access_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_access_policy_bindings.timeout = 60.0 + default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::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 + @access_policies_stub.universe_domain + end + + ## + # Create a new AccessPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessPolicies 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::Iam::V3beta::AccessPolicies::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 + + @access_policies_stub = ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @access_policies_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 = @access_policies_stub.endpoint + config.universe_domain = @access_policies_stub.universe_domain + config.logger = @access_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::AccessPolicies::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 + @access_policies_stub.logger + end + + # Service calls + + ## + # Creates an access policy, and returns a long running operation. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param access_policy_id [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] + # Required. The access policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest + + # Converts hash and nil to an 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_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.create_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an access policy. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3beta::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Iam::V3beta::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.get_access_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an access policy. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_policy(access_policy: nil, validate_only: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.update_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an access policy. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @param etag [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.delete_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.list_access_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_access_policy_bindings(request, options = nil) + # Pass arguments to `search_access_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new + # + # # Call the search_access_policy_bindings method. + # result = client.search_access_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_access_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest + + # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_policies_stub.search_access_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. + # + # This class represents the configuration for AccessPolicies 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::V3beta::AccessPolicies::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_access_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::AccessPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_access_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 AccessPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `search_access_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_access_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings + @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb new file mode 100644 index 000000000000..32bb3c79773a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module AccessPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb new file mode 100644 index 000000000000..932dd88668d4 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3beta/access_policies_service_pb" + +module Google + module Iam + module V3beta + module AccessPolicies + module Rest + ## + # REST service stub for the AccessPolicies 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_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::AccessPolicy] + # A result object deserialized from the server's reply + def get_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::AccessPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_access_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::ListAccessPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::ListAccessPoliciesResponse] + # A result object deserialized from the server's reply + def list_access_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.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_access_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::SearchAccessPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_access_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] + # 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_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/accessPolicies", + body: "access_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{access_policy.name}", + body: "access_policy", + matches: [ + ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/accessPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/accessPolicies", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/accessPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_access_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] + # 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_access_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb new file mode 100644 index 000000000000..f20f2856a2e5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/access_policies_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3beta/access_policy_resources_pb' +require 'google/iam/v3beta/operation_metadata_pb' +require 'google/iam/v3beta/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n/google/iam/v3beta/access_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/iam/v3beta/access_policy_resources.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xcc\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"t\n\x19UpdateAccessPolicyRequest\x12;\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"t\n\x1aListAccessPoliciesResponse\x12\x38\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3beta.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchAccessPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xbe\x11\n\x0e\x41\x63\x63\x65ssPolicies\x12\x94\x03\n\x12\x43reateAccessPolicy\x12,.google.iam.v3beta.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xdd\x01\"6/v3beta/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZF\"5/v3beta/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZL\";/v3beta/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x9e\x02\n\x0fGetAccessPolicy\x12).google.iam.v3beta.GetAccessPolicyRequest\x1a\x1f.google.iam.v3beta.AccessPolicy\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\x96\x03\n\x12UpdateAccessPolicy\x12,.google.iam.v3beta.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x87\x02\x32\x44/v3beta/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZT2C/v3beta/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZZ2I/v3beta/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xcf\x02\n\x12\x44\x65leteAccessPolicy\x12,.google.iam.v3beta.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7*5/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=*;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\xb4\x02\n\x12ListAccessPolicies\x12,.google.iam.v3beta.ListAccessPoliciesRequest\x1a-.google.iam.v3beta.ListAccessPoliciesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/accessPoliciesZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/accessPoliciesZ=\x12;/v3beta/{parent=organizations/*/locations/*}/accessPolicies\x12\x89\x03\n\x1aSearchAccessPolicyBindings\x12\x34.google.iam.v3beta.SearchAccessPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchAccessPolicyBindingsResponse\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v3beta/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZL\x12J/v3beta/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZM\x12K/v3beta/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x01\n\x15\x63om.google.iam.v3betaB\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreateAccessPolicyRequest").msgclass + GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetAccessPolicyRequest").msgclass + UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdateAccessPolicyRequest").msgclass + DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeleteAccessPolicyRequest").msgclass + ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesRequest").msgclass + ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesResponse").msgclass + SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsRequest").msgclass + SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb new file mode 100644 index 000000000000..fb03418341a3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3beta/access_policies_service.proto for package 'google.iam.v3beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3beta/access_policies_service_pb' + +module Google + module Iam + module V3beta + module AccessPolicies + # Manages Identity and Access Management (IAM) access policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3beta.AccessPolicies' + + # Creates an access policy, and returns a long running operation. + rpc :CreateAccessPolicy, ::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Google::Longrunning::Operation + # Gets an access policy. + rpc :GetAccessPolicy, ::Google::Iam::V3beta::GetAccessPolicyRequest, ::Google::Iam::V3beta::AccessPolicy + # Updates an access policy. + rpc :UpdateAccessPolicy, ::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation + # Deletes an access policy. + rpc :DeleteAccessPolicy, ::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation + # Lists access policies. + rpc :ListAccessPolicies, ::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Google::Iam::V3beta::ListAccessPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchAccessPolicyBindings, ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb new file mode 100644 index 000000000000..43366a70afff --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/access_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n/google/iam/v3beta/access_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb9\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12J\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x30.google.iam.v3beta.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32&.google.iam.v3beta.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"N\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x37\n\x05rules\x18\x01 \x03(\x0b\x32#.google.iam.v3beta.AccessPolicyRuleB\x03\xe0\x41\x02\"\xa9\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32*.google.iam.v3beta.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x45\n\toperation\x18\n \x01(\x0b\x32-.google.iam.v3beta.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12L\n\nconditions\x18\t \x03(\x0b\x32\x33.google.iam.v3beta.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x98\x01\n\x15\x63om.google.iam.v3betaB\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicy").msgclass + AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyDetails").msgclass + AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule").msgclass + AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Operation").msgclass + AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb new file mode 100644 index 000000000000..84f3e0210548 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/operation_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/iam/v3beta/operation_metadata.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x94\x01\n\x15\x63om.google.iam.v3betaB\x16OperationMetadataProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.OperationMetadata").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb new file mode 100644 index 000000000000..ec1093319476 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/policy_binding_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n0google/iam/v3beta/policy_binding_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x87\x08\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x31.google.iam.v3beta.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12?\n\x06target\x18\x06 \x01(\x0b\x32\'.google.iam.v3beta.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x45\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32+.google.iam.v3beta.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x99\x01\n\x15\x63om.google.iam.v3betaB\x1bPolicyBindingResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding").msgclass + PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.Target").msgclass + PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.PolicyKind").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb new file mode 100644 index 000000000000..8c10eab801a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.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/iam/v3beta/version" + +require "google/iam/v3beta/policy_bindings/credentials" +require "google/iam/v3beta/policy_bindings/paths" +require "google/iam/v3beta/policy_bindings/operations" +require "google/iam/v3beta/policy_bindings/client" +require "google/iam/v3beta/policy_bindings/rest" + +module Google + module Iam + module V3beta + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3beta/policy_bindings" + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3beta/policy_bindings/rest" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module PolicyBindings + end + end + end +end + +helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" +require "google/iam/v3beta/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb new file mode 100644 index 000000000000..efd04847fb73 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb @@ -0,0 +1,1157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/policy_bindings_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3beta + module PolicyBindings + ## + # Client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3beta::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| + # config.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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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/v3beta/policy_bindings_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @policy_bindings_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3beta::PolicyBindings::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3beta::PolicyBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3beta::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy_binding&.name + header_params["policy_binding.name"] = request.policy_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param filter [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. + # + # This class represents the configuration for PolicyBindings, + # providing control 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::V3beta::PolicyBindings::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::V3beta::PolicyBindings::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb new file mode 100644 index 000000000000..8544d9e0da3c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.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 "googleauth" + +module Google + module Iam + module V3beta + module PolicyBindings + # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb new file mode 100644 index 000000000000..197b5f7d66e3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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 Iam + module V3beta + module PolicyBindings + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb new file mode 100644 index 000000000000..b4c61be97d31 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + module PolicyBindings + # Path helper methods for the PolicyBindings API. + module Paths + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PolicyBinding resource string. + # + # @overload policy_binding_path(organization:, location:, policy_binding:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` + # + # @param organization [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(folder:, location:, policy_binding:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` + # + # @param folder [String] + # @param location [String] + # @param policy_binding [String] + # + # @overload policy_binding_path(project:, location:, policy_binding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` + # + # @param project [String] + # @param location [String] + # @param policy_binding [String] + # + # @return [::String] + def policy_binding_path **args + resources = { + "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" + end), + "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb new file mode 100644 index 000000000000..8d9da90d458b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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/iam/v3beta/version" + +require "google/iam/v3beta/policy_bindings/credentials" +require "google/iam/v3beta/policy_bindings/paths" +require "google/iam/v3beta/policy_bindings/rest/operations" +require "google/iam/v3beta/policy_bindings/rest/client" + +module Google + module Iam + module V3beta + ## + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3beta/policy_bindings/rest" + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + module PolicyBindings + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3beta/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb new file mode 100644 index 000000000000..a05a7bfd27eb --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb @@ -0,0 +1,1072 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3beta + module PolicyBindings + module Rest + ## + # REST client for the PolicyBindings service. + # + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :policy_bindings_stub + + ## + # Configure the PolicyBindings Client class. + # + # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PolicyBindings clients + # ::Google::Iam::V3beta::PolicyBindings::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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_policy_binding.timeout = 30.0 + + default_config.rpcs.get_policy_binding.timeout = 60.0 + default_config.rpcs.get_policy_binding.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_policy_binding.timeout = 30.0 + + default_config.rpcs.delete_policy_binding.timeout = 30.0 + + default_config.rpcs.list_policy_bindings.timeout = 60.0 + default_config.rpcs.list_policy_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_target_policy_bindings.timeout = 60.0 + default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::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 + @policy_bindings_stub.universe_domain + end + + ## + # Create a new PolicyBindings REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 + + @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @policy_bindings_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 = @policy_bindings_stub.endpoint + config.universe_domain = @policy_bindings_stub.universe_domain + config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PolicyBindings::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 + @policy_bindings_stub.logger + end + + # Service calls + + ## + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + # + # @overload create_policy_binding(request, options = nil) + # Pass arguments to `create_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) + # Pass arguments to `create_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param policy_binding_id [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + # + # # Call the create_policy_binding method. + # result = client.create_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest + + # Converts hash and nil to an 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_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.create_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. + # + # @overload get_policy_binding(request, options = nil) + # Pass arguments to `get_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy_binding(name: nil) + # Pass arguments to `get_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3beta::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPolicyBindingRequest.new + # + # # Call the get_policy_binding method. + # result = client.get_policy_binding request + # + # # The returned object is of type Google::Iam::V3beta::PolicyBinding. + # p result + # + def get_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.get_policy_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + # + # @overload update_policy_binding(request, options = nil) + # Pass arguments to `update_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + # + # # Call the update_policy_binding method. + # result = client.update_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.update_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + # + # @overload delete_policy_binding(request, options = nil) + # Pass arguments to `delete_policy_binding` via a request object, either of type + # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @param etag [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + # + # # Call the delete_policy_binding method. + # result = client.delete_policy_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_policy_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_policy_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.delete_policy_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. + # + # @overload list_policy_bindings(request, options = nil) + # Pass arguments to `list_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + # + # # Call the list_policy_bindings method. + # result = client.list_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def list_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.list_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + # + # @overload search_target_policy_bindings(request, options = nil) + # Pass arguments to `search_target_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) + # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param target [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @param parent [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param filter [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + # + # # Call the search_target_policy_bindings method. + # result = client.search_target_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_target_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest + + # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. + # + # This class represents the configuration for PolicyBindings 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::V3beta::PolicyBindings::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_policy_binding to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_policy_binding.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PolicyBindings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_policy_binding + ## + # RPC-specific configuration for `get_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy_binding + ## + # RPC-specific configuration for `update_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy_binding + ## + # RPC-specific configuration for `delete_policy_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_policy_binding + ## + # RPC-specific configuration for `list_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_policy_bindings + ## + # RPC-specific configuration for `search_target_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_target_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding + @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config + get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding + @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config + update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding + @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config + delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding + @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config + list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings + @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config + search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings + @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb new file mode 100644 index 000000000000..256b9190eee3 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PolicyBindings + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb new file mode 100644 index 000000000000..ce126e354617 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/v3beta/policy_bindings_service_pb" + +module Google + module Iam + module V3beta + module PolicyBindings + module Rest + ## + # REST service stub for the PolicyBindings 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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::PolicyBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PolicyBinding] + # A result object deserialized from the server's reply + def get_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::PolicyBinding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_policy_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_policy_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::ListPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::ListPolicyBindingsResponse] + # A result object deserialized from the server's reply + def list_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.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_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::SearchTargetPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_target_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_target_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.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_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] + # 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_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/policyBindings", + body: "policy_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{policy_binding.name}", + body: "policy_binding", + matches: [ + ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_policy_binding REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_policy_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_target_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] + # 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_target_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb new file mode 100644 index 000000000000..6c9513bee8e7 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/policy_bindings_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3beta/operation_metadata_pb' +require 'google/iam/v3beta/policy_binding_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n/google/iam/v3beta/policy_bindings_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd1\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xad\x01\n\x1aUpdatePolicyBindingRequest\x12=\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x1aListPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchTargetPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x8c\x12\n\x0ePolicyBindings\x12\x9c\x03\n\x13\x43reatePolicyBinding\x12-.google.iam.v3beta.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xe0\x01\"6/v3beta/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZM\";/v3beta/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\xa1\x02\n\x10GetPolicyBinding\x12*.google.iam.v3beta.GetPolicyBindingRequest\x1a .google.iam.v3beta.PolicyBinding\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xbc\x03\n\x13UpdatePolicyBinding\x12-.google.iam.v3beta.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZV2D/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZ\\2J/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xd1\x02\n\x13\x44\x65letePolicyBinding\x12-.google.iam.v3beta.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xb4\x02\n\x12ListPolicyBindings\x12,.google.iam.v3beta.ListPolicyBindingsRequest\x1a-.google.iam.v3beta.ListPolicyBindingsResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/policyBindingsZ=\x12;/v3beta/{parent=organizations/*/locations/*}/policyBindings\x12\xa4\x03\n\x1aSearchTargetPolicyBindings\x12\x34.google.iam.v3beta.SearchTargetPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchTargetPolicyBindingsResponse\"\x98\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\x12P/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\x12V/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x02\n\x15\x63om.google.iam.v3betaB\x1aPolicyBindingsServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3beta\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePolicyBindingRequest").msgclass + GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPolicyBindingRequest").msgclass + UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePolicyBindingRequest").msgclass + DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePolicyBindingRequest").msgclass + ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsRequest").msgclass + ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsResponse").msgclass + SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsRequest").msgclass + SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb new file mode 100644 index 000000000000..3261714f198e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3beta/policy_bindings_service_pb' + +module Google + module Iam + module V3beta + module PolicyBindings + # An interface for managing Identity and Access Management (IAM) policy + # bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3beta.PolicyBindings' + + # Creates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is created, the policy is applied to the target. + rpc :CreatePolicyBinding, ::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Google::Longrunning::Operation + # Gets a policy binding. + rpc :GetPolicyBinding, ::Google::Iam::V3beta::GetPolicyBindingRequest, ::Google::Iam::V3beta::PolicyBinding + # Updates a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on the policy and target in the + # binding to update. Target and policy are immutable and cannot be updated. + rpc :UpdatePolicyBinding, ::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation + # Deletes a policy binding and returns a long-running operation. + # Callers will need the IAM permissions on both the policy and target. + # After the binding is deleted, the policy no longer applies to the target. + rpc :DeletePolicyBinding, ::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Google::Longrunning::Operation + # Lists policy bindings. + rpc :ListPolicyBindings, ::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Google::Iam::V3beta::ListPolicyBindingsResponse + # Search policy bindings by target. Returns all policy binding objects bound + # directly to target. + rpc :SearchTargetPolicyBindings, ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb new file mode 100644 index 000000000000..131df2f35581 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.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/iam/v3beta/version" + +require "google/iam/v3beta/principal_access_boundary_policies/credentials" +require "google/iam/v3beta/principal_access_boundary_policies/paths" +require "google/iam/v3beta/principal_access_boundary_policies/operations" +require "google/iam/v3beta/principal_access_boundary_policies/client" +require "google/iam/v3beta/principal_access_boundary_policies/rest" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v3beta/principal_access_boundary_policies" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v3beta/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + end + end + end +end + +helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" +require "google/iam/v3beta/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb new file mode 100644 index 000000000000..5097171067eb --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb @@ -0,0 +1,1102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" +require "google/cloud/location" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + ## + # Client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3beta/principal_access_boundary_policies_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.principal_access_boundary_policy&.name + header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + 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::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies, + # providing control 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb new file mode 100644 index 000000000000..faa2a134d021 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.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 "googleauth" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb new file mode 100644 index 000000000000..b253552560cb --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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 Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Iam::V3beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb new file mode 100644 index 000000000000..5c221ecd1178 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Path helper methods for the PrincipalAccessBoundaryPolicies API. + module Paths + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` + # + # @param organization [String] + # @param location [String] + # @param principal_access_boundary_policy [String] + # + # @return [::String] + def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" + end + + extend self + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb new file mode 100644 index 000000000000..a46c2f64c9d5 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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/iam/v3beta/version" + +require "google/iam/v3beta/principal_access_boundary_policies/credentials" +require "google/iam/v3beta/principal_access_boundary_policies/paths" +require "google/iam/v3beta/principal_access_boundary_policies/rest/operations" +require "google/iam/v3beta/principal_access_boundary_policies/rest/client" + +module Google + module Iam + module V3beta + ## + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v3beta/principal_access_boundary_policies/rest" + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + module PrincipalAccessBoundaryPolicies + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v3beta/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb new file mode 100644 index 000000000000..8e08e9ccc17f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb @@ -0,0 +1,1017 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST client for the PrincipalAccessBoundaryPolicies service. + # + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :principal_access_boundary_policies_stub + + ## + # Configure the PrincipalAccessBoundaryPolicies Client class. + # + # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "V3beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 + default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 + + default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 + default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 + default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. + # + # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.universe_domain + end + + ## + # Create a new PrincipalAccessBoundaryPolicies REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + + @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint + config.universe_domain = @principal_access_boundary_policies_stub.universe_domain + config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 + @principal_access_boundary_policies_stub.logger + end + + # Service calls + + ## + # Creates a principal access boundary policy, and returns a long running + # operation. + # + # @overload create_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) + # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param principal_access_boundary_policy_id [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the create_principal_access_boundary_policy method. + # result = client.create_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload get_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_principal_access_boundary_policy(name: nil) + # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + # + # # Call the get_principal_access_boundary_policy method. + # result = client.get_principal_access_boundary_policy request + # + # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p result + # + def get_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a principal access boundary policy. + # + # @overload update_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the update_principal_access_boundary_policy method. + # result = client.update_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. + # + # @overload delete_principal_access_boundary_policy(request, options = nil) + # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type + # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) + # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param etag [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @param force [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + # + # # Call the delete_principal_access_boundary_policy method. + # result = client.delete_principal_access_boundary_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_principal_access_boundary_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. + # + # @overload list_principal_access_boundary_policies(request, options = nil) + # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type + # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + # + # # Call the list_principal_access_boundary_policies method. + # result = client.list_principal_access_boundary_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + # p item + # end + # + def list_principal_access_boundary_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + # + # @overload search_principal_access_boundary_policy_bindings(request, options = nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type + # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @param page_size [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v3beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + # + # # Call the search_principal_access_boundary_policy_bindings method. + # result = client.search_principal_access_boundary_policy_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + # p item + # end + # + def search_principal_access_boundary_policy_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest + + # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. + # + # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_principal_access_boundary_policy + ## + # RPC-specific configuration for `get_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_principal_access_boundary_policy + ## + # RPC-specific configuration for `update_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_principal_access_boundary_policy + ## + # RPC-specific configuration for `delete_principal_access_boundary_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_principal_access_boundary_policy + ## + # RPC-specific configuration for `list_principal_access_boundary_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_principal_access_boundary_policies + ## + # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :search_principal_access_boundary_policy_bindings + + # @private + def initialize parent_rpcs = nil + create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy + @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config + get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy + @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config + update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy + @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config + delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy + @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config + list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies + @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config + search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings + @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb new file mode 100644 index 000000000000..22c3e05a5278 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb @@ -0,0 +1,939 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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 Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb new file mode 100644 index 000000000000..e36e1d4e8f56 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v3beta/principal_access_boundary_policies_service_pb" + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + module Rest + ## + # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::PrincipalAccessBoundaryPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # A result object deserialized from the server's reply + def get_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_principal_access_boundary_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_principal_access_boundary_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] + # A result object deserialized from the server's reply + def list_principal_access_boundary_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_principal_access_boundary_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] + # A result object deserialized from the server's reply + def search_principal_access_boundary_policy_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_principal_access_boundary_policy_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] + # 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_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", + body: "principal_access_boundary_policy", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3beta/{principal_access_boundary_policy.name}", + body: "principal_access_boundary_policy", + matches: [ + ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call + # + # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_principal_access_boundary_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call + # + # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_principal_access_boundary_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call + # + # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] + # 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_principal_access_boundary_policy_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3beta/{name}:searchPolicyBindings", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb new file mode 100644 index 000000000000..ee829930af81 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/principal_access_boundary_policies_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v3beta/operation_metadata_pb' +require 'google/iam/v3beta/policy_binding_resources_pb' +require 'google/iam/v3beta/principal_access_boundary_policy_resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a\x42google/iam/v3beta/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa5\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdf\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12_\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa9\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12\\\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa8\x0f\n\x1fPrincipalAccessBoundaryPolicies\x12\xff\x02\n#CreatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02p\"L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xed\x01\n GetPrincipalAccessBoundaryPolicy\x12:.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest\x1a\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x82\x03\n#UpdatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xfc\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32m/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x8e\x02\n#DeletePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x83\x02\n#ListPrincipalAccessBoundaryPolicies\x12=.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest\x1a>.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xae\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x45.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x46.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest").msgclass + GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest").msgclass + UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass + DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest").msgclass + ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest").msgclass + ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass + SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb new file mode 100644 index 000000000000..3789b868b8e2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/iam/v3beta/principal_access_boundary_policies_service_pb' + +module Google + module Iam + module V3beta + module PrincipalAccessBoundaryPolicies + # Manages Identity and Access Management (IAM) principal access boundary + # policies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.v3beta.PrincipalAccessBoundaryPolicies' + + # Creates a principal access boundary policy, and returns a long running + # operation. + rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Gets a principal access boundary policy. + rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy + # Updates a principal access boundary policy. + rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Deletes a principal access boundary policy. + rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation + # Lists principal access boundary policies. + rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse + # Returns all policy bindings that bind a specific policy if a user has + # searchPolicyBindings permission on that policy. + rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb new file mode 100644 index 000000000000..aeddd8701494 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/v3beta/principal_access_boundary_policy_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x37.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x92\x01\n$PrincipalAccessBoundaryPolicyDetails\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x34.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd4\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12P\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32;.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Iam + module V3beta + PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicy").msgclass + PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails").msgclass + PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule").msgclass + PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect").enummodule + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb new file mode 100644 index 000000000000..99f3c20b6549 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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/v3beta/access_policies/rest" +require "google/iam/v3beta/policy_bindings/rest" +require "google/iam/v3beta/principal_access_boundary_policies/rest" +require "google/iam/v3beta/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v3beta/rest" + # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new + # + module V3beta + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb new file mode 100644 index 000000000000..738981bb3f21 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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 V3beta + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md new file mode 100644 index 000000000000..536b687b8e98 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Identity and Access Management (IAM) V3BETA 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-v3beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb new file mode 100644 index 000000000000..a8350bf45f46 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + # Request message for CreateAccessPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this access policy will be created. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] access_policy_id + # @return [::String] + # Required. The ID to use for the access policy, which + # will become the final component of the access policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # + # This value must be unique among all access policies with the same parent. + # @!attribute [rw] access_policy + # @return [::Google::Iam::V3beta::AccessPolicy] + # Required. The access policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetAccessPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy to retrieve. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + class GetAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateAccessPolicy method. + # @!attribute [rw] access_policy + # @return [::Google::Iam::V3beta::AccessPolicy] + # Required. The access policy to update. + # + # The access policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + class UpdateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteAccessPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy to delete. + # + # Format: + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the access policy. If this is provided, it must match + # the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the Policy + # even if the Policy references PolicyBindings. + class DeleteAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListAccessPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of access policy + # resources. + # + # Format: + # `projects/{project_id}/locations/{location}` + # `projects/{project_number}/locations/{location}` + # `folders/{folder_id}/locations/{location}` + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of access policies to return. The + # service may return fewer than this value. + # + # If unspecified, at most 50 access policies will be returned. Valid value + # ranges from 1 to 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAccessPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessPolicies` must match the call that provided the + # page token. + class ListAccessPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListAccessPolicies method. + # @!attribute [rw] access_policies + # @return [::Array<::Google::Iam::V3beta::AccessPolicy>] + # The access policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListAccessPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchAccessPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the access policy. + # Format: + # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` + # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchAccessPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchAccessPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchAccessPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchAccessPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchAccessPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb new file mode 100644 index 000000000000..cb77bb996aa9 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb @@ -0,0 +1,223 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + # An IAM access policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the access policy. + # + # The following formats are supported: + # + # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` + # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` + # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` + # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the access policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the access policy. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the access policy. Must be less than + # or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the access policy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the access policy was most recently + # updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3beta::AccessPolicyDetails] + # Optional. The details for the access policy. + class AccessPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Access policy details. + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3beta::AccessPolicyRule>] + # Required. A list of access policy rules. + class AccessPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Access Policy Rule that determines the behavior of the policy. + # @!attribute [rw] description + # @return [::String] + # Optional. Customer specified description of the rule. Must be less than or + # equal to 256 characters. + # @!attribute [rw] effect + # @return [::Google::Iam::V3beta::AccessPolicyRule::Effect] + # Required. The effect of the rule. + # @!attribute [rw] principals + # @return [::Array<::String>] + # Required. The identities for which this rule's effect governs using one or + # more permissions on Google Cloud resources. This field can contain the + # following values: + # + # * `principal://goog/subject/{email_id}`: A specific Google Account. + # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + # example, `principal://goog/subject/alice@example.com`. + # + # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + # A Google Cloud service account. For example, + # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + # + # * `principalSet://goog/group/{group_id}`: A Google group. For example, + # `principalSet://goog/group/admins@example.com`. + # + # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + # principals associated with the specified Google Workspace or Cloud + # Identity customer ID. For example, + # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + # + # + # If an identifier that was previously set on a policy is soft deleted, then + # calls to read that policy will return the identifier with a deleted + # prefix. Users cannot set identifiers with this syntax. + # + # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + # Google Account that was deleted recently. For example, + # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + # the Google Account is recovered, this identifier reverts to the standard + # identifier for a Google Account. + # + # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + # that was deleted recently. For example, + # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. + # If the Google group is restored, this identifier reverts to the standard + # identifier for a Google group. + # + # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + # A Google Cloud service account that was deleted recently. For example, + # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + # If the service account is undeleted, this identifier reverts to the + # standard identifier for a service account. + # @!attribute [rw] excluded_principals + # @return [::Array<::String>] + # Optional. The identities that are excluded from the access policy rule, + # even if they are listed in the `principals`. For example, you could add a + # Google group to the `principals`, then exclude specific users who belong to + # that group. + # @!attribute [rw] operation + # @return [::Google::Iam::V3beta::AccessPolicyRule::Operation] + # Required. Attributes that are used to determine whether this rule applies + # to a request. + # @!attribute [rw] conditions + # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] + # Optional. The conditions that determine whether this rule applies to a + # request. Conditions are identified by their key, which is the FQDN of the + # service that they are relevant to. For example: + # + # ``` + # "conditions": { + # "iam.googleapis.com": { + # "expression": + # } + # } + # ``` + # + # Each rule is evaluated independently. If this rule does not apply + # to a request, other rules might still apply. + # Currently supported keys are as follows: + # + # + # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate + # resource fields. + # + # * `iam.googleapis.com`: Can use `CEL` functions that evaluate + # [resource + # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and + # combine them using boolean and logical operators. Other functions and + # operators are not supported. + class AccessPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Attributes that are used to determine whether this rule applies to a + # request. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # Optional. The permissions that are explicitly affected by this rule. Each + # permission uses the format `{service_fqdn}/{resource}.{verb}`, where + # `{service_fqdn}` is the fully qualified domain name for the service. + # Currently supported permissions are as follows: + # + # * `eventarc.googleapis.com/messageBuses.publish`. + # @!attribute [rw] excluded_permissions + # @return [::Array<::String>] + # Optional. Specifies the permissions that this rule excludes from the set + # of affected permissions given by `permissions`. If a permission appears + # in `permissions` _and_ in `excluded_permissions` then it will _not_ be + # subject to the policy effect. + # + # The excluded permissions can be specified using the same syntax as + # `permissions`. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Type::Expr] + class ConditionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An effect to describe the access relationship. + module Effect + # The effect is unspecified. + EFFECT_UNSPECIFIED = 0 + + # The policy will deny access if it evaluates to true. + DENY = 1 + + # The policy will grant access if it evaluates to true. + ALLOW = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb new file mode 100644 index 000000000000..4e4463d9171f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.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! + + +module Google + module Iam + module V3beta + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb new file mode 100644 index 000000000000..c46446dc0080 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb @@ -0,0 +1,193 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + # IAM policy binding resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the policy binding, in the format + # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + # The binding parent is the closest Resource Manager resource (project, + # folder, or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the policy binding. Assigned when + # the policy binding is created. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the policy binding. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the policy binding. Must be less than or equal + # to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [rw] target + # @return [::Google::Iam::V3beta::PolicyBinding::Target] + # Required. Immutable. The full resource name of the resource to which the + # policy will be bound. Immutable once set. + # @!attribute [rw] policy_kind + # @return [::Google::Iam::V3beta::PolicyBinding::PolicyKind] + # Immutable. The kind of the policy to attach in this binding. This field + # must be one of the following: + # + # - Left empty (will be automatically set to the policy kind) + # - The input policy kind + # @!attribute [rw] policy + # @return [::String] + # Required. Immutable. The resource name of the policy to be bound. The + # binding parent and policy must belong to the same organization. + # @!attribute [r] policy_uid + # @return [::String] + # Output only. The globally unique ID of the policy to be bound. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. The condition to apply to the policy binding. When set, the + # `expression` field in the `Expr` must include from 1 to 10 subexpressions, + # joined by the + # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + # cannot contain more than 250 characters. + # + # The condition is currently only supported when bound to policies of kind + # principal access boundary. + # + # When the bound policy is a principal access boundary policy, the only + # supported attributes in any subexpression are `principal.type` and + # `principal.subject`. An example expression is: "principal.type == + # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + # 'bob@example.com'". + # + # Allowed operations for `principal.subject`: + # + # - `principal.subject == ` + # - `principal.subject != ` + # - `principal.subject in []` + # - `principal.subject.startsWith()` + # - `principal.subject.endsWith()` + # + # Allowed operations for `principal.type`: + # + # - `principal.type == ` + # - `principal.type != ` + # - `principal.type in []` + # + # Supported principal types are workspace, workforce pool, workload pool, + # service account, and Agent Identity. Allowed string must be one of: + # + # - `iam.googleapis.com/WorkspaceIdentity` + # - `iam.googleapis.com/WorkforcePoolIdentity` + # - `iam.googleapis.com/WorkloadPoolIdentity` + # - `iam.googleapis.com/ServiceAccount` + # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy binding was most recently updated. + class PolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The full resource name of the resource to which the policy will + # be bound. Immutable once set. + # @!attribute [rw] principal_set + # @return [::String] + # Immutable. The full resource name that's used for principal access + # boundary policy bindings. The principal set must be directly parented + # by the policy binding's parent or same as the parent if the target is a + # project, folder, or organization. + # + # Examples: + # + # * For bindings parented by an organization: + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Workforce Identity: + # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + # * Workspace Identity: + # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * For bindings parented by a folder: + # * Folder: + # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * For bindings parented by a project: + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # * Workload Identity Pool: + # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + # + # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource + # @return [::String] + # Immutable. The full resource name that's used for access policy + # bindings. + # + # Examples: + # + # * Organization: + # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + # * Project: + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + # + # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Target + 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 + + # The different policy kinds supported in this binding. + module PolicyKind + # Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0 + + # Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1 + + # Access policy kind. + ACCESS = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb new file mode 100644 index 000000000000..4ff232b4471d --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V3beta + # Request message for CreatePolicyBinding method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this policy binding will be created. + # The binding parent is the closest Resource Manager resource (project, + # folder or organization) to the binding target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] policy_binding_id + # @return [::String] + # Required. The ID to use for the policy binding, which will become the final + # component of the policy binding's resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3beta::PolicyBinding] + # Required. The policy binding to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to retrieve. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + class GetPolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePolicyBinding method. + # @!attribute [rw] policy_binding + # @return [::Google::Iam::V3beta::PolicyBinding] + # Required. The policy binding to update. + # + # The policy binding's `name` field is used to identify the policy binding to + # update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePolicyBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy binding to delete. + # + # Format: + # + # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the policy binding. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + class DeletePolicyBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPolicyBindings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of policy + # bindings. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPolicyBindings` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPolicyBindings` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. Some eligible fields for filtering are the + # following: + # + # + `target` + # + `policy` + # + # Some examples of filter queries: + # + # * `target:ex*`: The binding target's name starts with "ex". + # * `target:example`: The binding target's name is `example`. + # * `policy:example`: The binding policy's name is `example`. + class ListPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchTargetPolicyBindings method. + # @!attribute [rw] target + # @return [::String] + # Required. The target resource, which is bound to the policy in the binding. + # + # Format: + # + # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # The default value is 50. The maximum value is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTargetPolicyBindingsRequest` must match the call that provided the + # page token. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this search will be performed. This + # should be the nearest Resource Manager resource (project, folder, or + # organization) to the target. + # + # Format: + # + # * `projects/{project_id}/locations/{location}` + # * `projects/{project_number}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering currently only supports the kind of policies to return, + # and must be in the format "policy_kind=\\{policy_kind}". + # + # If String is empty, bindings bound to all kinds of policies would be + # returned. + # + # The only supported values are the following: + # + # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", + # * "policy_kind=ACCESS" + class SearchTargetPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchTargetPolicyBindings method. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings bound to the specified target. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchTargetPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb new file mode 100644 index 000000000000..565de307d98b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.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 Iam + module V3beta + # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this principal access boundary policy + # will be created. Only organizations are supported. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] principal_access_boundary_policy_id + # @return [::String] + # Required. The ID to use for the principal access boundary policy, which + # will become the final component of the principal access boundary policy's + # resource name. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, hyphens, or dots. Pattern, + # /[a-z][a-z0-9-\.]\\{2,62}/. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the creation, but do not + # actually post it. + class CreatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetPrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to retrieve. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + class GetPrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdatePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] principal_access_boundary_policy + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] + # Required. The principal access boundary policy to update. + # + # The principal access boundary policy's `name` field is used to identify the + # policy to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the update, but do not + # actually post it. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdatePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeletePrincipalAccessBoundaryPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy to delete. + # + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the principal access boundary policy. + # If this is provided, it must match the server's etag. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the deletion, but do not + # actually post it. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, the request will force the deletion of the policy + # even if the policy is referenced in policy bindings. + class DeletePrincipalAccessBoundaryPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource, which owns the collection of principal + # access boundary policies. + # + # Format: + # `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of principal access boundary policies to + # return. The service may return fewer than this value. + # + # If unspecified, at most 50 principal access boundary policies will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + # page token. + class ListPrincipalAccessBoundaryPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListPrincipalAccessBoundaryPolicies method. + # @!attribute [rw] principal_access_boundary_policies + # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] + # The principal access boundary policies from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListPrincipalAccessBoundaryPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the principal access boundary policy. + # Format: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policy bindings to return. The service may + # return fewer than this value. + # + # If unspecified, at most 50 policy bindings will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + # that provided the page token. + class SearchPrincipalAccessBoundaryPolicyBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] + # The policy bindings that reference the specified policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class SearchPrincipalAccessBoundaryPolicyBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb new file mode 100644 index 000000000000..a01db22285ba --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.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 Iam + module V3beta + # An IAM principal access boundary policy resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the principal access boundary policy. + # + # The following format is supported: + # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + # @!attribute [r] uid + # @return [::String] + # Output only. The globally unique ID of the principal access boundary + # policy. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the principal access boundary. + # If this is provided on update, it must match the server's etag. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The description of the principal access boundary policy. Must be + # less than or equal to 63 characters. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the principal access boundary policy was most + # recently updated. + # @!attribute [rw] details + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyDetails] + # Optional. The details for the principal access boundary policy. + class PrincipalAccessBoundaryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Principal access boundary policy details + # @!attribute [rw] rules + # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule>] + # Required. A list of principal access boundary policy rules. The number of + # rules in a policy is limited to 500. + # @!attribute [rw] enforcement_version + # @return [::String] + # Optional. + # The version number (for example, `1` or `latest`) that indicates which + # permissions are able to be blocked by the policy. If empty, the PAB policy + # version will be set to the most recent version number at the time of the + # policy's creation. + class PrincipalAccessBoundaryPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Principal access boundary policy rule that defines the resource boundary. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the principal access boundary policy rule. + # Must be less than or equal to 256 characters. + # @!attribute [rw] resources + # @return [::Array<::String>] + # Required. A list of Resource Manager resources. If a resource is listed in + # the rule, then the rule applies for that resource and its descendants. The + # number of resources in a policy is limited to 500 across all rules in the + # policy. + # + # The following resource types are supported: + # + # * Organizations, such as + # `//cloudresourcemanager.googleapis.com/organizations/123`. + # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + # @!attribute [rw] effect + # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule::Effect] + # Required. The access relationship of principals to the resources in this + # rule. + class PrincipalAccessBoundaryPolicyRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An effect to describe the access relationship. + module Effect + # Effect unspecified. + EFFECT_UNSPECIFIED = 0 + + # Allows access to the resources in this rule. + ALLOW = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/snippets/Gemfile b/owl-bot-staging/google-iam-v3beta/snippets/Gemfile new file mode 100644 index 000000000000..c2385cbb7f70 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/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-v3beta", path: "../" +else + gem "google-iam-v3beta" +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-v3beta/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb new file mode 100644 index 000000000000..97be59c7632e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the create_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#create_access_policy. +# +def create_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::CreateAccessPolicyRequest.new + + # Call the create_access_policy method. + result = client.create_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb new file mode 100644 index 000000000000..39044451fe13 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the delete_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#delete_access_policy. +# +def delete_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new + + # Call the delete_access_policy method. + result = client.delete_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb new file mode 100644 index 000000000000..dd29cbf9cc54 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the get_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#get_access_policy. +# +def get_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::GetAccessPolicyRequest.new + + # Call the get_access_policy method. + result = client.get_access_policy request + + # The returned object is of type Google::Iam::V3beta::AccessPolicy. + p result +end +# [END iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb new file mode 100644 index 000000000000..6ba1518a5a0f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] +require "google/iam/v3beta" + +## +# Snippet for the list_access_policies call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#list_access_policies. +# +def list_access_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::ListAccessPoliciesRequest.new + + # Call the list_access_policies method. + result = client.list_access_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::AccessPolicy. + p item + end +end +# [END iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb new file mode 100644 index 000000000000..4e6b43897d7b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the search_access_policy_bindings call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#search_access_policy_bindings. +# +def search_access_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new + + # Call the search_access_policy_bindings method. + result = client.search_access_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb new file mode 100644 index 000000000000..72e82547181e --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the update_access_policy call in the AccessPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#update_access_policy. +# +def update_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::AccessPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new + + # Call the update_access_policy method. + result = client.update_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb new file mode 100644 index 000000000000..71d915589110 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the create_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#create_policy_binding. +# +def create_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::CreatePolicyBindingRequest.new + + # Call the create_policy_binding method. + result = client.create_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb new file mode 100644 index 000000000000..71f4b669183c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the delete_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#delete_policy_binding. +# +def delete_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::DeletePolicyBindingRequest.new + + # Call the delete_policy_binding method. + result = client.delete_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb new file mode 100644 index 000000000000..95a37b3bd52d --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the get_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#get_policy_binding. +# +def get_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::GetPolicyBindingRequest.new + + # Call the get_policy_binding method. + result = client.get_policy_binding request + + # The returned object is of type Google::Iam::V3beta::PolicyBinding. + p result +end +# [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb new file mode 100644 index 000000000000..0f7e29a87412 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the list_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#list_policy_bindings. +# +def list_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::ListPolicyBindingsRequest.new + + # Call the list_policy_bindings method. + result = client.list_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb new file mode 100644 index 000000000000..f27b0677d25b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the search_target_policy_bindings call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#search_target_policy_bindings. +# +def search_target_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new + + # Call the search_target_policy_bindings method. + result = client.search_target_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb new file mode 100644 index 000000000000..135862214560 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] +require "google/iam/v3beta" + +## +# Snippet for the update_policy_binding call in the PolicyBindings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#update_policy_binding. +# +def update_policy_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PolicyBindings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new + + # Call the update_policy_binding method. + result = client.update_policy_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..5adbcf4dcc27 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. +# +def create_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new + + # Call the create_principal_access_boundary_policy method. + result = client.create_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..80a3f6830daa --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. +# +def delete_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new + + # Call the delete_principal_access_boundary_policy method. + result = client.delete_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..a6c6b2d32724 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. +# +def get_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new + + # Call the get_principal_access_boundary_policy method. + result = client.get_principal_access_boundary_policy request + + # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + p result +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb new file mode 100644 index 000000000000..6d15a7805873 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] +require "google/iam/v3beta" + +## +# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. +# +def list_principal_access_boundary_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new + + # Call the list_principal_access_boundary_policies method. + result = client.list_principal_access_boundary_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. + p item + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb new file mode 100644 index 000000000000..f55151327579 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] +require "google/iam/v3beta" + +## +# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. +# +def search_principal_access_boundary_policy_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new + + # Call the search_principal_access_boundary_policy_bindings method. + result = client.search_principal_access_boundary_policy_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Iam::V3beta::PolicyBinding. + p item + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb new file mode 100644 index 000000000000..821e090ddea2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] +require "google/iam/v3beta" + +## +# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. +# +def update_principal_access_boundary_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new + + # Call the update_principal_access_boundary_policy method. + result = client.update_principal_access_boundary_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json new file mode 100644 index 000000000000..dbc2fd32da19 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json @@ -0,0 +1,735 @@ +{ + "client_library": { + "name": "google-iam-v3beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v3beta", + "version": "v3beta" + } + ] + }, + "snippets": [ + { + "region_tag": "iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync", + "title": "Snippet for the create_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#create_access_policy.", + "file": "access_policies/create_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_policy", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#create_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::CreateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "CreateAccessPolicy", + "full_name": "google.iam.v3beta.AccessPolicies.CreateAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync", + "title": "Snippet for the get_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#get_access_policy.", + "file": "access_policies/get_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_policy", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#get_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::GetAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::AccessPolicy", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "GetAccessPolicy", + "full_name": "google.iam.v3beta.AccessPolicies.GetAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync", + "title": "Snippet for the update_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#update_access_policy.", + "file": "access_policies/update_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_policy", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#update_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::UpdateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "UpdateAccessPolicy", + "full_name": "google.iam.v3beta.AccessPolicies.UpdateAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync", + "title": "Snippet for the delete_access_policy call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy.", + "file": "access_policies/delete_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_policy", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::DeleteAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "DeleteAccessPolicy", + "full_name": "google.iam.v3beta.AccessPolicies.DeleteAccessPolicy", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync", + "title": "Snippet for the list_access_policies call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#list_access_policies.", + "file": "access_policies/list_access_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_policies", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#list_access_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::ListAccessPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::ListAccessPoliciesResponse", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "ListAccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies.ListAccessPolicies", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync", + "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings.", + "file": "access_policies/search_access_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_access_policy_bindings", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse", + "client": { + "short_name": "AccessPolicies::Client", + "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" + }, + "method": { + "short_name": "SearchAccessPolicyBindings", + "full_name": "google.iam.v3beta.AccessPolicies.SearchAccessPolicyBindings", + "service": { + "short_name": "AccessPolicies", + "full_name": "google.iam.v3beta.AccessPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync", + "title": "Snippet for the create_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding.", + "file": "policy_bindings/create_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::CreatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "CreatePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.CreatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync", + "title": "Snippet for the get_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding.", + "file": "policy_bindings/get_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::GetPolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::PolicyBinding", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "GetPolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.GetPolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync", + "title": "Snippet for the update_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding.", + "file": "policy_bindings/update_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::UpdatePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "UpdatePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.UpdatePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync", + "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding.", + "file": "policy_bindings/delete_policy_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_policy_binding", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::DeletePolicyBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "DeletePolicyBinding", + "full_name": "google.iam.v3beta.PolicyBindings.DeletePolicyBinding", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync", + "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings.", + "file": "policy_bindings/list_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_policy_bindings", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::ListPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::ListPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "ListPolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings.ListPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync", + "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings.", + "file": "policy_bindings/search_target_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_target_policy_bindings", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse", + "client": { + "short_name": "PolicyBindings::Client", + "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" + }, + "method": { + "short_name": "SearchTargetPolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings.SearchTargetPolicyBindings", + "service": { + "short_name": "PolicyBindings", + "full_name": "google.iam.v3beta.PolicyBindings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "CreatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "GetPrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "UpdatePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", + "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", + "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_principal_access_boundary_policy", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "DeletePrincipalAccessBoundaryPolicy", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", + "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", + "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_principal_access_boundary_policies", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "ListPrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", + "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", + "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_principal_access_boundary_policy_bindings", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse", + "client": { + "short_name": "PrincipalAccessBoundaryPolicies::Client", + "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" + }, + "method": { + "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", + "service": { + "short_name": "PrincipalAccessBoundaryPolicies", + "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" + } + } + }, + "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-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb new file mode 100644 index 000000000000..da6a695d3c98 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_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/iam/v3beta/access_policies_service_pb" +require "google/iam/v3beta/access_policies_service_services_pb" +require "google/iam/v3beta/access_policies" + +class ::Google::Iam::V3beta::AccessPolicies::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb new file mode 100644 index 000000000000..2e29e3248257 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3beta/access_policies" + +class ::Google::Iam::V3beta::AccessPolicies::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_access_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" + assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path + + path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" + assert_equal "folders/value0/locations/value1/accessPolicies/value2", path + + path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" + assert_equal "projects/value0/locations/value1/accessPolicies/value2", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb new file mode 100644 index 000000000000..fb4d469ef29f --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v3beta/access_policies_service_pb" +require "google/iam/v3beta/access_policies/rest" + + +class ::Google::Iam::V3beta::AccessPolicies::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_access_policy + # Create test objects. + 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" + access_policy_id = "hello world" + access_policy = {} + validate_only = true + + create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_policy_client_stub.call_count + end + end + end + + def test_get_access_policy + # Create test objects. + client_result = ::Google::Iam::V3beta::AccessPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_count + end + end + end + + def test_update_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + access_policy = {} + validate_only = true + + update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_access_policy_client_stub.call_count + end + end + end + + def test_delete_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_policy_client_stub.call_count + end + end + end + + def test_list_access_policies + # Create test objects. + client_result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new + http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count + end + end + end + + def test_search_access_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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" + + search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb new file mode 100644 index 000000000000..fdcebb4a7083 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb @@ -0,0 +1,513 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3beta/access_policies_service_pb" +require "google/iam/v3beta/access_policies" + +class ::Google::Iam::V3beta::AccessPolicies::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_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_policy_id = "hello world" + access_policy = {} + validate_only = true + + create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_policy, name + assert_kind_of ::Google::Iam::V3beta::CreateAccessPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["access_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_get_access_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::AccessPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_policy, name + assert_kind_of ::Google::Iam::V3beta::GetAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_access_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_access_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_access_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_rpc_count + end + end + + def test_update_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + access_policy = {} + validate_only = true + + update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_policy, name + assert_kind_of ::Google::Iam::V3beta::UpdateAccessPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_access_policy_client_stub.call_rpc_count + end + end + + def test_delete_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_policy, name + assert_kind_of ::Google::Iam::V3beta::DeleteAccessPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_list_access_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_policies, name + assert_kind_of ::Google::Iam::V3beta::ListAccessPoliciesRequest, 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_access_policies_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count + end + end + + def test_search_access_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_access_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3beta::AccessPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb new file mode 100644 index 000000000000..83ecbb1d59e0 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings_service_services_pb" +require "google/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb new file mode 100644 index 000000000000..25795739b50c --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::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_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_policy_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" + assert_equal "organizations/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" + assert_equal "folders/value0/locations/value1/policyBindings/value2", path + + path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" + assert_equal "projects/value0/locations/value1/policyBindings/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb new file mode 100644 index 000000000000..eb4938bac615 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb @@ -0,0 +1,437 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings/rest" + + +class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding + # Create test objects. + 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" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_policy_binding_client_stub.call_count + end + end + end + + def test_get_policy_binding + # Create test objects. + client_result = ::Google::Iam::V3beta::PolicyBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_policy_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_policy_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_policy_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_count + end + end + end + + def test_update_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_count + end + end + end + + def test_delete_policy_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_count + end + end + end + + def test_list_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_policy_bindings_client_stub.call_count + end + end + end + + def test_search_target_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + filter = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb new file mode 100644 index 000000000000..b9c3eb2c9954 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb @@ -0,0 +1,519 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3beta/policy_bindings_service_pb" +require "google/iam/v3beta/policy_bindings" + +class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + policy_binding_id = "hello world" + policy_binding = {} + validate_only = true + + create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::CreatePolicyBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["policy_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count + end + end + + def test_get_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::PolicyBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::GetPolicyBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_binding_client_stub.call_rpc_count + end + end + + def test_update_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy_binding = {} + validate_only = true + update_mask = {} + + update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::UpdatePolicyBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_policy_binding_client_stub.call_rpc_count + end + end + + def test_delete_policy_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_policy_binding, name + assert_kind_of ::Google::Iam::V3beta::DeletePolicyBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_policy_binding_client_stub.call_rpc_count + end + end + + def test_list_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::ListPolicyBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_policy_bindings_client_stub.call_rpc_count + end + end + + def test_search_target_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + target = "hello world" + page_size = 42 + page_token = "hello world" + parent = "hello world" + filter = "hello world" + + search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_target_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, request + assert_equal "hello world", request["target"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3beta::PolicyBindings::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb new file mode 100644 index 000000000000..6e46e310ad0b --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies_service_services_pb" +require "google/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb new file mode 100644 index 000000000000..e7a89396ed57 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_principal_access_boundary_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" + assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path + end + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb new file mode 100644 index 000000000000..3eab77f7e378 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies/rest" + + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create test objects. + 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" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_get_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_principal_access_boundary_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_principal_access_boundary_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_update_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_delete_principal_access_boundary_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count + end + end + end + + def test_list_principal_access_boundary_policies + # Create test objects. + client_result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new + http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count + end + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create test objects. + client_result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb new file mode 100644 index 000000000000..a1ff3c50bada --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb @@ -0,0 +1,515 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/v3beta/principal_access_boundary_policies_service_pb" +require "google/iam/v3beta/principal_access_boundary_policies" + +class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + principal_access_boundary_policy_id = "hello world" + principal_access_boundary_policy = {} + validate_only = true + + create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["principal_access_boundary_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_get_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_principal_access_boundary_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_principal_access_boundary_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_update_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + principal_access_boundary_policy = {} + validate_only = true + update_mask = {} + + update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_delete_principal_access_boundary_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + force = true + + delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_principal_access_boundary_policy, name + assert_kind_of ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count + end + end + + def test_list_principal_access_boundary_policies + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_principal_access_boundary_policies, name + assert_kind_of ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count + end + end + + def test_search_principal_access_boundary_policy_bindings + # Create GRPC objects. + grpc_response = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_principal_access_boundary_policy_bindings, name + assert_kind_of ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do + # Create client + c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-iam-v3beta/test/helper.rb b/owl-bot-staging/google-iam-v3beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-iam-v3beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..b5b3f48e3f37 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "accesscontextmanager.googleapis.com", + "api_shortname": "accesscontextmanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest", + "distribution_name": "google-identity-access_context_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "accesscontextmanager", + "name_pretty": "Access Context Manager V1 API", + "product_documentation": "https://cloud.google.com/access-context-manager/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/access-context-manager/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..15b11069b7b8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-identity-access_context_manager-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-identity-access_context_manager-v1.rb" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts new file mode 100644 index 000000000000..bba046b41e67 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Access Context Manager V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3537ff875c7f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-identity-access_context_manager-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-identity-access_context_manager-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/identity/access_context_manager/v1" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/identity/access_context_manager/v1" + +::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/identity/access_context_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1/CHANGELOG.md b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/README.md new file mode 100644 index 000000000000..4aebfb1f2f0d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Access Context Manager V1 API + +An API for setting attribute based access control to requests to GCP services. + +Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Access Context Manager V1 API. Most users should consider using +the main client gem, +[google-identity-access_context_manager](https://rubygems.org/gems/google-identity-access_context_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-identity-access_context_manager-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/identity/access_context_manager/v1" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new +request = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # (request fields as keyword arguments...) +response = client.list_access_policies request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/access-context-manager/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/identity/access_context_manager/v1" +require "logger" + +client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-identity-access_context_manager`, +and lower-level _versioned_ client libraries with names such as +`google-identity-access_context_manager-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-identity-access_context_manager`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-identity-access_context_manager-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile new file mode 100644 index 000000000000..4d845f513939 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-identity-access_context_manager-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/identity/access_context_manager/v1/access_context_manager/credentials" + ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-identity-access_context_manager-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-identity-access_context_manager-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-identity-access_context_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-identity-access_context_manager-v1" + header "google-identity-access_context_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-identity-access_context_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-identity-access_context_manager-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-identity-access_context_manager-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-identity-access_context_manager-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..a47b974d0dbf --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json @@ -0,0 +1,148 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.identity.accesscontextmanager.v1", + "libraryPackage": "::Google::Identity::AccessContextManager::V1", + "services": { + "AccessContextManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client", + "rpcs": { + "ListAccessPolicies": { + "methods": [ + "list_access_policies" + ] + }, + "GetAccessPolicy": { + "methods": [ + "get_access_policy" + ] + }, + "CreateAccessPolicy": { + "methods": [ + "create_access_policy" + ] + }, + "UpdateAccessPolicy": { + "methods": [ + "update_access_policy" + ] + }, + "DeleteAccessPolicy": { + "methods": [ + "delete_access_policy" + ] + }, + "ListAccessLevels": { + "methods": [ + "list_access_levels" + ] + }, + "GetAccessLevel": { + "methods": [ + "get_access_level" + ] + }, + "CreateAccessLevel": { + "methods": [ + "create_access_level" + ] + }, + "UpdateAccessLevel": { + "methods": [ + "update_access_level" + ] + }, + "DeleteAccessLevel": { + "methods": [ + "delete_access_level" + ] + }, + "ReplaceAccessLevels": { + "methods": [ + "replace_access_levels" + ] + }, + "ListServicePerimeters": { + "methods": [ + "list_service_perimeters" + ] + }, + "GetServicePerimeter": { + "methods": [ + "get_service_perimeter" + ] + }, + "CreateServicePerimeter": { + "methods": [ + "create_service_perimeter" + ] + }, + "UpdateServicePerimeter": { + "methods": [ + "update_service_perimeter" + ] + }, + "DeleteServicePerimeter": { + "methods": [ + "delete_service_perimeter" + ] + }, + "ReplaceServicePerimeters": { + "methods": [ + "replace_service_perimeters" + ] + }, + "CommitServicePerimeters": { + "methods": [ + "commit_service_perimeters" + ] + }, + "ListGcpUserAccessBindings": { + "methods": [ + "list_gcp_user_access_bindings" + ] + }, + "GetGcpUserAccessBinding": { + "methods": [ + "get_gcp_user_access_binding" + ] + }, + "CreateGcpUserAccessBinding": { + "methods": [ + "create_gcp_user_access_binding" + ] + }, + "UpdateGcpUserAccessBinding": { + "methods": [ + "update_gcp_user_access_binding" + ] + }, + "DeleteGcpUserAccessBinding": { + "methods": [ + "delete_gcp_user_access_binding" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec new file mode 100644 index 000000000000..159a0d47cef6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/identity/access_context_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-identity-access_context_manager-v1" + gem.version = Google::Identity::AccessContextManager::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details." + gem.summary = "An API for setting attribute based access control to requests to GCP services." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb new file mode 100644 index 000000000000..5d4eaa9b5df6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/identity/access_context_manager/v1" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb new file mode 100644 index 000000000000..c51f7bf61440 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/identity/access_context_manager/v1/access_context_manager" +require "google/identity/access_context_manager/v1/version" + +module Google + module Identity + module AccessContextManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/identity/access_context_manager/v1" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/identity/access_context_manager/v1" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/identity/access_context_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb new file mode 100644 index 000000000000..557344644e3e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/identity/access_context_manager/v1/version" + +require "google/identity/access_context_manager/v1/access_context_manager/credentials" +require "google/identity/access_context_manager/v1/access_context_manager/paths" +require "google/identity/access_context_manager/v1/access_context_manager/operations" +require "google/identity/access_context_manager/v1/access_context_manager/client" +require "google/identity/access_context_manager/v1/access_context_manager/rest" + +module Google + module Identity + module AccessContextManager + module V1 + ## + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + # @example Load this service and instantiate a gRPC client + # + # require "google/identity/access_context_manager/v1/access_context_manager" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/identity/access_context_manager/v1/access_context_manager/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module AccessContextManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "access_context_manager", "helpers.rb" +require "google/identity/access_context_manager/v1/access_context_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb new file mode 100644 index 000000000000..3a8c8320a0f6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb @@ -0,0 +1,3299 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + ## + # Client for the AccessContextManager service. + # + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_context_manager_stub + + ## + # Configure the AccessContextManager Client class. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessContextManager clients + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Identity", "AccessContextManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccessContextManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @access_context_manager_stub.universe_domain + end + + ## + # Create a new AccessContextManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessContextManager 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/identity/accesscontextmanager/v1/access_context_manager_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @access_context_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @access_context_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @access_context_manager_stub.logger + end + + # Service calls + + ## + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @param page_size [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_access_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_access_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @param parent [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @param title [::String] + # Required. Human readable title. Does not affect behavior. + # @param scopes [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @param create_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was created in UTC. + # @param update_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @param etag [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # Required. The updated AccessPolicy. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_policy(name: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 all [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + # + # @overload list_access_levels(request, options = nil) + # Pass arguments to `list_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) + # Pass arguments to `list_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + # + # # Call the list_access_levels method. + # result = client.list_access_levels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + # p item + # end + # + def list_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_access_levels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + # + # @overload get_access_level(request, options = nil) + # Pass arguments to `get_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_access_level(name: nil, access_level_format: nil) + # Pass arguments to `get_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + # + # # Call the get_access_level method. + # result = client.get_access_level request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + # p result + # + def get_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_access_level, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload create_access_level(request, options = nil) + # Pass arguments to `create_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_access_level(parent: nil, access_level: nil) + # Pass arguments to `create_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + # + # # Call the create_access_level method. + # result = client.create_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload update_access_level(request, options = nil) + # Pass arguments to `update_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_access_level(access_level: nil, update_mask: nil) + # Pass arguments to `update_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + # + # # Call the update_access_level method. + # result = client.update_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.access_level&.name + header_params["access_level.name"] = request.access_level.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + # + # @overload delete_access_level(request, options = nil) + # Pass arguments to `delete_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_access_level(name: nil) + # Pass arguments to `delete_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + # + # # Call the delete_access_level method. + # result = client.delete_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_access_level, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + # + # @overload replace_access_levels(request, options = nil) + # Pass arguments to `replace_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) + # Pass arguments to `replace_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + # + # # Call the replace_access_levels method. + # result = client.replace_access_levels request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.replace_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.replace_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :replace_access_levels, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 all [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + # + # @overload list_service_perimeters(request, options = nil) + # Pass arguments to `list_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + # + # # Call the list_service_perimeters method. + # result = client.list_service_perimeters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p item + # end + # + def list_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + # + # @overload get_service_perimeter(request, options = nil) + # Pass arguments to `get_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service_perimeter(name: nil) + # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + # + # # Call the get_service_perimeter method. + # result = client.get_service_perimeter request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p result + # + def get_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_service_perimeter, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload create_service_perimeter(request, options = nil) + # Pass arguments to `create_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service_perimeter(parent: nil, service_perimeter: nil) + # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + # + # # Call the create_service_perimeter method. + # result = client.create_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload update_service_perimeter(request, options = nil) + # Pass arguments to `update_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) + # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + # + # # Call the update_service_perimeter method. + # result = client.update_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_perimeter&.name + header_params["service_perimeter.name"] = request.service_perimeter.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + # + # @overload delete_service_perimeter(request, options = nil) + # Pass arguments to `delete_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service_perimeter(name: nil) + # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + # + # # Call the delete_service_perimeter method. + # result = client.delete_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_service_perimeter, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + # + # @overload replace_service_perimeters(request, options = nil) + # Pass arguments to `replace_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) + # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + # + # # Call the replace_service_perimeters method. + # result = client.replace_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.replace_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.replace_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :replace_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + # + # @overload commit_service_perimeters(request, options = nil) + # Pass arguments to `commit_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload commit_service_perimeters(parent: nil, etag: nil) + # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + # + # # Call the commit_service_perimeters method. + # result = client.commit_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def commit_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.commit_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.commit_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :commit_service_perimeters, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 all [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + # + # @overload list_gcp_user_access_bindings(request, options = nil) + # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param page_size [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @param page_token [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + # + # # Call the list_gcp_user_access_bindings method. + # result = client.list_gcp_user_access_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p item + # end + # + def list_gcp_user_access_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :list_gcp_user_access_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + # + # @overload get_gcp_user_access_binding(request, options = nil) + # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_gcp_user_access_binding(name: nil) + # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + # + # # Call the get_gcp_user_access_binding method. + # result = client.get_gcp_user_access_binding request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p result + # + def get_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_gcp_user_access_binding, request, 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + # + # @overload create_gcp_user_access_binding(request, options = nil) + # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) + # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + # + # # Call the create_gcp_user_access_binding method. + # result = client.create_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :create_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + # + # @overload update_gcp_user_access_binding(request, options = nil) + # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) + # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + # + # # Call the update_gcp_user_access_binding method. + # result = client.update_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.gcp_user_access_binding&.name + header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :update_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + # + # @overload delete_gcp_user_access_binding(request, options = nil) + # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_gcp_user_access_binding(name: nil) + # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + # + # # Call the delete_gcp_user_access_binding method. + # result = client.delete_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :delete_gcp_user_access_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, + # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccessContextManager API. + # + # This class represents the configuration for AccessContextManager, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_access_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccessContextManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_levels + ## + # RPC-specific configuration for `get_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_level + ## + # RPC-specific configuration for `create_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_level + ## + # RPC-specific configuration for `update_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_level + ## + # RPC-specific configuration for `delete_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_level + ## + # RPC-specific configuration for `replace_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_access_levels + ## + # RPC-specific configuration for `list_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_perimeters + ## + # RPC-specific configuration for `get_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_perimeter + ## + # RPC-specific configuration for `create_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_perimeter + ## + # RPC-specific configuration for `update_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_perimeter + ## + # RPC-specific configuration for `delete_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_perimeter + ## + # RPC-specific configuration for `replace_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_service_perimeters + ## + # RPC-specific configuration for `commit_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :commit_service_perimeters + ## + # RPC-specific configuration for `list_gcp_user_access_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gcp_user_access_bindings + ## + # RPC-specific configuration for `get_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gcp_user_access_binding + ## + # RPC-specific configuration for `create_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gcp_user_access_binding + ## + # RPC-specific configuration for `update_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gcp_user_access_binding + ## + # RPC-specific configuration for `delete_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gcp_user_access_binding + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels + @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config + get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level + @get_access_level = ::Gapic::Config::Method.new get_access_level_config + create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level + @create_access_level = ::Gapic::Config::Method.new create_access_level_config + update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level + @update_access_level = ::Gapic::Config::Method.new update_access_level_config + delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level + @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config + replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels + @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config + list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters + @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config + get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter + @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config + create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter + @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config + update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter + @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config + delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter + @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config + replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters + @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config + commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters + @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config + list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings + @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config + get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding + @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config + create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding + @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config + update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding + @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config + delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding + @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb new file mode 100644 index 000000000000..776e70b9d2b2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # Credentials for the AccessContextManager 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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb new file mode 100644 index 000000000000..1fdaf89aae95 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Identity::AccessContextManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb new file mode 100644 index 000000000000..11645e15c66f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # Path helper methods for the AccessContextManager API. + module Paths + ## + # Create a fully-qualified AccessLevel resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}/accessLevels/{access_level}` + # + # @param access_policy [String] + # @param access_level [String] + # + # @return [::String] + def access_level_path access_policy:, access_level: + raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" + + "accessPolicies/#{access_policy}/accessLevels/#{access_level}" + end + + ## + # Create a fully-qualified AccessPolicy resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}` + # + # @param access_policy [String] + # + # @return [::String] + def access_policy_path access_policy: + "accessPolicies/#{access_policy}" + end + + ## + # Create a fully-qualified GcpUserAccessBinding resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}` + # + # @param organization [String] + # @param gcp_user_access_binding [String] + # + # @return [::String] + def gcp_user_access_binding_path organization:, gcp_user_access_binding: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/gcpUserAccessBindings/#{gcp_user_access_binding}" + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified ServicePerimeter resource string. + # + # The resource will be in the following format: + # + # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` + # + # @param access_policy [String] + # @param service_perimeter [String] + # + # @return [::String] + def service_perimeter_path access_policy:, service_perimeter: + raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" + + "accessPolicies/#{access_policy}/servicePerimeters/#{service_perimeter}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb new file mode 100644 index 000000000000..db852d4c1c3e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/identity/access_context_manager/v1/version" + +require "google/identity/access_context_manager/v1/access_context_manager/credentials" +require "google/identity/access_context_manager/v1/access_context_manager/paths" +require "google/identity/access_context_manager/v1/access_context_manager/rest/operations" +require "google/identity/access_context_manager/v1/access_context_manager/rest/client" + +module Google + module Identity + module AccessContextManager + module V1 + ## + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + # To load this service and instantiate a REST client: + # + # require "google/identity/access_context_manager/v1/access_context_manager/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module AccessContextManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/identity/access_context_manager/v1/access_context_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb new file mode 100644 index 000000000000..3f2ec497d8d9 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb @@ -0,0 +1,3090 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager/rest/service_stub" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + ## + # REST client for the AccessContextManager service. + # + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :access_context_manager_stub + + ## + # Configure the AccessContextManager Client class. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccessContextManager clients + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccessContextManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::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 + @access_context_manager_stub.universe_domain + end + + ## + # Create a new AccessContextManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 + + @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @access_context_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @access_context_manager_stub.logger + end + + # Service calls + + ## + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + # + # @overload list_access_policies(request, options = nil) + # Pass arguments to `list_access_policies` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_access_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @param page_size [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + # + # # Call the list_access_policies method. + # result = client.list_access_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + # p item + # end + # + def list_access_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_access_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, "access_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + # + # @overload get_access_policy(request, options = nil) + # Pass arguments to `get_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_policy(name: nil) + # Pass arguments to `get_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + # + # # Call the get_access_policy method. + # result = client.get_access_policy request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + # p result + # + def get_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_access_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + # + # @overload create_access_policy(request, options = nil) + # Pass arguments to `create_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) + # Pass arguments to `create_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @param parent [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @param title [::String] + # Required. Human readable title. Does not affect behavior. + # @param scopes [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @param create_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was created in UTC. + # @param update_time [::Google::Protobuf::Timestamp, ::Hash] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @param etag [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + # + # # Call the create_access_policy method. + # result = client.create_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy + + # Converts hash and nil to an 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_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + # + # @overload update_access_policy(request, options = nil) + # Pass arguments to `update_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] + # Required. The updated AccessPolicy. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + # + # # Call the update_access_policy method. + # result = client.update_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + # + # @overload delete_access_policy(request, options = nil) + # Pass arguments to `delete_access_policy` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_policy(name: nil) + # Pass arguments to `delete_access_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + # + # # Call the delete_access_policy method. + # result = client.delete_access_policy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_access_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + # + # @overload list_access_levels(request, options = nil) + # Pass arguments to `list_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) + # Pass arguments to `list_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + # + # # Call the list_access_levels method. + # result = client.list_access_levels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + # p item + # end + # + def list_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_access_levels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, "access_levels", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + # + # @overload get_access_level(request, options = nil) + # Pass arguments to `get_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_access_level(name: nil, access_level_format: nil) + # Pass arguments to `get_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + # + # # Call the get_access_level method. + # result = client.get_access_level request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + # p result + # + def get_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_access_level request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload create_access_level(request, options = nil) + # Pass arguments to `create_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_access_level(parent: nil, access_level: nil) + # Pass arguments to `create_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + # + # # Call the create_access_level method. + # result = client.create_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest + + # Converts hash and nil to an 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_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + # + # @overload update_access_level(request, options = nil) + # Pass arguments to `update_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_access_level(access_level: nil, update_mask: nil) + # Pass arguments to `update_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + # + # # Call the update_access_level method. + # result = client.update_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + # + # @overload delete_access_level(request, options = nil) + # Pass arguments to `delete_access_level` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_access_level(name: nil) + # Pass arguments to `delete_access_level` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + # + # # Call the delete_access_level method. + # result = client.delete_access_level request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_access_level request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_access_level.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_access_level.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_access_level request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + # + # @overload replace_access_levels(request, options = nil) + # Pass arguments to `replace_access_levels` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) + # Pass arguments to `replace_access_levels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + # + # # Call the replace_access_levels method. + # result = client.replace_access_levels request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_access_levels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.replace_access_levels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.replace_access_levels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.replace_access_levels request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + # + # @overload list_service_perimeters(request, options = nil) + # Pass arguments to `list_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @param page_size [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @param page_token [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + # + # # Call the list_service_perimeters method. + # result = client.list_service_perimeters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p item + # end + # + def list_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_service_perimeters request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, "service_perimeters", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + # + # @overload get_service_perimeter(request, options = nil) + # Pass arguments to `get_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service_perimeter(name: nil) + # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + # + # # Call the get_service_perimeter method. + # result = client.get_service_perimeter request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + # p result + # + def get_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_service_perimeter request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload create_service_perimeter(request, options = nil) + # Pass arguments to `create_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service_perimeter(parent: nil, service_perimeter: nil) + # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + # + # # Call the create_service_perimeter method. + # result = client.create_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + # + # @overload update_service_perimeter(request, options = nil) + # Pass arguments to `update_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) + # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask to control which fields get updated. Must be non-empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + # + # # Call the update_service_perimeter method. + # result = client.update_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + # + # @overload delete_service_perimeter(request, options = nil) + # Pass arguments to `delete_service_perimeter` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service_perimeter(name: nil) + # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + # + # # Call the delete_service_perimeter method. + # result = client.delete_service_perimeter request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_perimeter request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service_perimeter.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_perimeter.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_service_perimeter request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + # + # @overload replace_service_perimeters(request, options = nil) + # Pass arguments to `replace_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) + # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + # + # # Call the replace_service_perimeters method. + # result = client.replace_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def replace_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.replace_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.replace_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.replace_service_perimeters request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + # + # @overload commit_service_perimeters(request, options = nil) + # Pass arguments to `commit_service_perimeters` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload commit_service_perimeters(parent: nil, etag: nil) + # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @param etag [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + # + # # Call the commit_service_perimeters method. + # result = client.commit_service_perimeters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def commit_service_perimeters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.commit_service_perimeters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.commit_service_perimeters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.commit_service_perimeters request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + # + # @overload list_gcp_user_access_bindings(request, options = nil) + # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param page_size [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @param page_token [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + # + # # Call the list_gcp_user_access_bindings method. + # result = client.list_gcp_user_access_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p item + # end + # + def list_gcp_user_access_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.list_gcp_user_access_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, "gcp_user_access_bindings", request, result, 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + # + # @overload get_gcp_user_access_binding(request, options = nil) + # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_gcp_user_access_binding(name: nil) + # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + # + # # Call the get_gcp_user_access_binding method. + # result = client.get_gcp_user_access_binding request + # + # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + # p result + # + def get_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_gcp_user_access_binding request, 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + # + # @overload create_gcp_user_access_binding(request, options = nil) + # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) + # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Example: "organizations/256" + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + # + # # Call the create_gcp_user_access_binding method. + # result = client.create_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest + + # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.create_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + # + # @overload update_gcp_user_access_binding(request, options = nil) + # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) + # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + # + # # Call the update_gcp_user_access_binding method. + # result = client.update_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.update_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + # + # @overload delete_gcp_user_access_binding(request, options = nil) + # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type + # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_gcp_user_access_binding(name: nil) + # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + # + # # Call the delete_gcp_user_access_binding method. + # result = client.delete_gcp_user_access_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_gcp_user_access_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.delete_gcp_user_access_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for the specified Access Context Manager + # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, + # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/identity/access_context_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @access_context_manager_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccessContextManager REST API. + # + # This class represents the configuration for AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_access_policies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::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 AccessContextManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_access_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_policies + ## + # RPC-specific configuration for `get_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_policy + ## + # RPC-specific configuration for `create_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_policy + ## + # RPC-specific configuration for `update_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_policy + ## + # RPC-specific configuration for `delete_access_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_policy + ## + # RPC-specific configuration for `list_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_levels + ## + # RPC-specific configuration for `get_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :get_access_level + ## + # RPC-specific configuration for `create_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :create_access_level + ## + # RPC-specific configuration for `update_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :update_access_level + ## + # RPC-specific configuration for `delete_access_level` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_access_level + ## + # RPC-specific configuration for `replace_access_levels` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_access_levels + ## + # RPC-specific configuration for `list_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_perimeters + ## + # RPC-specific configuration for `get_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_perimeter + ## + # RPC-specific configuration for `create_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_perimeter + ## + # RPC-specific configuration for `update_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_perimeter + ## + # RPC-specific configuration for `delete_service_perimeter` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_perimeter + ## + # RPC-specific configuration for `replace_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_service_perimeters + ## + # RPC-specific configuration for `commit_service_perimeters` + # @return [::Gapic::Config::Method] + # + attr_reader :commit_service_perimeters + ## + # RPC-specific configuration for `list_gcp_user_access_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gcp_user_access_bindings + ## + # RPC-specific configuration for `get_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gcp_user_access_binding + ## + # RPC-specific configuration for `create_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gcp_user_access_binding + ## + # RPC-specific configuration for `update_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gcp_user_access_binding + ## + # RPC-specific configuration for `delete_gcp_user_access_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gcp_user_access_binding + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies + @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config + get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy + @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config + create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy + @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config + update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy + @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config + delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy + @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config + list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels + @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config + get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level + @get_access_level = ::Gapic::Config::Method.new get_access_level_config + create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level + @create_access_level = ::Gapic::Config::Method.new create_access_level_config + update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level + @update_access_level = ::Gapic::Config::Method.new update_access_level_config + delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level + @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config + replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels + @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config + list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters + @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config + get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter + @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config + create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter + @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config + update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter + @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config + delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter + @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config + replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters + @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config + commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters + @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config + list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings + @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config + get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding + @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config + create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding + @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config + update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding + @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config + delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding + @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb new file mode 100644 index 000000000000..484cf2ada2d9 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb new file mode 100644 index 000000000000..2eba8ab83681 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb @@ -0,0 +1,1693 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + module Rest + ## + # REST service stub for the AccessContextManager 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_access_policies REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] + # A result object deserialized from the server's reply + def list_access_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # A result object deserialized from the server's reply + def get_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.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_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_access_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] + # A result object deserialized from the server's reply + def list_access_levels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_levels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_access_levels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # A result object deserialized from the server's reply + def get_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::AccessLevel.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_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_access_level request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_level_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_access_level", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the replace_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def replace_access_levels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_replace_access_levels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "replace_access_levels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] + # A result object deserialized from the server's reply + def list_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # A result object deserialized from the server's reply + def get_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service_perimeter request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_perimeter_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service_perimeter", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the replace_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def replace_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_replace_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "replace_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the commit_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def commit_service_perimeters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_commit_service_perimeters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "commit_service_perimeters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_gcp_user_access_bindings REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] + # A result object deserialized from the server's reply + def list_gcp_user_access_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_gcp_user_access_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # A result object deserialized from the server's reply + def get_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.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_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_gcp_user_access_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_gcp_user_access_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_gcp_user_access_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_policies REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/accessPolicies", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # 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_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/accessPolicies", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_policy REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_access_levels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/accessLevels", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] + # 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_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accessLevels", + body: "access_level", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{access_level.name}", + body: "access_level", + matches: [ + ["access_level.name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_access_level REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_access_level_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the replace_access_levels REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_replace_access_levels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accessLevels:replaceAll", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/servicePerimeters", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters", + body: "service_perimeter", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_perimeter.name}", + body: "service_perimeter", + matches: [ + ["service_perimeter.name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_perimeter REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_perimeter_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the replace_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_replace_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters:replaceAll", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the commit_service_perimeters REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_commit_service_perimeters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/servicePerimeters:commit", + body: "*", + matches: [ + ["parent", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_gcp_user_access_bindings REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_gcp_user_access_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/gcpUserAccessBindings", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] + # 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_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/gcpUserAccessBindings", + body: "gcp_user_access_binding", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{gcp_user_access_binding.name}", + body: "gcp_user_access_binding", + matches: [ + ["gcp_user_access_binding.name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_gcp_user_access_binding REST call + # + # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_gcp_user_access_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb new file mode 100644 index 000000000000..b85e8d3b9a1c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager/rest" +require "google/identity/access_context_manager/v1/version" + +module Google + module Identity + module AccessContextManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/identity/access_context_manager/v1/rest" + # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb new file mode 100644 index 000000000000..d2c2604fbcd6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb new file mode 100644 index 000000000000..5b241ff87987 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/type/device_resources.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/identity/accesscontextmanager/type/device_resources.proto\x12)google.identity.accesscontextmanager.type*p\n\x16\x44\x65viceEncryptionStatus\x12\x1a\n\x16\x45NCRYPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NCRYPTION_UNSUPPORTED\x10\x01\x12\x0f\n\x0bUNENCRYPTED\x10\x02\x12\r\n\tENCRYPTED\x10\x03*\x82\x01\n\x06OsType\x12\x12\n\x0eOS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45SKTOP_MAC\x10\x01\x12\x13\n\x0f\x44\x45SKTOP_WINDOWS\x10\x02\x12\x11\n\rDESKTOP_LINUX\x10\x03\x12\x15\n\x11\x44\x45SKTOP_CHROME_OS\x10\x06\x12\x0b\n\x07\x41NDROID\x10\x04\x12\x07\n\x03IOS\x10\x05*V\n\x15\x44\x65viceManagementLevel\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\x42\x8d\x02\n-com.google.identity.accesscontextmanager.typeB\tTypeProtoP\x01ZHgoogle.golang.org/genproto/googleapis/identity/accesscontextmanager/type\xaa\x02)Google.Identity.AccessContextManager.Type\xca\x02)Google\\Identity\\AccessContextManager\\Type\xea\x02,Google::Identity::AccessContextManager::Typeb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module Type + DeviceEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceEncryptionStatus").enummodule + OsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.OsType").enummodule + DeviceManagementLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceManagementLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb new file mode 100644 index 000000000000..73ed14280699 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_context_manager.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/identity/accesscontextmanager/v1/access_level_pb' +require 'google/identity/accesscontextmanager/v1/access_policy_pb' +require 'google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb' +require 'google/identity/accesscontextmanager/v1/service_perimeter_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/identity/accesscontextmanager/v1/access_context_manager.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a\x45google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x8c\x01\n\x19ListAccessPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1aListAccessPoliciesResponse\x12N\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x16GetAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\x9d\x01\n\x19UpdateAccessPolicyRequest\x12J\n\x06policy\x18\x01 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x19\x44\x65leteAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\xdc\x01\n\x17ListAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x04 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\x80\x01\n\x18ListAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x15GetAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x02 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\xb4\x01\n\x18\x43reateAccessLevelRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x02 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\"\xa1\x01\n\x18UpdateAccessLevelRequest\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"a\n\x18\x44\x65leteAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\"\xc5\x01\n\x1aReplaceAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12P\n\raccess_levels\x18\x02 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"j\n\x1bReplaceAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\"\x93\x01\n\x1cListServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1dListServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1aGetServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xc8\x01\n\x1d\x43reateServicePerimeterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Y\n\x11service_perimeter\x18\x02 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateServicePerimeterRequest\x12Y\n\x11service_perimeter\x18\x01 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n\x1d\x44\x65leteServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xd9\x01\n\x1fReplaceServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Z\n\x12service_perimeters\x18\x02 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"y\n ReplaceServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"|\n\x1e\x43ommitServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"x\n\x1f\x43ommitServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"\x9d\x01\n ListGcpUserAccessBindingsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\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\"\x9d\x01\n!ListGcpUserAccessBindingsResponse\x12_\n\x18gcp_user_access_bindings\x18\x01 \x03(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x1eGetGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\xd2\x01\n!CreateGcpUserAccessBindingRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x63\n\x17gcp_user_access_binding\x18\x02 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\"\xbe\x01\n!UpdateGcpUserAccessBindingRequest\x12\x63\n\x17gcp_user_access_binding\x18\x01 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"s\n!DeleteGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\'\n%GcpUserAccessBindingOperationMetadata\"\'\n%AccessContextManagerOperationMetadata*D\n\x0bLevelFormat\x12\x1c\n\x18LEVEL_FORMAT_UNSPECIFIED\x10\x00\x12\x0e\n\nAS_DEFINED\x10\x01\x12\x07\n\x03\x43\x45L\x10\x02\x32\xf1\x32\n\x14\x41\x63\x63\x65ssContextManager\x12\xb9\x01\n\x12ListAccessPolicies\x12\x42.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest\x1a\x43.google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/accessPolicies\x12\xb5\x01\n\x0fGetAccessPolicy\x12?.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest\x1a\x35.google.identity.accesscontextmanager.v1.AccessPolicy\"*\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{name=accessPolicies/*}\x12\xc1\x01\n\x12\x43reateAccessPolicy\x12\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02\x17\"\x12/v1/accessPolicies:\x01*\x12\xf8\x01\n\x12UpdateAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02,2\"/v1/{policy.name=accessPolicies/*}:\x06policy\x12\xe4\x01\n\x12\x44\x65leteAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/{name=accessPolicies/*}\x12\xd4\x01\n\x10ListAccessLevels\x12@.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest\x1a\x41.google.identity.accesscontextmanager.v1.ListAccessLevelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=accessPolicies/*}/accessLevels\x12\xc1\x01\n\x0eGetAccessLevel\x12>.google.identity.accesscontextmanager.v1.GetAccessLevelRequest\x1a\x34.google.identity.accesscontextmanager.v1.AccessLevel\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=accessPolicies/*/accessLevels/*}\x12\x85\x02\n\x11\x43reateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x13parent,access_level\x82\xd3\xe4\x93\x02:\"*/v1/{parent=accessPolicies/*}/accessLevels:\x0c\x61\x63\x63\x65ss_level\x12\x97\x02\n\x11UpdateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x18\x61\x63\x63\x65ss_level,update_mask\x82\xd3\xe4\x93\x02G27/v1/{access_level.name=accessPolicies/*/accessLevels/*}:\x0c\x61\x63\x63\x65ss_level\x12\xf1\x01\n\x11\x44\x65leteAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=accessPolicies/*/accessLevels/*}\x12\x83\x02\n\x13ReplaceAccessLevels\x12\x43.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x44\n\x1bReplaceAccessLevelsResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{parent=accessPolicies/*}/accessLevels:replaceAll:\x01*\x12\xe8\x01\n\x15ListServicePerimeters\x12\x45.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest\x1a\x46.google.identity.accesscontextmanager.v1.ListServicePerimetersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=accessPolicies/*}/servicePerimeters\x12\xd5\x01\n\x13GetServicePerimeter\x12\x43.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest\x1a\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\xa3\x02\n\x16\x43reateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x18parent,service_perimeter\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accessPolicies/*}/servicePerimeters:\x11service_perimeter\x12\xba\x02\n\x16UpdateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x1dservice_perimeter,update_mask\x82\xd3\xe4\x93\x02V2A/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}:\x11service_perimeter\x12\x80\x02\n\x16\x44\x65leteServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\x97\x02\n\x18ReplaceServicePerimeters\x12H.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41I\n ReplaceServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll:\x01*\x12\x90\x02\n\x17\x43ommitServicePerimeters\x12G.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41H\n\x1f\x43ommitServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02;\"6/v1/{parent=accessPolicies/*}/servicePerimeters:commit:\x01*\x12\xf7\x01\n\x19ListGcpUserAccessBindings\x12I.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest\x1aJ.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*}/gcpUserAccessBindings\x12\xe4\x01\n\x17GetGcpUserAccessBinding\x12G.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest\x1a=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\xbe\x02\n\x1a\x43reateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x1eparent,gcp_user_access_binding\x82\xd3\xe4\x93\x02M\"2/v1/{parent=organizations/*}/gcpUserAccessBindings:\x17gcp_user_access_binding\x12\xdb\x02\n\x1aUpdateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41#gcp_user_access_binding,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}:\x17gcp_user_access_binding\x12\x8c\x02\n\x1a\x44\x65leteGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41>\n\x15google.protobuf.Empty\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\x82\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:setIamPolicy:\x01*\x12\x82\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:getIamPolicy:\x01*\x12\xbf\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd3\x01\x82\xd3\xe4\x93\x02\xcc\x01\"2/v1/{resource=accessPolicies/*}:testIamPermissions:\x01*ZF\"A/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions:\x01*ZK\"F/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions:\x01*\x1aW\xca\x41#accesscontextmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19\x41\x63\x63\x65ssContextManagerProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest").msgclass + ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse").msgclass + GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessPolicyRequest").msgclass + UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest").msgclass + DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest").msgclass + ListAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsRequest").msgclass + ListAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsResponse").msgclass + GetAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessLevelRequest").msgclass + CreateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateAccessLevelRequest").msgclass + UpdateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest").msgclass + DeleteAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest").msgclass + ReplaceAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest").msgclass + ReplaceAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse").msgclass + ListServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersRequest").msgclass + ListServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersResponse").msgclass + GetServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetServicePerimeterRequest").msgclass + CreateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest").msgclass + UpdateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest").msgclass + DeleteServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest").msgclass + ReplaceServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest").msgclass + ReplaceServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse").msgclass + CommitServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest").msgclass + CommitServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse").msgclass + ListGcpUserAccessBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest").msgclass + ListGcpUserAccessBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse").msgclass + GetGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest").msgclass + CreateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest").msgclass + UpdateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest").msgclass + DeleteGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest").msgclass + GcpUserAccessBindingOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata").msgclass + AccessContextManagerOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata").msgclass + LevelFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.LevelFormat").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb new file mode 100644 index 000000000000..5d40fe4c565a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb @@ -0,0 +1,240 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.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/identity/accesscontextmanager/v1/access_context_manager_pb' + +module Google + module Identity + module AccessContextManager + module V1 + module AccessContextManager + # API for setting [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] and [service + # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] + # for Google Cloud projects. Each organization has one [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the + # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # and [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is + # applicable to all resources in the organization. + # AccessPolicies + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.identity.accesscontextmanager.v1.AccessContextManager' + + # Lists all [access policies] + # [google.identity.accesscontextmanager.v1.AccessPolicy] in an + # organization. + rpc :ListAccessPolicies, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse + # Returns an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. + rpc :GetAccessPolicy, ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Google::Identity::AccessContextManager::V1::AccessPolicy + # Creates an access policy. This method fails if the organization already has + # an access policy. The long-running operation has a successful status + # after the access policy propagates to long-lasting storage. + # Syntactic and basic semantic errors are returned in `metadata` as a + # BadRequest proto. + rpc :CreateAccessPolicy, ::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Google::Longrunning::Operation + # Updates an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. The + # long-running operation from this RPC has a successful status after the + # changes to the [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate + # to long-lasting storage. + rpc :UpdateAccessPolicy, ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation + # Deletes an [access policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the + # resource name. The long-running operation has a successful status after the + # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] + # is removed from long-lasting storage. + rpc :DeleteAccessPolicy, ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation + # Lists all [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] for an access + # policy. + rpc :ListAccessLevels, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse + # Gets an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. + rpc :GetAccessLevel, ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Google::Identity::AccessContextManager::V1::AccessLevel + # Creates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the [access + # level] [google.identity.accesscontextmanager.v1.AccessLevel] + # propagates to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + rpc :CreateAccessLevel, ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Google::Longrunning::Operation + # Updates an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running + # operation from this RPC has a successful status after the changes to + # the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] propagate + # to long-lasting storage. If [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contain + # errors, an error response is returned for the first error encountered. + rpc :UpdateAccessLevel, ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Google::Longrunning::Operation + # Deletes an [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource + # name. The long-running operation from this RPC has a successful status + # after the [access level] + # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed + # from long-lasting storage. + rpc :DeleteAccessLevel, ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Google::Longrunning::Operation + # Replaces all existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with + # the [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting + # storage. If the replacement contains errors, an error response is returned + # for the first error encountered. Upon error, the replacement is cancelled, + # and existing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are not + # affected. The Operation.response field contains + # ReplaceAccessLevelsResponse. Removing [access levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an + # error. + rpc :ReplaceAccessLevels, ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Google::Longrunning::Operation + # Lists all [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an + # access policy. + rpc :ListServicePerimeters, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse + # Gets a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. + rpc :GetServicePerimeter, ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Google::Identity::AccessContextManager::V1::ServicePerimeter + # Creates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + rpc :CreateServicePerimeter, ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Google::Longrunning::Operation + # Updates a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The + # long-running operation from this RPC has a successful status after the + # [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] + # propagates to long-lasting storage. If a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains + # errors, an error response is returned for the first error encountered. + rpc :UpdateServicePerimeter, ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Google::Longrunning::Operation + # Deletes a [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the + # resource name. The long-running operation from this RPC has a successful + # status after the [service perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from + # long-lasting storage. + rpc :DeleteServicePerimeter, ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Google::Longrunning::Operation + # Replace all existing [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access + # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This + # is done atomically. The long-running operation from this RPC has a + # successful status after all replacements propagate to long-lasting storage. + # Replacements containing errors result in an error response for the first + # error encountered. Upon an error, replacement are cancelled and existing + # [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not + # affected. The Operation.response field contains + # ReplaceServicePerimetersResponse. + rpc :ReplaceServicePerimeters, ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Google::Longrunning::Operation + # Commits the dry-run specification for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # A commit operation on a service perimeter involves copying its `spec` field + # to the `status` field of the service perimeter. Only [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] with + # `use_explicit_dry_run_spec` field set to true are affected by a commit + # operation. The long-running operation from this RPC has a successful + # status after the dry-run specifications for all the [service perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been + # committed. If a commit fails, it causes the long-running operation to + # return an error response and the entire commit operation is cancelled. + # When successful, the Operation.response field contains + # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are + # cleared after a successful commit operation. + rpc :CommitServicePerimeters, ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Google::Longrunning::Operation + # Lists all [GcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a + # Google Cloud organization. + rpc :ListGcpUserAccessBindings, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse + # Gets the [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with + # the given name. + rpc :GetGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding + # Creates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the + # client specifies a [name] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], + # the server ignores it. Fails if a resource already exists with the same + # [group_key] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. + # Completion of this long-running operation does not necessarily signify that + # the new binding is deployed onto all affected users, which may take more + # time. + rpc :CreateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Updates a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the changed binding is deployed onto all affected users, which may take + # more time. + rpc :UpdateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Deletes a [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. + # Completion of this long-running operation does not necessarily signify that + # the binding deletion is deployed onto all affected users, which may take + # more time. + rpc :DeleteGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Google::Longrunning::Operation + # Sets the IAM policy for the specified Access Context Manager + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + # This method replaces the existing IAM policy on the access policy. The IAM + # policy controls the set of users who can perform specific operations on the + # Access Context Manager [access + # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for the specified Access Context Manager + # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the IAM permissions that the caller has on the specified Access + # Context Manager resource. The resource can be an + # [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy], + # [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or + # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter + # ]. This method does not support other resources. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb new file mode 100644 index 000000000000..ead78b22f47d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_level.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/identity/accesscontextmanager/type/device_resources_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n:google/identity/accesscontextmanager/v1/access_level.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a@google/identity/accesscontextmanager/type/device_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xaa\x03\n\x0b\x41\x63\x63\x65ssLevel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x33.google.identity.accesscontextmanager.v1.BasicLevelH\x00\x12\x46\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.CustomLevelH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:p\xea\x41m\n/accesscontextmanager.googleapis.com/AccessLevel\x12:accessPolicies/{access_policy}/accessLevels/{access_level}B\x07\n\x05level\"\xef\x01\n\nBasicLevel\x12\x46\n\nconditions\x18\x01 \x03(\x0b\x32\x32.google.identity.accesscontextmanager.v1.Condition\x12j\n\x12\x63ombining_function\x18\x02 \x01(\x0e\x32N.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction\"-\n\x1a\x43onditionCombiningFunction\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x01\n\tCondition\x12\x16\n\x0eip_subnetworks\x18\x01 \x03(\t\x12L\n\rdevice_policy\x18\x02 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.DevicePolicy\x12\x1e\n\x16required_access_levels\x18\x03 \x03(\t\x12\x0e\n\x06negate\x18\x05 \x01(\x08\x12\x0f\n\x07members\x18\x06 \x03(\t\x12\x0f\n\x07regions\x18\x07 \x03(\t\".\n\x0b\x43ustomLevel\x12\x1f\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x11.google.type.Expr\"\x89\x03\n\x0c\x44\x65vicePolicy\x12\x1a\n\x12require_screenlock\x18\x01 \x01(\x08\x12\x66\n\x1b\x61llowed_encryption_statuses\x18\x02 \x03(\x0e\x32\x41.google.identity.accesscontextmanager.type.DeviceEncryptionStatus\x12M\n\x0eos_constraints\x18\x03 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.OsConstraint\x12j\n allowed_device_management_levels\x18\x06 \x03(\x0e\x32@.google.identity.accesscontextmanager.type.DeviceManagementLevel\x12\x1e\n\x16require_admin_approval\x18\x07 \x01(\x08\x12\x1a\n\x12require_corp_owned\x18\x08 \x01(\x08\"\x8f\x01\n\x0cOsConstraint\x12\x42\n\x07os_type\x18\x01 \x01(\x0e\x32\x31.google.identity.accesscontextmanager.type.OsType\x12\x17\n\x0fminimum_version\x18\x02 \x01(\t\x12\"\n\x1arequire_verified_chrome_os\x18\x03 \x01(\x08\x42\xa7\x02\n+com.google.identity.accesscontextmanager.v1B\x10\x41\x63\x63\x65ssLevelProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + AccessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessLevel").msgclass + BasicLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel").msgclass + BasicLevel::ConditionCombiningFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction").enummodule + Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.Condition").msgclass + CustomLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CustomLevel").msgclass + DevicePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DevicePolicy").msgclass + OsConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.OsConstraint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb new file mode 100644 index 000000000000..3a8fc38766be --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/access_policy.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n;google/identity/accesscontextmanager/v1/access_policy.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\x0c\x41\x63\x63\x65ssPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:U\xea\x41R\n0accesscontextmanager.googleapis.com/AccessPolicy\x12\x1e\x61\x63\x63\x65ssPolicies/{access_policy}B\xa2\x02\n+com.google.identity.accesscontextmanager.v1B\x0bPolicyProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb new file mode 100644 index 000000000000..ea5da3c0c0e1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\x14GcpUserAccessBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\tgroup_key\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12N\n\raccess_levels\x18\x03 \x03(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel:\x8c\x01\xea\x41\x88\x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorganizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAccessBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + GcpUserAccessBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBinding").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb new file mode 100644 index 000000000000..e57cf251b2a2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/identity/accesscontextmanager/v1/service_perimeter.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/identity/accesscontextmanager/v1/service_perimeter.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x05\n\x10ServicePerimeter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12_\n\x0eperimeter_type\x18\x06 \x01(\x0e\x32G.google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType\x12O\n\x06status\x18\x07 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12M\n\x04spec\x18\x08 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12!\n\x19use_explicit_dry_run_spec\x18\t \x01(\x08\"F\n\rPerimeterType\x12\x1a\n\x16PERIMETER_TYPE_REGULAR\x10\x00\x12\x19\n\x15PERIMETER_TYPE_BRIDGE\x10\x01:\x7f\xea\x41|\n4accesscontextmanager.googleapis.com/ServicePerimeter\x12\x44\x61\x63\x63\x65ssPolicies/{access_policy}/servicePerimeters/{service_perimeter}\"\xb5\x0f\n\x16ServicePerimeterConfig\x12\x11\n\tresources\x18\x01 \x03(\t\x12\x15\n\raccess_levels\x18\x02 \x03(\t\x12\x1b\n\x13restricted_services\x18\x04 \x03(\t\x12v\n\x17vpc_accessible_services\x18\n \x01(\x0b\x32U.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices\x12g\n\x10ingress_policies\x18\x08 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy\x12\x65\n\x0f\x65gress_policies\x18\t \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\x1aM\n\x15VpcAccessibleServices\x12\x1a\n\x12\x65nable_restriction\x18\x01 \x01(\x08\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x1a@\n\x0eMethodSelector\x12\x10\n\x06method\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x8e\x01\n\x0c\x41piOperation\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12h\n\x10method_selectors\x18\x02 \x03(\x0b\x32N.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector\x1a\x45\n\rIngressSource\x12\x16\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\tH\x00\x12\x12\n\x08resource\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a\xe6\x01\n\x0bIngressFrom\x12^\n\x07sources\x18\x01 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource\x12\x12\n\nidentities\x18\x02 \x03(\t\x12\x63\n\ridentity_type\x18\x03 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x80\x01\n\tIngressTo\x12`\n\noperations\x18\x01 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x11\n\tresources\x18\x02 \x03(\t\x1a\xd1\x01\n\rIngressPolicy\x12\x61\n\x0cingress_from\x18\x01 \x01(\x0b\x32K.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom\x12]\n\ningress_to\x18\x02 \x01(\x0b\x32I.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo\x1a\x85\x01\n\nEgressFrom\x12\x12\n\nidentities\x18\x01 \x03(\t\x12\x63\n\ridentity_type\x18\x02 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x9b\x01\n\x08\x45gressTo\x12\x11\n\tresources\x18\x01 \x03(\t\x12`\n\noperations\x18\x02 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x1a\n\x12\x65xternal_resources\x18\x03 \x03(\t\x1a\xcc\x01\n\x0c\x45gressPolicy\x12_\n\x0b\x65gress_from\x18\x01 \x01(\x0b\x32J.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom\x12[\n\tegress_to\x18\x02 \x01(\x0b\x32H.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo\"n\n\x0cIdentityType\x12\x1d\n\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41NY_IDENTITY\x10\x01\x12\x14\n\x10\x41NY_USER_ACCOUNT\x10\x02\x12\x17\n\x13\x41NY_SERVICE_ACCOUNT\x10\x03\x42\xac\x02\n+com.google.identity.accesscontextmanager.v1B\x15ServicePerimeterProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Identity + module AccessContextManager + module V1 + ServicePerimeter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter").msgclass + ServicePerimeter::PerimeterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType").enummodule + ServicePerimeterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig").msgclass + ServicePerimeterConfig::VpcAccessibleServices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices").msgclass + ServicePerimeterConfig::MethodSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector").msgclass + ServicePerimeterConfig::ApiOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation").msgclass + ServicePerimeterConfig::IngressSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource").msgclass + ServicePerimeterConfig::IngressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom").msgclass + ServicePerimeterConfig::IngressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo").msgclass + ServicePerimeterConfig::IngressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy").msgclass + ServicePerimeterConfig::EgressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom").msgclass + ServicePerimeterConfig::EgressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo").msgclass + ServicePerimeterConfig::EgressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy").msgclass + ServicePerimeterConfig::IdentityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md new file mode 100644 index 000000000000..6f796a729053 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Access Context Manager V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb new file mode 100644 index 000000000000..98103f9a8eb2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module Type + # The encryption state of the device. + module DeviceEncryptionStatus + # The encryption status of the device is not specified or not known. + ENCRYPTION_UNSPECIFIED = 0 + + # The device does not support encryption. + ENCRYPTION_UNSUPPORTED = 1 + + # The device supports encryption, but is currently unencrypted. + UNENCRYPTED = 2 + + # The device is encrypted. + ENCRYPTED = 3 + end + + # The operating system type of the device. + # Next id: 7 + module OsType + # The operating system of the device is not specified or not known. + OS_UNSPECIFIED = 0 + + # A desktop Mac operating system. + DESKTOP_MAC = 1 + + # A desktop Windows operating system. + DESKTOP_WINDOWS = 2 + + # A desktop Linux operating system. + DESKTOP_LINUX = 3 + + # A desktop ChromeOS operating system. + DESKTOP_CHROME_OS = 6 + + # An Android operating system. + ANDROID = 4 + + # An iOS operating system. + IOS = 5 + end + + # The degree to which the device is managed by the Cloud organization. + module DeviceManagementLevel + # The device's management level is not specified or not known. + MANAGEMENT_UNSPECIFIED = 0 + + # The device is not managed. + NONE = 1 + + # Basic management is enabled, which is generally limited to monitoring and + # wiping the corporate account. + BASIC = 2 + + # Complete device management. This includes more thorough monitoring and the + # ability to directly manage the device (such as remote wiping). This can be + # enabled through the Android Enterprise Platform. + COMPLETE = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb new file mode 100644 index 000000000000..0a4ef8552281 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb @@ -0,0 +1,539 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # A request to list all `AccessPolicies` for a container. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the container to list AccessPolicy instances + # from. + # + # Format: + # `organizations/{org_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of AccessPolicy instances to include in the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of AccessPolicy instances. Defaults to + # the first page of results. + class ListAccessPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListAccessPoliciesRequest`. + # @!attribute [rw] access_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessPolicy>] + # List of the AccessPolicy instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListAccessPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `AccessPolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the access policy to get. + # + # Format `accessPolicies/{policy_id}` + class GetAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update an `AccessPolicy`. + # @!attribute [rw] policy + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # Required. The updated AccessPolicy. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete an `AccessPolicy`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the access policy to delete. + # + # Format `accessPolicies/{policy_id}` + class DeleteAccessPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list all `AccessLevels` in an `AccessPolicy`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy to list [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] to include in + # the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # Defaults to the first page of results. + # @!attribute [rw] access_level_format + # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression language, as + # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + # `AccessLevels` in the format they were defined. + class ListAccessLevelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListAccessLevelsRequest`. + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # List of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListAccessLevelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `AccessLevel`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + # @!attribute [rw] access_level_format + # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] + # Whether to return `BasicLevels` in the Cloud Common Expression + # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where + # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] + # are returned as `BasicLevels` or `CustomLevels` based on how they were + # created. If set to CEL, all [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as + # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent + # `CustomLevels`. + class GetAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create an `AccessLevel`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns this [Access + # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] access_level + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # Required. The [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] to create. + # Syntactic correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + class CreateAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update an `AccessLevel`. + # @!attribute [rw] access_level + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # Required. The updated [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic + # correctness of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] is a + # precondition for creation. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete an `AccessLevel`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: + # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + class DeleteAccessLevelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to replace all existing Access Levels in an Access Policy with + # the Access Levels provided. This is done atomically. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns these + # [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # Required. The desired [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] that should + # replace all existing [Access Levels] + # [google.identity.accesscontextmanager.v1.AccessLevel] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class ReplaceAccessLevelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to ReplaceAccessLevelsRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] access_levels + # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] + # List of the [Access Level] + # [google.identity.accesscontextmanager.v1.AccessLevel] instances. + class ReplaceAccessLevelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list all `ServicePerimeters` in an `AccessPolicy`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy to list [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. + # + # Format: + # `accessPolicies/{policy_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include + # in the list. Default 100. + # @!attribute [rw] page_token + # @return [::String] + # Next page token for the next batch of [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # Defaults to the first page of results. + class ListServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to `ListServicePerimetersRequest`. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of results. If the value is + # empty, no further results remain. + class ListServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a particular `ServicePerimeter`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + class GetServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a `ServicePerimeter`. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns this [Service + # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] service_perimeter + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # Required. The [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. + # Syntactic correctness of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a + # precondition for creation. + class CreateServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a `ServicePerimeter`. + # @!attribute [rw] service_perimeter + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # Required. The updated `ServicePerimeter`. Syntactic correctness of the + # `ServicePerimeter` is a precondition for creation. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask to control which fields get updated. Must be non-empty. + class UpdateServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a `ServicePerimeter`. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: + # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + class DeleteServicePerimeterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to replace all existing Service Perimeters in an Access Policy + # with the Service Perimeters provided. This is done atomically. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the access policy which owns these + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # Required. The desired [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should + # replace all existing [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the + # [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # replace operation is to be performed on. If, at the time of replace, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the replace operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class ReplaceServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to ReplaceServicePerimetersRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. + class ReplaceServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to commit dry-run specs in all [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to + # an {::Google::Identity::AccessContextManager::V1::AccessPolicy Access Policy}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name for the parent [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all + # [Service Perimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for + # the commit operation. + # + # Format: `accessPolicies/{policy_id}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag for the version of the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy] that this + # commit operation is to be performed on. If, at the time of commit, the + # etag for the Access Policy stored in Access Context Manager is different + # from the specified etag, then the commit operation will not be performed + # and the call will fail. This field is not required. If etag is not + # provided, the operation will be performed as if a valid etag is provided. + class CommitServicePerimetersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to CommitServicePerimetersRequest. This will be put inside of + # Operation.response field. + # @!attribute [rw] service_perimeters + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] + # List of all the [Service Perimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in + # the [Access Policy] + # [google.identity.accesscontextmanager.v1.AccessPolicy]. + class CommitServicePerimetersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [ListGcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. + # @!attribute [rw] parent + # @return [::String] + # Required. Example: "organizations/256" + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. The server may return fewer items. + # If left blank, the server may return any number of items. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If left blank, returns the first page. To enumerate all items, use the + # [next_page_token] + # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] + # from your previous list operation. + class ListGcpUserAccessBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of [ListGcpUserAccessBindings] + # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. + # @!attribute [rw] gcp_user_access_bindings + # @return [::Array<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] + # [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @!attribute [rw] next_page_token + # @return [::String] + # Token to get the next page of items. If blank, there are no more items. + class ListGcpUserAccessBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [GetGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding]. + # @!attribute [rw] name + # @return [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + class GetGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [CreateGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding]. + # @!attribute [rw] parent + # @return [::String] + # Required. Example: "organizations/256" + # @!attribute [rw] gcp_user_access_binding + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + class CreateGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [UpdateGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding]. + # @!attribute [rw] gcp_user_access_binding + # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] + # Required. [GcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Only the fields specified in this mask are updated. Because name and + # group_key cannot be changed, update_mask is required and must always be: + # + # update_mask { + # paths: "access_levels" + # } + class UpdateGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of [DeleteGcpUserAccessBinding] + # [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding]. + # @!attribute [rw] name + # @return [::String] + # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + class DeleteGcpUserAccessBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Currently, a completed operation means nothing. In the future, this metadata + # and a completed operation may indicate that the binding has taken effect and + # is affecting access decisions for all users. + class GcpUserAccessBindingOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of Access Context Manager's Long Running Operations. + class AccessContextManagerOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The format used in an `AccessLevel`. + module LevelFormat + # The format was not specified. + LEVEL_FORMAT_UNSPECIFIED = 0 + + # Uses the format the resource was defined in. BasicLevels are returned as + # BasicLevels, CustomLevels are returned as CustomLevels. + AS_DEFINED = 1 + + # Use Cloud Common Expression Language when returning the resource. Both + # BasicLevels and CustomLevels are returned as CustomLevels. + CEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb new file mode 100644 index 000000000000..263cc28aa3d0 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # An `AccessLevel` is a label that can be applied to requests to Google Cloud + # services, along with a list of requirements necessary for the label to be + # applied. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the Access Level. The `short_name` component + # must begin with a letter and only include alphanumeric and '_'. Format: + # `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum + # length of the `access_level` component is 50 characters. + # @!attribute [rw] title + # @return [::String] + # Human readable title. Must be unique within the Policy. + # @!attribute [rw] description + # @return [::String] + # Description of the `AccessLevel` and its use. Does not affect behavior. + # @!attribute [rw] basic + # @return [::Google::Identity::AccessContextManager::V1::BasicLevel] + # A `BasicLevel` composed of `Conditions`. + # + # Note: The following fields are mutually exclusive: `basic`, `custom`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom + # @return [::Google::Identity::AccessContextManager::V1::CustomLevel] + # A `CustomLevel` written in the Common Expression Language. + # + # Note: The following fields are mutually exclusive: `custom`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessLevel` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessLevel` was updated in UTC. + class AccessLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BasicLevel` is an `AccessLevel` using a set of recommended features. + # @!attribute [rw] conditions + # @return [::Array<::Google::Identity::AccessContextManager::V1::Condition>] + # Required. A list of requirements for the `AccessLevel` to be granted. + # @!attribute [rw] combining_function + # @return [::Google::Identity::AccessContextManager::V1::BasicLevel::ConditionCombiningFunction] + # How the `conditions` list should be combined to determine if a request is + # granted this `AccessLevel`. If AND is used, each `Condition` in + # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + # is used, at least one `Condition` in `conditions` must be satisfied for the + # `AccessLevel` to be applied. Default behavior is AND. + class BasicLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options for how the `conditions` list should be combined to determine if + # this `AccessLevel` is applied. Default is AND. + module ConditionCombiningFunction + # All `Conditions` must be true for the `BasicLevel` to be true. + AND = 0 + + # If at least one `Condition` is true, then the `BasicLevel` is true. + OR = 1 + end + end + + # A condition necessary for an `AccessLevel` to be granted. The Condition is an + # AND over its fields. So a Condition is true if: 1) the request IP is from one + # of the listed subnetworks AND 2) the originating device complies with the + # listed device policy AND 3) all listed access levels are granted AND 4) the + # request was sent at a time allowed by the DateTimeRestriction. + # @!attribute [rw] ip_subnetworks + # @return [::Array<::String>] + # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for + # a CIDR IP address block, the specified IP address portion must be properly + # truncated (i.e. all the host bits must be zero) or the input is considered + # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is + # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas + # "2001:db8::1/32" is not. The originating IP of a request must be in one of + # the listed subnets in order for this Condition to be true. If empty, all IP + # addresses are allowed. + # @!attribute [rw] device_policy + # @return [::Google::Identity::AccessContextManager::V1::DevicePolicy] + # Device specific restrictions, all restrictions must hold for the + # Condition to be true. If not specified, all devices are allowed. + # @!attribute [rw] required_access_levels + # @return [::Array<::String>] + # A list of other access levels defined in the same `Policy`, referenced by + # resource name. Referencing an `AccessLevel` which does not exist is an + # error. All access levels listed must be granted for the Condition + # to be true. Example: + # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + # @!attribute [rw] negate + # @return [::Boolean] + # Whether to negate the Condition. If true, the Condition becomes a NAND over + # its non-empty fields, each field must be false for the Condition overall to + # be satisfied. Defaults to false. + # @!attribute [rw] members + # @return [::Array<::String>] + # The request must be made by one of the provided user or service + # accounts. Groups are not supported. + # Syntax: + # `user:{emailid}` + # `serviceAccount:{emailid}` + # If not specified, a request may come from any user. + # @!attribute [rw] regions + # @return [::Array<::String>] + # The request must originate from one of the provided countries/regions. + # Must be valid ISO 3166-1 alpha-2 codes. + class Condition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language + # to represent the necessary conditions for the level to apply to a request. + # See CEL spec at: https://github.com/google/cel-spec + # @!attribute [rw] expr + # @return [::Google::Type::Expr] + # Required. A Cloud CEL expression evaluating to a boolean. + class CustomLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DevicePolicy` specifies device specific restrictions necessary to acquire a + # given access level. A `DevicePolicy` specifies requirements for requests from + # devices to be granted access levels, it does not do any enforcement on the + # device. `DevicePolicy` acts as an AND over all specified fields, and each + # repeated field is an OR over its elements. Any unset fields are ignored. For + # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : + # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be + # true for requests originating from encrypted Linux desktops and encrypted + # Windows desktops. + # @!attribute [rw] require_screenlock + # @return [::Boolean] + # Whether or not screenlock is required for the DevicePolicy to be true. + # Defaults to `false`. + # @!attribute [rw] allowed_encryption_statuses + # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>] + # Allowed encryptions statuses, an empty list allows all statuses. + # @!attribute [rw] os_constraints + # @return [::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>] + # Allowed OS versions, an empty list allows all types and all versions. + # @!attribute [rw] allowed_device_management_levels + # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>] + # Allowed device management levels, an empty list allows all management + # levels. + # @!attribute [rw] require_admin_approval + # @return [::Boolean] + # Whether the device needs to be approved by the customer admin. + # @!attribute [rw] require_corp_owned + # @return [::Boolean] + # Whether the device needs to be corp owned. + class DevicePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A restriction on the OS type and version of devices making requests. + # @!attribute [rw] os_type + # @return [::Google::Identity::AccessContextManager::Type::OsType] + # Required. The allowed OS type. + # @!attribute [rw] minimum_version + # @return [::String] + # The minimum allowed OS version. If not set, any version of this OS + # satisfies the constraint. Format: `"major.minor.patch"`. + # Examples: `"10.5.301"`, `"9.2.1"`. + # @!attribute [rw] require_verified_chrome_os + # @return [::Boolean] + # Only allows requests from devices with a verified Chrome OS. + # Verifications includes requirements that the device is enterprise-managed, + # conformant to domain policies, and the caller has permission to call + # the API targeted by the request. + class OsConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb new file mode 100644 index 000000000000..b034d49fe22d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # `AccessPolicy` is a container for `AccessLevels` (which define the necessary + # attributes to use Google Cloud services) and `ServicePerimeters` (which + # define regions of services able to freely pass data within a perimeter). An + # access policy is globally visible within an organization, and the + # restrictions it specifies apply to all projects within an organization. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the `AccessPolicy`. Format: + # `accessPolicies/{access_policy}` + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of this `AccessPolicy` in the Cloud Resource + # Hierarchy. Currently immutable once created. Format: + # `organizations/{organization_id}` + # @!attribute [rw] title + # @return [::String] + # Required. Human readable title. Does not affect behavior. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The scopes of a policy define which resources an ACM policy can restrict, + # and where ACM resources can be referenced. + # For example, a policy with scopes=["folders/123"] has the following + # behavior: + # - vpcsc perimeters can only restrict projects within folders/123 + # - access levels can only be referenced by resources within folders/123. + # If empty, there are no limitations on which resources can be restricted by + # an ACM policy, and there are no limitations on where ACM resources can be + # referenced. + # Only one policy can include a given scope (attempting to create a second + # policy which includes "folders/123" will result in an error). + # Currently, scopes cannot be modified after a policy is created. + # Currently, policies can only have a single scope. + # Format: list of `folders/{folder_number}` or `projects/{project_number}` + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessPolicy` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `AccessPolicy` was updated in UTC. + # @!attribute [rw] etag + # @return [::String] + # Output only. An opaque identifier for the current version of the + # `AccessPolicy`. This will always be a strongly validated etag, meaning that + # two Access Polices will be identical if and only if their etags are + # identical. Clients should not expect this to be in any specific format. + class AccessPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb new file mode 100644 index 000000000000..bbd9b110d43b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.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! + + +module Google + module Identity + module AccessContextManager + module V1 + # Restricts access to Cloud Console and Google Cloud APIs for a set of users + # using Context-Aware Access. + # @!attribute [rw] name + # @return [::String] + # Immutable. Assigned by the server during creation. The last segment has an arbitrary + # length and has only URI unreserved characters (as defined by + # [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). + # Should not be specified by the client during creation. + # Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" + # @!attribute [rw] group_key + # @return [::String] + # Required. Immutable. Google Group id whose members are subject to this binding's restrictions. + # See "id" in the [G Suite Directory API's Groups resource] + # (https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource). + # If a group's email address/alias is changed, this resource will continue + # to point at the changed group. This field does not accept group email + # addresses or aliases. + # Example: "01d520gv4vjcrht" + # @!attribute [rw] access_levels + # @return [::Array<::String>] + # Required. Access level that a user must have to be granted access. Only one access + # level is supported, not multiple. This repeated field must have exactly + # one element. + # Example: "accessPolicies/9522/accessLevels/device_trusted" + class GcpUserAccessBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb new file mode 100644 index 000000000000..be4e39e46ef2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Identity + module AccessContextManager + module V1 + # `ServicePerimeter` describes a set of Google Cloud resources which can freely + # import and export data amongst themselves, but not export outside of the + # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` + # has a target outside of the `ServicePerimeter`, the request will be blocked. + # Otherwise the request is allowed. There are two types of Service Perimeter - + # Regular and Bridge. Regular Service Perimeters cannot overlap, a single + # Google Cloud project can only belong to a single regular Service Perimeter. + # Service Perimeter Bridges can contain only Google Cloud projects as members, + # a single Google Cloud project may belong to multiple Service Perimeter + # Bridges. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the ServicePerimeter. The `short_name` + # component must begin with a letter and only include alphanumeric and '_'. + # Format: + # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` + # @!attribute [rw] title + # @return [::String] + # Human readable title. Must be unique within the Policy. + # @!attribute [rw] description + # @return [::String] + # Description of the `ServicePerimeter` and its use. Does not affect + # behavior. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `ServicePerimeter` was created in UTC. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the `ServicePerimeter` was updated in UTC. + # @!attribute [rw] perimeter_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter::PerimeterType] + # Perimeter type indicator. A single project is + # allowed to be a member of single regular perimeter, but multiple service + # perimeter bridges. A project cannot be a included in a perimeter bridge + # without being included in regular perimeter. For perimeter bridges, + # the restricted service list as well as access level lists must be + # empty. + # @!attribute [rw] status + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] + # Current ServicePerimeter configuration. Specifies sets of resources, + # restricted services and access levels that determine perimeter + # content and boundaries. + # @!attribute [rw] spec + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] + # Proposed (or dry run) ServicePerimeter configuration. This configuration + # allows to specify and test ServicePerimeter configuration without enforcing + # actual access restrictions. Only allowed to be set when the + # "use_explicit_dry_run_spec" flag is set. + # @!attribute [rw] use_explicit_dry_run_spec + # @return [::Boolean] + # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly + # exists for all Service Perimeters, and that spec is identical to the + # status for those Service Perimeters. When this flag is set, it inhibits the + # generation of the implicit spec, thereby allowing the user to explicitly + # provide a configuration ("spec") to use in a dry-run version of the Service + # Perimeter. This allows the user to test changes to the enforced config + # ("status") without actually enforcing them. This testing is done through + # analyzing the differences between currently enforced and suggested + # restrictions. use_explicit_dry_run_spec must bet set to True if any of the + # fields in the spec are set to non-default values. + class ServicePerimeter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the type of the Perimeter. There are two types: regular and + # bridge. Regular Service Perimeter contains resources, access levels, and + # restricted services. Every resource can be in at most ONE + # regular Service Perimeter. + # + # In addition to being in a regular service perimeter, a resource can also + # be in zero or more perimeter bridges. A perimeter bridge only contains + # resources. Cross project operations are permitted if all effected + # resources share some perimeter (whether bridge or regular). Perimeter + # Bridge does not contain access levels or services: those are governed + # entirely by the regular perimeter that resource is in. + # + # Perimeter Bridges are typically useful when building more complex toplogies + # with many independent perimeters that need to share some data with a common + # perimeter, but should not be able to share data among themselves. + module PerimeterType + # Regular Perimeter. + PERIMETER_TYPE_REGULAR = 0 + + # Perimeter Bridge. + PERIMETER_TYPE_BRIDGE = 1 + end + end + + # `ServicePerimeterConfig` specifies a set of Google Cloud resources that + # describe specific Service Perimeter configuration. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of Google Cloud resources that are inside of the service perimeter. + # Currently only projects are allowed. Format: `projects/{project_number}` + # @!attribute [rw] access_levels + # @return [::Array<::String>] + # A list of `AccessLevel` resource names that allow resources within the + # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed + # must be in the same policy as this `ServicePerimeter`. Referencing a + # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are + # listed, resources within the perimeter can only be accessed via Google + # Cloud calls with request origins within the perimeter. Example: + # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. + # For Service Perimeter Bridge, must be empty. + # @!attribute [rw] restricted_services + # @return [::Array<::String>] + # Google Cloud services that are subject to the Service Perimeter + # restrictions. For example, if `storage.googleapis.com` is specified, access + # to the storage buckets inside the perimeter must meet the perimeter's + # access restrictions. + # @!attribute [rw] vpc_accessible_services + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::VpcAccessibleServices] + # Configuration for APIs allowed within Perimeter. + # @!attribute [rw] ingress_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressPolicy>] + # List of [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply to the perimeter. A perimeter may have multiple [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy], + # each of which is evaluated separately. Access is granted if any [Ingress + # Policy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # grants it. Must be empty for a perimeter bridge. + # @!attribute [rw] egress_policies + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressPolicy>] + # List of [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply to the perimeter. A perimeter may have multiple [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy], + # each of which is evaluated separately. Access is granted if any + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # grants it. Must be empty for a perimeter bridge. + class ServicePerimeterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how APIs are allowed to communicate within the Service + # Perimeter. + # @!attribute [rw] enable_restriction + # @return [::Boolean] + # Whether to restrict API calls within the Service Perimeter to the list of + # APIs specified in 'allowed_services'. + # @!attribute [rw] allowed_services + # @return [::Array<::String>] + # The list of APIs usable within the Service Perimeter. Must be empty + # unless 'enable_restriction' is True. You can specify a list of individual + # services, as well as include the 'RESTRICTED-SERVICES' value, which + # automatically includes all of the services protected by the perimeter. + class VpcAccessibleServices + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An allowed method or permission of a service specified in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # @!attribute [rw] method + # @return [::String] + # Value for `method` should be a valid method name for the corresponding + # `service_name` in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # If `*` used as value for `method`, then ALL methods and permissions are + # allowed. + # + # Note: The following fields are mutually exclusive: `method`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] permission + # @return [::String] + # Value for `permission` should be a valid Cloud IAM permission for the + # corresponding `service_name` in [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. + # + # Note: The following fields are mutually exclusive: `permission`, `method`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MethodSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identification for an API Operation. + # @!attribute [rw] service_name + # @return [::String] + # The name of the API whose methods or permissions the [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # or [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # want to allow. A single [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # with `service_name` field set to `*` will allow all methods AND + # permissions for all services. + # @!attribute [rw] method_selectors + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::MethodSelector>] + # API methods or permissions to allow. Method or permission must belong to + # the service specified by `service_name` field. A single [MethodSelector] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector] + # entry with `*` specified for the `method` field will allow all methods + # AND permissions for the service specified in `service_name`. + class ApiOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The source that [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # authorizes access from. + # @!attribute [rw] access_level + # @return [::String] + # An [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] resource + # name that allow resources within the [ServicePerimeters] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to be + # accessed from the internet. [AccessLevels] + # [google.identity.accesscontextmanager.v1.AccessLevel] listed must + # be in the same policy as this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # Referencing a nonexistent [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] will cause + # an error. If no [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] names are + # listed, resources within the perimeter can only be accessed via Google + # Cloud calls with request origins within the perimeter. Example: + # `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is + # specified for `access_level`, then all [IngressSources] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource] + # will be allowed. + # + # Note: The following fields are mutually exclusive: `access_level`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource + # @return [::String] + # A Google Cloud resource that is allowed to ingress the perimeter. + # Requests from these resources will be allowed to access perimeter data. + # Currently only projects are allowed. + # Format: `projects/{project_number}` + # The project may be in any Google Cloud organization, not just the + # organization that the perimeter is defined in. `*` is not allowed, the + # case of allowing all Google Cloud resources only is not supported. + # + # Note: The following fields are mutually exclusive: `resource`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class IngressSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request. Conditions are based on information about the source of + # the request. The request must satisfy what is defined in `sources` AND + # identity related fields in order to match. + # @!attribute [rw] sources + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressSource>] + # Sources that this [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # authorizes access from. + # @!attribute [rw] identities + # @return [::Array<::String>] + # A list of identities that are allowed access through this ingress + # policy. Should be in the format of email address. The email address + # should represent individual user or service account only. + # @!attribute [rw] identity_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] + # Specifies the type of identities that are allowed access from outside the + # perimeter. If left unspecified, then members of `identities` field will + # be allowed access. + class IngressFrom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request. Conditions are based on information about the + # [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # intended to be performed on the target resource of the request. The request + # must satisfy what is defined in `operations` AND `resources` in order to + # match. + # @!attribute [rw] operations + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] + # A list of [ApiOperations] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # allowed to be performed by the sources specified in corresponding + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] + # in this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of resources, currently only projects in the form + # `projects/`, protected by this [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] that are + # allowed to be accessed by sources defined in the corresponding + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]. + # If a single `*` is specified, then access to all resources inside the + # perimeter are allowed. + class IngressTo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Policy for ingress into [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter]. + # + # [IngressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # match requests based on `ingress_from` and `ingress_to` stanzas. For an + # ingress policy to match, both the `ingress_from` and `ingress_to` stanzas + # must be matched. If an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # matches a request, the request is allowed through the perimeter boundary + # from outside the perimeter. + # + # For example, access from the internet can be allowed either + # based on an [AccessLevel] + # [google.identity.accesscontextmanager.v1.AccessLevel] or, for traffic + # hosted on Google Cloud, the project of the source network. For access from + # private networks, using the project of the hosting network is required. + # + # Individual ingress policies can be limited by restricting which + # services and/or actions they match using the `ingress_to` field. + # @!attribute [rw] ingress_from + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressFrom] + # Defines the conditions on the source of a request causing this + # [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply. + # @!attribute [rw] ingress_to + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressTo] + # Defines the conditions on the [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # and request destination that cause this [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # to apply. + class IngressPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request. Conditions based on information about the source of the + # request. Note that if the destination of the request is also protected by a + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have + # an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # which allows access in order for this request to succeed. + # @!attribute [rw] identities + # @return [::Array<::String>] + # A list of identities that are allowed access through this [EgressPolicy]. + # Should be in the format of email address. The email address should + # represent individual user or service account only. + # @!attribute [rw] identity_type + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] + # Specifies the type of identities that are allowed access to outside the + # perimeter. If left unspecified, then members of `identities` field will + # be allowed access. + class EgressFrom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the conditions under which an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request. Conditions are based on information about the + # [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # intended to be performed on the `resources` specified. Note that if the + # destination of the request is also protected by a [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that + # [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have + # an [IngressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] + # which allows access in order for this request to succeed. The request must + # match `operations` AND `resources` fields in order to be allowed egress out + # of the perimeter. + # @!attribute [rw] resources + # @return [::Array<::String>] + # A list of resources, currently only projects in the form + # `projects/`, that are allowed to be accessed by sources + # defined in the corresponding [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. + # A request matches if it contains a resource in this list. If `*` is + # specified for `resources`, then this [EgressTo] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo] + # rule will authorize access to all resources outside the perimeter. + # @!attribute [rw] operations + # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] + # A list of [ApiOperations] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # allowed to be performed by the sources specified in the corresponding + # [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. + # A request matches if it uses an operation/service in this list. + # @!attribute [rw] external_resources + # @return [::Array<::String>] + # A list of external resources that are allowed to be accessed. Only AWS + # and Azure resources are supported. For Amazon S3, the supported format is + # s3://BUCKET_NAME. For Azure Storage, the supported format is + # azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches + # if it contains an external resource in this list (Example: + # s3://bucket/path). Currently '*' is not allowed. + class EgressTo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Policy for egress from perimeter. + # + # [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # match requests based on `egress_from` and `egress_to` stanzas. For an + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to match, both `egress_from` and `egress_to` stanzas must be matched. If an + # [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # matches a request, the request is allowed to span the [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] boundary. + # For example, an [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # can be used to allow VMs on networks within the [ServicePerimeter] + # [google.identity.accesscontextmanager.v1.ServicePerimeter] to access a + # defined set of projects outside the perimeter in certain contexts (e.g. to + # read data from a Cloud Storage bucket or query against a BigQuery dataset). + # + # [EgressPolicies] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # are concerned with the *resources* that a request relates as well as the + # API services and API actions being used. They do not related to the + # direction of data movement. More detailed documentation for this concept + # can be found in the descriptions of [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] + # and [EgressTo] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo]. + # @!attribute [rw] egress_from + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressFrom] + # Defines conditions on the source of a request causing this [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply. + # @!attribute [rw] egress_to + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressTo] + # Defines the conditions on the [ApiOperation] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] + # and destination resources that cause this [EgressPolicy] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] + # to apply. + class EgressPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the types of identities that are allowed access in either + # [IngressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] + # or [EgressFrom] + # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] + # rules. + module IdentityType + # No blanket identity group specified. + IDENTITY_TYPE_UNSPECIFIED = 0 + + # Authorize access from all identities outside the perimeter. + ANY_IDENTITY = 1 + + # Authorize access from all human users outside the perimeter. + ANY_USER_ACCOUNT = 2 + + # Authorize access from all service accounts outside the perimeter. + ANY_SERVICE_ACCOUNT = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..7c4756c28a3a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-identity-access_context_manager-v1", path: "../" +else + gem "google-identity-access_context_manager-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb new file mode 100644 index 000000000000..8df7e306a7f2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the commit_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters. +# +def commit_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new + + # Call the commit_service_perimeters method. + result = client.commit_service_perimeters request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb new file mode 100644 index 000000000000..7ad25cd17d4d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level. +# +def create_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new + + # Call the create_access_level method. + result = client.create_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb new file mode 100644 index 000000000000..a9f9d7289673 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy. +# +def create_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::AccessPolicy.new + + # Call the create_access_policy method. + result = client.create_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb new file mode 100644 index 000000000000..f1020626f742 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding. +# +def create_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new + + # Call the create_gcp_user_access_binding method. + result = client.create_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb new file mode 100644 index 000000000000..412e217d7849 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the create_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter. +# +def create_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new + + # Call the create_service_perimeter method. + result = client.create_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb new file mode 100644 index 000000000000..00c5232fc6d1 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level. +# +def delete_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new + + # Call the delete_access_level method. + result = client.delete_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb new file mode 100644 index 000000000000..eee4a031ae6e --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy. +# +def delete_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new + + # Call the delete_access_policy method. + result = client.delete_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb new file mode 100644 index 000000000000..dd965cf499c5 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding. +# +def delete_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new + + # Call the delete_gcp_user_access_binding method. + result = client.delete_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb new file mode 100644 index 000000000000..983eda52bacc --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the delete_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter. +# +def delete_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new + + # Call the delete_service_perimeter method. + result = client.delete_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb new file mode 100644 index 000000000000..0597699fa439 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level. +# +def get_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new + + # Call the get_access_level method. + result = client.get_access_level request + + # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb new file mode 100644 index 000000000000..0531cf3580ad --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy. +# +def get_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new + + # Call the get_access_policy method. + result = client.get_access_policy request + + # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb new file mode 100644 index 000000000000..d732c416d5c8 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding. +# +def get_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new + + # Call the get_gcp_user_access_binding method. + result = client.get_gcp_user_access_binding request + + # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb new file mode 100644 index 000000000000..b134f682cf0c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_iam_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb new file mode 100644 index 000000000000..fd5e1db7b14d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the get_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter. +# +def get_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new + + # Call the get_service_perimeter method. + result = client.get_service_perimeter request + + # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb new file mode 100644 index 000000000000..a5bf8a3cae59 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_access_levels call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels. +# +def list_access_levels + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new + + # Call the list_access_levels method. + result = client.list_access_levels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb new file mode 100644 index 000000000000..8244d0f6948b --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_access_policies call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies. +# +def list_access_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new + + # Call the list_access_policies method. + result = client.list_access_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb new file mode 100644 index 000000000000..933198ef288d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings. +# +def list_gcp_user_access_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new + + # Call the list_gcp_user_access_bindings method. + result = client.list_gcp_user_access_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb new file mode 100644 index 000000000000..7e6aab1e29ef --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the list_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters. +# +def list_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new + + # Call the list_service_perimeters method. + result = client.list_service_perimeters request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. + p item + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb new file mode 100644 index 000000000000..8c5a3d228fae --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the replace_access_levels call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels. +# +def replace_access_levels + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new + + # Call the replace_access_levels method. + result = client.replace_access_levels request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb new file mode 100644 index 000000000000..0bb1d425f50d --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the replace_service_perimeters call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters. +# +def replace_service_perimeters + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new + + # Call the replace_service_perimeters method. + result = client.replace_service_perimeters request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb new file mode 100644 index 000000000000..47743b7f9b84 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the set_iam_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb new file mode 100644 index 000000000000..780f1b93ba1a --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the test_iam_permissions call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb new file mode 100644 index 000000000000..0c0f947da7b7 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_access_level call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level. +# +def update_access_level + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new + + # Call the update_access_level method. + result = client.update_access_level request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb new file mode 100644 index 000000000000..a29a2622b29f --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_access_policy call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy. +# +def update_access_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new + + # Call the update_access_policy method. + result = client.update_access_policy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb new file mode 100644 index 000000000000..48d03cc216bc --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_gcp_user_access_binding call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding. +# +def update_gcp_user_access_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new + + # Call the update_gcp_user_access_binding method. + result = client.update_gcp_user_access_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb new file mode 100644 index 000000000000..a751242211b5 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] +require "google/identity/access_context_manager/v1" + +## +# Snippet for the update_service_perimeter call in the AccessContextManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter. +# +def update_service_perimeter + # Create a client object. The client can be reused for multiple calls. + client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new + + # Call the update_service_perimeter method. + result = client.update_service_perimeter request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json new file mode 100644 index 000000000000..f5838dcb8ff7 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json @@ -0,0 +1,1055 @@ +{ + "client_library": { + "name": "google-identity-access_context_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.identity.accesscontextmanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync", + "title": "Snippet for the list_access_policies call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies.", + "file": "access_context_manager/list_access_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_policies", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListAccessPolicies", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessPolicies", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync", + "title": "Snippet for the get_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy.", + "file": "access_context_manager/get_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync", + "title": "Snippet for the create_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy.", + "file": "access_context_manager/create_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync", + "title": "Snippet for the update_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy.", + "file": "access_context_manager/update_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync", + "title": "Snippet for the delete_access_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy.", + "file": "access_context_manager/delete_access_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteAccessPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync", + "title": "Snippet for the list_access_levels call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels.", + "file": "access_context_manager/list_access_levels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_levels", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListAccessLevels", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessLevels", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync", + "title": "Snippet for the get_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level.", + "file": "access_context_manager/get_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::AccessLevel", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync", + "title": "Snippet for the create_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level.", + "file": "access_context_manager/create_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync", + "title": "Snippet for the update_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level.", + "file": "access_context_manager/update_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync", + "title": "Snippet for the delete_access_level call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level.", + "file": "access_context_manager/delete_access_level.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_access_level", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteAccessLevel", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessLevel", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync", + "title": "Snippet for the replace_access_levels call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels.", + "file": "access_context_manager/replace_access_levels.rb", + "language": "RUBY", + "client_method": { + "short_name": "replace_access_levels", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ReplaceAccessLevels", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceAccessLevels", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync", + "title": "Snippet for the list_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters.", + "file": "access_context_manager/list_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync", + "title": "Snippet for the get_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter.", + "file": "access_context_manager/get_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ServicePerimeter", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync", + "title": "Snippet for the create_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter.", + "file": "access_context_manager/create_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync", + "title": "Snippet for the update_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter.", + "file": "access_context_manager/update_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync", + "title": "Snippet for the delete_service_perimeter call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter.", + "file": "access_context_manager/delete_service_perimeter.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_perimeter", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteServicePerimeter", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteServicePerimeter", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync", + "title": "Snippet for the replace_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters.", + "file": "access_context_manager/replace_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "replace_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ReplaceServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync", + "title": "Snippet for the commit_service_perimeters call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters.", + "file": "access_context_manager/commit_service_perimeters.rb", + "language": "RUBY", + "client_method": { + "short_name": "commit_service_perimeters", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CommitServicePerimeters", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CommitServicePerimeters", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync", + "title": "Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings.", + "file": "access_context_manager/list_gcp_user_access_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gcp_user_access_bindings", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "ListGcpUserAccessBindings", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync", + "title": "Snippet for the get_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding.", + "file": "access_context_manager/get_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync", + "title": "Snippet for the create_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding.", + "file": "access_context_manager/create_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "CreateGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync", + "title": "Snippet for the update_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding.", + "file": "access_context_manager/update_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "UpdateGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync", + "title": "Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding.", + "file": "access_context_manager/delete_gcp_user_access_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_gcp_user_access_binding", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "DeleteGcpUserAccessBinding", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy.", + "file": "access_context_manager/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.SetIamPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy.", + "file": "access_context_manager/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetIamPolicy", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the AccessContextManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions.", + "file": "access_context_manager/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "AccessContextManager::Client", + "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.TestIamPermissions", + "service": { + "short_name": "AccessContextManager", + "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" + } + } + }, + "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-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb new file mode 100644 index 000000000000..07584e8a3272 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/accesscontextmanager/v1/access_context_manager_services_pb" +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb new file mode 100644 index 000000000000..d60902c54e76 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_level_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_level_path access_policy: "value0", access_level: "value1" + assert_equal "accessPolicies/value0/accessLevels/value1", path + end + end + + def test_access_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.access_policy_path access_policy: "value0" + assert_equal "accessPolicies/value0", path + end + end + + def test_gcp_user_access_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gcp_user_access_binding_path organization: "value0", gcp_user_access_binding: "value1" + assert_equal "organizations/value0/gcpUserAccessBindings/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_service_perimeter_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_perimeter_path access_policy: "value0", service_perimeter: "value1" + assert_equal "accessPolicies/value0/servicePerimeters/value1", path + end + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb new file mode 100644 index 000000000000..f15c7327d6fe --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb @@ -0,0 +1,1535 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager/rest" + + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new + http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count + end + end + end + + def test_get_access_policy + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_count + end + end + end + + def test_create_access_policy + # Create test objects. + 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" + parent = "hello world" + title = "hello world" + scopes = ["hello world"] + create_time = {} + update_time = {} + etag = "hello world" + + create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_policy_client_stub.call_count + end + end + end + + def test_update_access_policy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + update_mask = {} + + update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_access_policy({ policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_access_policy policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_access_policy({ policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_access_policy_client_stub.call_count + end + end + end + + def test_delete_access_policy + # Create test objects. + 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_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_access_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_access_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_access_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_policy_client_stub.call_count + end + end + end + + def test_list_access_levels + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + list_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_levels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_levels_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_access_levels_client_stub.call_count + end + end + end + + def test_get_access_level + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::AccessLevel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + get_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_access_level({ name: name, access_level_format: access_level_format }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_access_level name: name, access_level_format: access_level_format do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_access_level({ name: name, access_level_format: access_level_format }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_access_level_client_stub.call_count + end + end + end + + def test_create_access_level + # Create test objects. + 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" + access_level = {} + + create_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_access_level({ parent: parent, access_level: access_level }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_access_level parent: parent, access_level: access_level do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_access_level({ parent: parent, access_level: access_level }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_access_level_client_stub.call_count + end + end + end + + def test_update_access_level + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + access_level = {} + update_mask = {} + + update_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_access_level access_level: access_level, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_access_level({ access_level: access_level, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_access_level_client_stub.call_count + end + end + end + + def test_delete_access_level + # Create test objects. + 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_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_level_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_access_level({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_access_level name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_access_level({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_access_level_client_stub.call_count + end + end + end + + def test_replace_access_levels + # Create test objects. + 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" + access_levels = [{}] + etag = "hello world" + + replace_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_access_levels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, replace_access_levels_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, replace_access_levels_client_stub.call_count + end + end + end + + def test_list_service_perimeters + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new + http_response = OpenStruct.new 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_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_count + end + end + end + + def test_get_service_perimeter + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_perimeter({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_perimeter name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_perimeter({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_perimeter_client_stub.call_count + end + end + end + + def test_create_service_perimeter + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeter = {} + + create_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_perimeter_client_stub.call_count + end + end + end + + def test_update_service_perimeter + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_perimeter = {} + update_mask = {} + + update_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_perimeter_client_stub.call_count + end + end + end + + def test_delete_service_perimeter + # Create test objects. + 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_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_service_perimeter_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service_perimeter({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service_perimeter name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_service_perimeter({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_perimeter_client_stub.call_count + end + end + end + + def test_replace_service_perimeters + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeters = [{}] + etag = "hello world" + + replace_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, replace_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, replace_service_perimeters_client_stub.call_count + end + end + end + + def test_commit_service_perimeters + # Create test objects. + 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" + etag = "hello world" + + commit_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_commit_service_perimeters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, commit_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.commit_service_perimeters({ parent: parent, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.commit_service_perimeters parent: parent, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.commit_service_perimeters({ parent: parent, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, commit_service_perimeters_client_stub.call_count + end + end + end + + def test_list_gcp_user_access_bindings + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new + http_response = OpenStruct.new 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_gcp_user_access_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_gcp_user_access_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gcp_user_access_bindings_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_count + end + end + end + + def test_get_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_gcp_user_access_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_gcp_user_access_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_gcp_user_access_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_create_gcp_user_access_binding + # Create test objects. + 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" + gcp_user_access_binding = {} + + create_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_update_gcp_user_access_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcp_user_access_binding = {} + update_mask = {} + + update_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_delete_gcp_user_access_binding + # Create test objects. + 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_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_gcp_user_access_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_gcp_user_access_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_gcp_user_access_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_gcp_user_access_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_gcp_user_access_binding_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb new file mode 100644 index 000000000000..ef2427c12a7c --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb @@ -0,0 +1,1785 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/identity/accesscontextmanager/v1/access_context_manager_pb" +require "google/identity/access_context_manager/v1/access_context_manager" + +class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_policies, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, 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_access_policies_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count + end + end + + def test_get_access_policy + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_access_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_access_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_access_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_policy_client_stub.call_rpc_count + end + end + + def test_create_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + title = "hello world" + scopes = ["hello world"] + create_time = {} + update_time = {} + etag = "hello world" + + create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessPolicy, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["title"] + assert_equal ["hello world"], request["scopes"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["create_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["update_time"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, 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, create_access_policy_client_stub.call_rpc_count + end + end + + def test_update_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy = {} + update_mask = {} + + update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_access_policy({ policy: policy, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_access_policy policy: policy, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_access_policy({ policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy_client_stub.call_rpc_count + end + end + + def test_delete_access_policy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_policy, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_access_policy({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_access_policy name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_access_policy({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy_client_stub.call_rpc_count + end + end + + def test_list_access_levels + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + list_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_levels, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_access_levels_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_access_levels_client_stub.call_rpc_count + end + end + + def test_get_access_level + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::AccessLevel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_level_format = :LEVEL_FORMAT_UNSPECIFIED + + get_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, request + assert_equal "hello world", request["name"] + assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_access_level({ name: name, access_level_format: access_level_format }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_access_level name: name, access_level_format: access_level_format do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_access_level({ name: name, access_level_format: access_level_format }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_access_level_client_stub.call_rpc_count + end + end + + def test_create_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_level = {} + + create_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_access_level({ parent: parent, access_level: access_level }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_access_level parent: parent, access_level: access_level do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_access_level({ parent: parent, access_level: access_level }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), grpc_options) do |response, operation| + assert_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_access_level_client_stub.call_rpc_count + end + end + + def test_update_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + access_level = {} + update_mask = {} + + update_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_access_level access_level: access_level, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_access_level({ access_level: access_level, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level_client_stub.call_rpc_count + end + end + + def test_delete_access_level + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_access_level, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_access_level_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_access_level({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_access_level name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_access_level({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level_client_stub.call_rpc_count + end + end + + def test_replace_access_levels + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + access_levels = [{}] + etag = "hello world" + + replace_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :replace_access_levels, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessLevel, request["access_levels"].first + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, replace_access_levels_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, 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, replace_access_levels_client_stub.call_rpc_count + end + end + + def test_list_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, 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_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_rpc_count + end + end + + def test_get_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_perimeter({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_perimeter name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service_perimeter({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_perimeter_client_stub.call_rpc_count + end + end + + def test_create_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeter = {} + + create_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_perimeter_client_stub.call_rpc_count + end + end + + def test_update_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_perimeter = {} + update_mask = {} + + update_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter_client_stub.call_rpc_count + end + end + + def test_delete_service_perimeter + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_perimeter, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_perimeter_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service_perimeter({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_service_perimeter name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_service_perimeter({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter_client_stub.call_rpc_count + end + end + + def test_replace_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_perimeters = [{}] + etag = "hello world" + + replace_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :replace_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Identity::AccessContextManager::V1::ServicePerimeter, request["service_perimeters"].first + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, replace_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, 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, replace_service_perimeters_client_stub.call_rpc_count + end + end + + def test_commit_service_perimeters + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + etag = "hello world" + + commit_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :commit_service_perimeters, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, commit_service_perimeters_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.commit_service_perimeters({ parent: parent, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.commit_service_perimeters parent: parent, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.commit_service_perimeters({ parent: parent, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, 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, commit_service_perimeters_client_stub.call_rpc_count + end + end + + def test_list_gcp_user_access_bindings + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gcp_user_access_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gcp_user_access_bindings, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, 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_gcp_user_access_bindings_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_rpc_count + end + end + + def test_get_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_gcp_user_access_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_gcp_user_access_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_create_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gcp_user_access_binding = {} + + create_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), grpc_options) do |response, operation| + assert_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_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_update_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcp_user_access_binding = {} + update_mask = {} + + update_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_delete_gcp_user_access_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_gcp_user_access_binding, name + assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_gcp_user_access_binding_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_gcp_user_access_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_gcp_user_access_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json new file mode 100644 index 000000000000..9720ed4289b0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "fleetengine.googleapis.com", + "api_shortname": "fleetengine-delivery", + "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1", + "distribution_name": "google-maps-fleet_engine-delivery-v1", + "is_cloud": false, + "language": "ruby", + "name": "fleetengine-delivery", + "name_pretty": "Last Mile Fleet Solution Delivery V1 API", + "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml new file mode 100644 index 000000000000..5134ed6467fb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts new file mode 100644 index 000000000000..443d62823a66 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Last Mile Fleet Solution Delivery 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-maps-fleet_engine-delivery-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5667ca97e0e4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/maps/fleet_engine/delivery/v1" + +::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md new file mode 100644 index 000000000000..46fddfd91415 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Last Mile Fleet Solution Delivery V1 API + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Last Mile Fleet Solution Delivery V1 API. Most users should consider using +the main client gem, +[google-maps-fleet_engine-delivery](https://rubygems.org/gems/google-maps-fleet_engine-delivery). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-maps-fleet_engine-delivery-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/fleetengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/maps/fleet_engine/delivery/v1" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new +request = ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new # (request fields as keyword arguments...) +response = client.create_delivery_vehicle request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) +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/maps/fleet_engine/delivery/v1" +require "logger" + +client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-maps-fleet_engine-delivery`, +and lower-level _versioned_ client libraries with names such as +`google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery`. +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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile new file mode 100644 index 000000000000..cd9e87b75d54 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1/delivery_service/credentials" + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-maps-fleet_engine-delivery-v1" + header "google-maps-fleet_engine-delivery-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-maps-fleet_engine-delivery-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json new file mode 100644 index 000000000000..4c69a9a6c497 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "maps.fleetengine.delivery.v1", + "libraryPackage": "::Google::Maps::FleetEngine::Delivery::V1", + "services": { + "DeliveryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client", + "rpcs": { + "CreateDeliveryVehicle": { + "methods": [ + "create_delivery_vehicle" + ] + }, + "GetDeliveryVehicle": { + "methods": [ + "get_delivery_vehicle" + ] + }, + "DeleteDeliveryVehicle": { + "methods": [ + "delete_delivery_vehicle" + ] + }, + "UpdateDeliveryVehicle": { + "methods": [ + "update_delivery_vehicle" + ] + }, + "BatchCreateTasks": { + "methods": [ + "batch_create_tasks" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "UpdateTask": { + "methods": [ + "update_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTaskTrackingInfo": { + "methods": [ + "get_task_tracking_info" + ] + }, + "ListDeliveryVehicles": { + "methods": [ + "list_delivery_vehicles" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec new file mode 100644 index 000000000000..7e1c51590eb3 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/maps/fleet_engine/delivery/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-maps-fleet_engine-delivery-v1" + gem.version = Google::Maps::FleetEngine::Delivery::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details." + gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb new file mode 100644 index 000000000000..cd1ad7559d55 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb new file mode 100644 index 000000000000..bf548f559e81 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service" +require "google/maps/fleet_engine/delivery/v1/version" + +module Google + module Maps + module FleetEngine + module Delivery + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/maps/fleet_engine/delivery/v1" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/maps/fleet_engine/delivery/v1" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/maps/fleet_engine/delivery/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb new file mode 100644 index 000000000000..3f52ddd3345e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" + +require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" +require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" +require "google/maps/fleet_engine/delivery/v1/delivery_service/client" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + ## + # The Last Mile Delivery service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module DeliveryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "delivery_service", "helpers.rb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb new file mode 100644 index 000000000000..57a447f2b08f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb @@ -0,0 +1,1757 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + ## + # Client for the DeliveryService service. + # + # The Last Mile Delivery service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :delivery_service_stub + + ## + # Configure the DeliveryService Client class. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeliveryService clients + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 + default_config.rpcs.create_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_delivery_vehicle.timeout = 60.0 + default_config.rpcs.get_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_delivery_vehicle.timeout = 60.0 + default_config.rpcs.update_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_create_tasks.timeout = 60.0 + default_config.rpcs.batch_create_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + default_config.rpcs.create_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_task.timeout = 60.0 + default_config.rpcs.update_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task_tracking_info.timeout = 60.0 + default_config.rpcs.get_task_tracking_info.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_delivery_vehicles.timeout = 60.0 + default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @delivery_service_stub.universe_domain + end + + ## + # Create a new DeliveryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeliveryService 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/maps/fleetengine/delivery/v1/delivery_api_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 + + @delivery_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @delivery_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 + @delivery_service_stub.logger + end + + # Service calls + + ## + # Creates and returns a new `DeliveryVehicle`. + # + # @overload create_delivery_vehicle(request, options = nil) + # Pass arguments to `create_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) + # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param delivery_vehicle_id [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + # + # # Call the create_delivery_vehicle method. + # result = client.create_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def create_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :create_delivery_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `DeliveryVehicle` instance. + # + # @overload get_delivery_vehicle(request, options = nil) + # Pass arguments to `get_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + # + # # Call the get_delivery_vehicle method. + # result = client.get_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def get_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :get_delivery_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DeliveryVehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks + # assigned to it. + # + # @overload delete_delivery_vehicle(request, options = nil) + # Pass arguments to `delete_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + # + # # Call the delete_delivery_vehicle method. + # result = client.delete_delivery_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :delete_delivery_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, + # but it must contain all of the `VehicleJourneySegment`s to be persisted on + # the `DeliveryVehicle`. The `task_id`s are retrieved from + # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + # assigned to the `DeliveryVehicle` if they have not yet been assigned. + # + # @overload update_delivery_vehicle(request, options = nil) + # Pass arguments to `update_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) + # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + # + # # Call the update_delivery_vehicle method. + # result = client.update_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def update_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.delivery_vehicle&.name && + %r{^providers/[^/]+/?$}.match?(request.delivery_vehicle.name) + header_params["provider_id"] = request.delivery_vehicle.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :update_delivery_vehicle, request, 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 and returns a batch of new `Task` objects. + # + # @overload batch_create_tasks(request, options = nil) + # Pass arguments to `batch_create_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) + # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param parent [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + # + # # Call the batch_create_tasks method. + # result = client.batch_create_tasks request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + # p result + # + def batch_create_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :batch_create_tasks, request, 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 and returns a new `Task` object. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param task_id [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :create_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a `Task`. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(header: nil, name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Task. + # + # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a + # DeliveryVehicle. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(header: nil, name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :delete_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates `Task` data. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_task(header: nil, task: nil, update_mask: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.task&.name && + %r{^providers/[^/]+/?$}.match?(request.task.name) + header_params["provider_id"] = request.task.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :update_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all `Task`s that meet the specified filtering criteria. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `TaskTrackingInfo` instance. + # + # @overload get_task_tracking_info(request, options = nil) + # Pass arguments to `get_task_tracking_info` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task_tracking_info(header: nil, name: nil) + # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + # + # # Call the get_task_tracking_info method. + # result = client.get_task_tracking_info request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + # p result + # + def get_task_tracking_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task_tracking_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task_tracking_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :get_task_tracking_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + # + # @overload list_delivery_vehicles(request, options = nil) + # Pass arguments to `list_delivery_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) + # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + # + # # Call the list_delivery_vehicles method. + # result = client.list_delivery_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p item + # end + # + def list_delivery_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.call_rpc :list_delivery_vehicles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, request, response, 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 DeliveryService API. + # + # This class represents the configuration for DeliveryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_delivery_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DeliveryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_delivery_vehicle + ## + # RPC-specific configuration for `get_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_delivery_vehicle + ## + # RPC-specific configuration for `delete_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_delivery_vehicle + ## + # RPC-specific configuration for `update_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_delivery_vehicle + ## + # RPC-specific configuration for `batch_create_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_tasks + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task_tracking_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task_tracking_info + ## + # RPC-specific configuration for `list_delivery_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_delivery_vehicles + + # @private + def initialize parent_rpcs = nil + create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle + @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config + get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle + @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config + delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle + @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config + update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle + @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config + batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks + @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info + @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config + list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles + @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb new file mode 100644 index 000000000000..8665c263a506 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + # Credentials for the DeliveryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb new file mode 100644 index 000000000000..dddaace08010 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + # Path helper methods for the DeliveryService API. + module Paths + ## + # Create a fully-qualified DeliveryVehicle resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/deliveryVehicles/{vehicle}` + # + # @param provider [String] + # @param vehicle [String] + # + # @return [::String] + def delivery_vehicle_path provider:, vehicle: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/deliveryVehicles/#{vehicle}" + end + + ## + # Create a fully-qualified Provider resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}` + # + # @param provider [String] + # + # @return [::String] + def provider_path provider: + "providers/#{provider}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/tasks/{task}` + # + # @param provider [String] + # @param task [String] + # + # @return [::String] + def task_path provider:, task: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/tasks/#{task}" + end + + ## + # Create a fully-qualified TaskTrackingInfo resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/taskTrackingInfo/{tracking}` + # + # @param provider [String] + # @param tracking [String] + # + # @return [::String] + def task_tracking_info_path provider:, tracking: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/taskTrackingInfo/#{tracking}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb new file mode 100644 index 000000000000..c3e0d58b6ef6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" + +require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" +require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/client" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + ## + # The Last Mile Delivery service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module DeliveryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb new file mode 100644 index 000000000000..3d36d73469a4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb @@ -0,0 +1,1618 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + module Rest + ## + # REST client for the DeliveryService service. + # + # The Last Mile Delivery service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :delivery_service_stub + + ## + # Configure the DeliveryService Client class. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeliveryService clients + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 + default_config.rpcs.create_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_delivery_vehicle.timeout = 60.0 + default_config.rpcs.get_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_delivery_vehicle.timeout = 60.0 + default_config.rpcs.update_delivery_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_create_tasks.timeout = 60.0 + default_config.rpcs.batch_create_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + default_config.rpcs.create_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_task.timeout = 60.0 + default_config.rpcs.update_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task_tracking_info.timeout = 60.0 + default_config.rpcs.get_task_tracking_info.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_delivery_vehicles.timeout = 60.0 + default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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 + @delivery_service_stub.universe_domain + end + + ## + # Create a new DeliveryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeliveryService 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 + + @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @delivery_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 + @delivery_service_stub.logger + end + + # Service calls + + ## + # Creates and returns a new `DeliveryVehicle`. + # + # @overload create_delivery_vehicle(request, options = nil) + # Pass arguments to `create_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) + # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param delivery_vehicle_id [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + # + # # Call the create_delivery_vehicle method. + # result = client.create_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def create_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest + + # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.create_delivery_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `DeliveryVehicle` instance. + # + # @overload get_delivery_vehicle(request, options = nil) + # Pass arguments to `get_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + # + # # Call the get_delivery_vehicle method. + # result = client.get_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def get_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.get_delivery_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DeliveryVehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks + # assigned to it. + # + # @overload delete_delivery_vehicle(request, options = nil) + # Pass arguments to `delete_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_delivery_vehicle(header: nil, name: nil) + # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + # + # # Call the delete_delivery_vehicle method. + # result = client.delete_delivery_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.delete_delivery_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, + # but it must contain all of the `VehicleJourneySegment`s to be persisted on + # the `DeliveryVehicle`. The `task_id`s are retrieved from + # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + # assigned to the `DeliveryVehicle` if they have not yet been assigned. + # + # @overload update_delivery_vehicle(request, options = nil) + # Pass arguments to `update_delivery_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) + # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + # + # # Call the update_delivery_vehicle method. + # result = client.update_delivery_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p result + # + def update_delivery_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.update_delivery_vehicle request, 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 and returns a batch of new `Task` objects. + # + # @overload batch_create_tasks(request, options = nil) + # Pass arguments to `batch_create_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) + # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param parent [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + # + # # Call the batch_create_tasks method. + # result = client.batch_create_tasks request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + # p result + # + def batch_create_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_create_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.batch_create_tasks request, 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 and returns a new `Task` object. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @param task_id [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest + + # Converts hash and nil to an 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_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.create_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a `Task`. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(header: nil, name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Task. + # + # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a + # DeliveryVehicle. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(header: nil, name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.delete_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates `Task` data. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_task(header: nil, task: nil, update_mask: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + # p result + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.update_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all `Task`s that meet the specified filtering criteria. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified `TaskTrackingInfo` instance. + # + # @overload get_task_tracking_info(request, options = nil) + # Pass arguments to `get_task_tracking_info` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task_tracking_info(header: nil, name: nil) + # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + # + # # Call the get_task_tracking_info method. + # result = client.get_task_tracking_info request + # + # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + # p result + # + def get_task_tracking_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task_tracking_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task_tracking_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.get_task_tracking_info request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + # + # @overload list_delivery_vehicles(request, options = nil) + # Pass arguments to `list_delivery_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) + # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] + # Optional. The standard Delivery API request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @param page_size [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/delivery/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + # + # # Call the list_delivery_vehicles method. + # result = client.list_delivery_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + # p item + # end + # + def list_delivery_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @delivery_service_stub.list_delivery_vehicles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, 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 DeliveryService REST API. + # + # This class represents the configuration for DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_delivery_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 DeliveryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_delivery_vehicle + ## + # RPC-specific configuration for `get_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_delivery_vehicle + ## + # RPC-specific configuration for `delete_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_delivery_vehicle + ## + # RPC-specific configuration for `update_delivery_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_delivery_vehicle + ## + # RPC-specific configuration for `batch_create_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_tasks + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task_tracking_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task_tracking_info + ## + # RPC-specific configuration for `list_delivery_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_delivery_vehicles + + # @private + def initialize parent_rpcs = nil + create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle + @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config + get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle + @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config + delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle + @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config + update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle + @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config + batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks + @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info + @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config + list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles + @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb new file mode 100644 index 000000000000..b1a86959625c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb @@ -0,0 +1,820 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + module DeliveryService + module Rest + ## + # REST service stub for the DeliveryService 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_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def create_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def get_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # A result object deserialized from the server's reply + def update_delivery_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_delivery_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] + # A result object deserialized from the server's reply + def batch_create_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.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_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # A result object deserialized from the server's reply + def update_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task_tracking_info REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] + # A result object deserialized from the server's reply + def get_task_tracking_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task_tracking_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_delivery_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] + # A result object deserialized from the server's reply + def list_delivery_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_delivery_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.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_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] + # 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_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/deliveryVehicles", + body: "delivery_vehicle", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_delivery_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_delivery_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{delivery_vehicle.name}", + body: "delivery_vehicle", + matches: [ + ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_create_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks:batchCreate", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] + # 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_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks", + body: "task", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_task REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{task.name}", + body: "task", + matches: [ + ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task_tracking_info REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_tracking_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_delivery_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_delivery_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deliveryVehicles", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb new file mode 100644 index 000000000000..8bc23bd54948 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" +require "google/maps/fleet_engine/delivery/v1/version" + +module Google + module Maps + module FleetEngine + module Delivery + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/maps/fleet_engine/delivery/v1/rest" + # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb new file mode 100644 index 000000000000..5376e1dc941f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb new file mode 100644 index 000000000000..192798ce9466 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryVehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleAttribute").msgclass + DeliveryVehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocation").msgclass + TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TimeWindow").msgclass + TaskAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TaskAttribute").msgclass + DeliveryVehicleLocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor").enummodule + DeliveryVehicleNavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb new file mode 100644 index 000000000000..1d269d5162eb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/delivery_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/geo/type/viewport_pb' +require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' +require 'google/maps/fleetengine/delivery/v1/header_pb' +require 'google/maps/fleetengine/delivery/v1/task_tracking_info_pb' +require 'google/maps/fleetengine/delivery/v1/tasks_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n6google/maps/fleetengine/delivery/v1/delivery_api.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto\x1a\x30google/maps/fleetengine/delivery/v1/header.proto\x1a\n\x19remaining_distance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\x12remaining_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12_\n\"remaining_vehicle_journey_segments\x18\x08 \x03(\x0b\x32\x33.maps.fleetengine.delivery.v1.VehicleJourneySegment\x12J\n\nattributes\x18\t \x03(\x0b\x32\x36.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute\x12O\n\x04type\x18\n \x01(\x0e\x32\x41.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType\"t\n\x13\x44\x65liveryVehicleType\x12%\n!DELIVERY_VEHICLE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0f\n\x0bTWO_WHEELER\x10\x02\x12\x0b\n\x07\x42ICYCLE\x10\x03\x12\x0e\n\nPEDESTRIAN\x10\x04:`\xea\x41]\n*fleetengine.googleapis.com/DeliveryVehicle\x12/providers/{provider}/deliveryVehicles/{vehicle}\"2\n\x0cLocationInfo\x12\"\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"\xf5\x01\n\x15VehicleJourneySegment\x12\x37\n\x04stop\x18\x01 \x01(\x0b\x32).maps.fleetengine.delivery.v1.VehicleStop\x12\x41\n\x17\x64riving_distance_meters\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12\x38\n\x10\x64riving_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12&\n\x04path\x18\x05 \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\"\xbe\x03\n\x0bVehicleStop\x12I\n\x10planned_location\x18\x01 \x01(\x0b\x32*.maps.fleetengine.delivery.v1.LocationInfoB\x03\xe0\x41\x02\x12\x41\n\x05tasks\x18\x02 \x03(\x0b\x32\x32.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.maps.fleetengine.delivery.v1.VehicleStop.State\x1a\x9d\x01\n\x08TaskInfo\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x35\n\rtask_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x12target_time_window\x18\x03 \x01(\x0b\x32(.maps.fleetengine.delivery.v1.TimeWindowB\x03\xe0\x41\x03\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07\x45NROUTE\x10\x02\x12\x0b\n\x07\x41RRIVED\x10\x03\x42\x85\x02\n\'com.google.maps.fleetengine.delivery.v1B\x10\x44\x65liveryVehiclesP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryVehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle").msgclass + DeliveryVehicle::DeliveryVehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType").enummodule + LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.LocationInfo").msgclass + VehicleJourneySegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleJourneySegment").msgclass + VehicleStop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop").msgclass + VehicleStop::TaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.TaskInfo").msgclass + VehicleStop::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.State").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb new file mode 100644 index 000000000000..1e64318e1070 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/header.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n0google/maps/fleetengine/delivery/v1/header.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb0\x04\n\x15\x44\x65liveryRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12M\n\x08sdk_type\x18\x06 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12N\n\x08platform\x18\t \x01(\x0e\x32<.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xfc\x01\n\'com.google.maps.fleetengine.delivery.v1B\x07HeadersP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + DeliveryRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader").msgclass + DeliveryRequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType").enummodule + DeliveryRequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb new file mode 100644 index 000000000000..b483e697d6e9 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/delivery/v1/common_pb' +require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' +require 'google/maps/fleetengine/delivery/v1/tasks_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb new file mode 100644 index 000000000000..f387552a7073 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Geo + module Type + # A latitude-longitude viewport, represented as two diagonally opposite `low` + # and `high` points. A viewport is considered a closed region, i.e. it includes + # its boundary. The latitude bounds must range between -90 to 90 degrees + # inclusive, and the longitude bounds must range between -180 to 180 degrees + # inclusive. Various cases include: + # + # - If `low` = `high`, the viewport consists of that single point. + # + # - If `low.longitude` > `high.longitude`, the longitude range is inverted + # (the viewport crosses the 180 degree longitude line). + # + # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, + # the viewport includes all longitudes. + # + # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, + # the longitude range is empty. + # + # - If `low.latitude` > `high.latitude`, the latitude range is empty. + # + # Both `low` and `high` must be populated, and the represented box cannot be + # empty (as specified by the definitions above). An empty viewport will result + # in an error. + # + # For example, this viewport fully encloses New York City: + # + # { + # "low": { + # "latitude": 40.477398, + # "longitude": -74.259087 + # }, + # "high": { + # "latitude": 40.91618, + # "longitude": -73.70018 + # } + # } + # @!attribute [rw] low + # @return [::Google::Type::LatLng] + # Required. The low point of the viewport. + # @!attribute [rw] high + # @return [::Google::Type::LatLng] + # Required. The high point of the viewport. + class Viewport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb new file mode 100644 index 000000000000..1feab364a2dd --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # Describes a vehicle attribute as a key-value pair. The "key:value" string + # length cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. + # @!attribute [rw] value + # @return [::String] + # The attribute's value. + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: This is identical to the `value` field which will eventually be + # deprecated. For create or update methods, either field can be used, but + # it's strongly recommended to use `string_value`. If both `string_value` + # and `value` are set, they must be identical or an error will be thrown. + # Both fields are populated in responses. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DeliveryVehicleAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location, speed, and heading of a vehicle at a point in time. + # @!attribute [rw] location + # @return [::Google::Type::LatLng] + # The location of the vehicle. + # When it is sent to Fleet Engine, the vehicle's location is a GPS location. + # When you receive it in a response, the vehicle's location can be either a + # GPS location, a supplemental location, or some other estimated location. + # The source is specified in `location_sensor`. + # @!attribute [rw] horizontal_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `latlng_accuracy` instead. + # @!attribute [rw] latlng_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `location` in meters as a radius. + # @!attribute [rw] heading + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees. 0 represents North. + # The valid range is [0,360). + # @!attribute [rw] bearing_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `heading_accuracy` instead. + # @!attribute [rw] heading_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `heading` in degrees. + # @!attribute [rw] altitude + # @return [::Google::Protobuf::DoubleValue] + # Altitude in meters above WGS84. + # @!attribute [rw] vertical_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `altitude_accuracy` instead. + # @!attribute [rw] altitude_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `altitude` in meters. + # @!attribute [rw] speed_kmph + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Speed of the vehicle in kilometers per hour. + # Deprecated: Use `speed` instead. + # @!attribute [rw] speed + # @return [::Google::Protobuf::DoubleValue] + # Speed of the vehicle in meters/second + # @!attribute [rw] speed_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `speed` in meters/second. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when `location` was reported by the sensor according to the + # sensor's clock. + # @!attribute [r] server_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the server received the location information. + # @!attribute [rw] location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Provider of location data (for example, `GPS`). + # @!attribute [rw] is_road_snapped + # @return [::Google::Protobuf::BoolValue] + # Whether `location` is snapped to a road. + # @!attribute [rw] is_gps_sensor_enabled + # @return [::Google::Protobuf::BoolValue] + # Input only. Indicates whether the GPS sensor is enabled on the mobile + # device. + # @!attribute [rw] time_since_update + # @return [::Google::Protobuf::Int32Value] + # Input only. Time (in seconds) since this location was first sent to the + # server. This will be zero for the first update. If the time is unknown (for + # example, when the app restarts), this value resets to zero. + # @!attribute [rw] num_stale_updates + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Input only. Deprecated: Other signals are now used to determine if a + # location is stale. + # @!attribute [rw] raw_location + # @return [::Google::Type::LatLng] + # Raw vehicle location (unprocessed by road-snapper). + # @!attribute [rw] raw_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the raw location. + # @!attribute [rw] raw_location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Source of the raw location. Defaults to `GPS`. + # @!attribute [rw] raw_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of the `flp_location` + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). + # @!attribute [rw] supplemental_location + # @return [::Google::Type::LatLng] + # Supplemental location provided by the integrating app. + # @!attribute [rw] supplemental_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the supplemental location. + # @!attribute [rw] supplemental_location_sensor + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] + # Source of the supplemental location. Defaults to + # `CUSTOMER_SUPPLIED_LOCATION`. + # @!attribute [rw] supplemental_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `supplemental_location` as a radius, in meters. + # @!attribute [rw] road_snapped + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: Use `is_road_snapped` instead. + class DeliveryVehicleLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A time range. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The start time of the time window (inclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end time of the time window (inclusive). + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a task attribute as a key-value pair. The "key:value" string length + # cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TaskAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The sensor or methodology used to determine the location. + module DeliveryVehicleLocationSensor + # The sensor is unspecified or unknown. + UNKNOWN_SENSOR = 0 + + # GPS or Assisted GPS. + GPS = 1 + + # Assisted GPS, cell tower ID, or WiFi access point. + NETWORK = 2 + + # Cell tower ID or WiFi access point. + PASSIVE = 3 + + # A location determined by the mobile device to be the most likely + # road position. + ROAD_SNAPPED_LOCATION_PROVIDER = 4 + + # A customer-supplied location from an independent source. Typically, this + # value is used for a location provided from sources other than the mobile + # device running Driver SDK. If the original source is described by one of + # the other enum values, use that value. Locations marked + # CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's + # `last_location.supplemental_location_sensor`. + CUSTOMER_SUPPLIED_LOCATION = 5 + + # A location calculated by Fleet Engine based on the signals available to it. + # Output only. This value will be rejected if it is received in a request. + FLEET_ENGINE_LOCATION = 6 + + # Android's Fused Location Provider. + FUSED_LOCATION_PROVIDER = 100 + + # The location provider on Apple operating systems. + CORE_LOCATION = 200 + end + + # The vehicle's navigation status. + module DeliveryVehicleNavigationStatus + # Unspecified navigation status. + UNKNOWN_NAVIGATION_STATUS = 0 + + # The Driver app's navigation is in `FREE_NAV` mode. + NO_GUIDANCE = 1 + + # Turn-by-turn navigation is available and the Driver app navigation has + # entered `GUIDED_NAV` mode. + ENROUTE_TO_DESTINATION = 2 + + # The vehicle has gone off the suggested route. + OFF_ROUTE = 3 + + # The vehicle is within approximately 50m of the destination. + ARRIVED_AT_DESTINATION = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb new file mode 100644 index 000000000000..8c9bb733f9ef --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb @@ -0,0 +1,395 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `CreateDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. The provider must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @!attribute [rw] delivery_vehicle_id + # @return [::String] + # Required. The Delivery Vehicle ID must be unique and subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] delivery_vehicle + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # Required. The `DeliveryVehicle` entity to create. When creating a new + # delivery vehicle, you may set the following optional fields: + # + # * type + # * last_location + # * attributes + # + # Note: The DeliveryVehicle's `name` field is ignored. All other + # DeliveryVehicle fields must not be set; otherwise, an error is returned. + class CreateDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class GetDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteDeliveryVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class DeleteDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListDeliveryVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. + # For example, `sample-cloud-project`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of vehicles to return. The service may return + # fewer than this number. If you don't specify this number, then the server + # determines the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeliveryVehicles` + # call. You must provide this in order to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeliveryVehicles` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing delivery vehicles. See + # http://aip.dev/160 for examples of the filter syntax. If you don't specify + # a value, or if you specify an empty string for the filter, then all + # delivery vehicles are returned. + # + # Note that the only queries supported for `ListDeliveryVehicles` are + # on vehicle attributes (for example, `attributes. = ` or + # `attributes. = AND attributes. = `). Also, all + # attributes are stored as strings, so the only supported comparisons against + # attributes are string comparisons. In order to compare against number or + # boolean values, the values must be explicitly quoted to be treated as + # strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # The maximum number of restrictions allowed in a filter query is 50. A + # restriction is a part of the query of the form + # `attribute. `, for example `attributes.foo = bar` + # is 1 restriction. + # @!attribute [rw] viewport + # @return [::Google::Geo::Type::Viewport] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + class ListDeliveryVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListDeliveryVehicles` response message. + # @!attribute [rw] delivery_vehicles + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] + # The set of delivery vehicles that meet the requested filtering criteria. + # When no filter is specified, the request returns all delivery vehicles. A + # successful response can also be empty. An empty response indicates that no + # delivery vehicles were found meeting the requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + # list results. When all of the results are returned, this field won't be in + # the response, or it will be an empty string. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of delivery vehicles that match the request criteria, + # across all pages. + class ListDeliveryVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `UpdateDeliveryVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] delivery_vehicle + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] + # Required. The `DeliveryVehicle` entity update to apply. + # Note: You cannot update the name of the `DeliveryVehicle`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A field mask that indicates which `DeliveryVehicle` fields to + # update. Note that the update_mask must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"remaining_vehicle_journey_segments"`. + class UpdateDeliveryVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `BatchCreateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # Note: If you set this field, then the header field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource shared by all tasks. This value must be in + # the format `providers/{provider}`. The `provider` must be the Google Cloud + # Project ID. For example, `sample-cloud-project`. The parent field in the + # `CreateTaskRequest` messages must either be empty, or it must match this + # field. + # @!attribute [rw] requests + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest>] + # Required. The request message that specifies the resources to create. + # Note: You can create a maximum of 500 tasks in a batch. + class BatchCreateTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `BatchCreateTask` response message. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # The created Tasks. + class BatchCreateTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `CreateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. The `provider` must + # be the Google Cloud Project ID. For example, `sample-cloud-project`. + # @!attribute [rw] task_id + # @return [::String] + # Required. The Task ID must be unique, but it should be not a shipment + # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + # Note that multiple tasks can have the same `tracking_id`. Task IDs are + # subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] task + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # Required. The Task entity to create. + # When creating a Task, the following fields are required: + # + # * `type` + # * `state` (must be set to `OPEN`) + # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + # tasks, but required for all other task types) + # * `planned_location` (optional for `UNAVAILABLE` tasks) + # * `task_duration` + # + # The following fields can be optionally set: + # + # * `target_time_window` + # * `task_tracking_view_config` + # * `attributes` + # + # Note: The Task's `name` field is ignored. All other Task fields must not be + # set; otherwise, an error is returned. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteTask request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/tasks/{task}`. The + # `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `UpdateTask` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] task + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] + # Required. The Task associated with the update. + # The following fields are maintained by Fleet Engine. Do not update + # them using `Task.update`. + # + # * `last_location`. + # * `last_location_snappable`. + # * `name`. + # * `remaining_vehicle_journey_segments`. + # * `task_outcome_location_source`. + # + # Note: You cannot change the value of `task_outcome` once you set it. + # + # If the Task has been assigned to a delivery vehicle, then don't set the + # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + # that contains the Task from the delivery vehicle, which automatically sets + # the Task state to CLOSED. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The field mask that indicates which Task fields to update. + # Note: The `update_mask` must contain at least one field. + # + # This is a comma-separated list of fully qualified names of fields. Example: + # `"task_outcome,task_outcome_time,task_outcome_location"`. + class UpdateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListTasks` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The `provider` must be the Google Cloud Project ID. For example, + # `sample-cloud-project`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Tasks to return. The service may return + # fewer than this value. If you don't specify this value, then the server + # determines the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token received from a previous `ListTasks` call. + # You can provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTasks` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing Tasks. See + # http://aip.dev/160 for examples of filter syntax. If you don't specify a + # value, or if you filter on an empty string, then all Tasks are returned. + # For information about the Task properties that you can filter on, see [List + # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ListTasks` response that contains the set of Tasks that meet the filter + # criteria in the `ListTasksRequest`. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] + # The set of Tasks that meet the requested filtering criteria. When no filter + # is specified, the request returns all tasks. A successful response can also + # be empty. An empty response indicates that no Tasks were found meeting the + # requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token in the `ListTasksRequest` to continue to list results. + # If all results have been returned, then this field is either an empty + # string, or it doesn't appear in the response. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of Tasks that match the request criteria, across all + # pages. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `GetTaskTrackingInfoRequest` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] + # Optional. The standard Delivery API request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + # must be the Google Cloud Project ID, and the `tracking_id` must be the + # tracking ID associated with the task. An example name can be + # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + class GetTaskTrackingInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb new file mode 100644 index 000000000000..815ff7ffd128 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `DeliveryVehicle` message. A delivery vehicle transports shipments from a + # depot to a delivery location, and from a pickup location to the depot. In + # some cases, delivery vehicles also transport shipments directly from the + # pickup location to the delivery location. + # + # Note: gRPC and REST APIs use different field naming conventions. For example, + # the `DeliveryVehicle.current_route_segment` field in the gRPC API and the + # `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same + # field. + # @!attribute [rw] name + # @return [::String] + # The unique name of this Delivery Vehicle. + # The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # The last reported location of the Delivery Vehicle. + # @!attribute [rw] past_locations + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation>] + # Input only. Locations where this Delivery Vehicle has been in the past that + # haven't yet been reported to Fleet Engine. This is used in + # `UpdateDeliveryVehicleRequest` to record locations which were previously + # unable to be sent to the server. Typically this happens when the Delivery + # Vehicle does not have internet connectivity. + # @!attribute [rw] navigation_status + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleNavigationStatus] + # The Delivery Vehicle's navigation status. + # @!attribute [rw] current_route_segment + # @return [::String] + # The encoded polyline specifying the route that the navigation recommends + # taking to the next waypoint. Your driver app updates this when a + # stop is reached or passed, and when the navigation reroutes. These + # `LatLng`s are returned in + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST) for all active Tasks assigned to the Vehicle. + # + # There are a few cases where this field might not be used to populate + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST): + # + # * The endpoint of the `current_route_segment` does not match + # `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + # `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + # + # * The driver app has not updated its location recently, so the last + # updated value for this field might be stale. + # + # * The driver app has recently updated its location, but the + # `current_route_segment` is stale, and points to a previous vehicle stop. + # + # In these cases, Fleet Engine populates this field with a route from the + # most recently passed VehicleStop to the upcoming VehicleStop to ensure that + # the consumer of this field has the best available information on the + # current path of the Delivery Vehicle. + # @!attribute [rw] current_route_segment_end_point + # @return [::Google::Type::LatLng] + # The location where the `current_route_segment` ends. This is not currently + # populated by the driver app, but you can supply it on + # `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + # vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + # Engine will then do its best to interpolate to an actual `VehicleStop`. + # + # This field is ignored in `UpdateDeliveryVehicle` calls if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The remaining driving distance for the `current_route_segment`. + # The Driver app typically provides this field, but there are some + # circumstances in which Fleet Engine will override the value sent by the + # app. For more information, see + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # This field is returned in + # `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + # or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + # for all active `Task`s assigned to the Delivery Vehicle. + # + # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_duration + # @return [::Google::Protobuf::Duration] + # The remaining driving time for the `current_route_segment`. + # The Driver app typically provides this field, but there are some + # circumstances in which Fleet Engine will override the value sent by the + # app. For more information, see + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # This field is returned in + # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + # active tasks assigned to the Delivery Vehicle. + # + # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + # `current_route_segment` field is empty. + # @!attribute [rw] remaining_vehicle_journey_segments + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] + # The journey segments assigned to this Delivery Vehicle, starting from the + # Vehicle's most recently reported location. This field won't be populated + # in the response of `ListDeliveryVehicles`. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleAttribute>] + # A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + # at most 100 attributes, and each attribute must have a unique key. + # @!attribute [rw] type + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle::DeliveryVehicleType] + # The type of this delivery vehicle. If unset, this will default to `AUTO`. + class DeliveryVehicle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of delivery vehicle. + module DeliveryVehicleType + # The value is unused. + DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0 + + # An automobile. + AUTO = 1 + + # A motorcycle, moped, or other two-wheeled vehicle + TWO_WHEELER = 2 + + # Human-powered transport. + BICYCLE = 3 + + # A human transporter, typically walking or running, traveling along + # pedestrian pathways. + PEDESTRIAN = 4 + end + end + + # A location with any additional identifiers. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # The location's coordinates. + class LocationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Vehicle’s travel segment - from its previous stop to the + # current stop. If it is the first active stop, then it is from the + # Vehicle’s current location to this stop. + # @!attribute [rw] stop + # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop] + # Specifies the stop location, along with the `Task`s associated with + # the stop. Some fields of the VehicleStop might not be present if this + # journey segment is part of `JourneySharingInfo`. + # @!attribute [r] driving_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Output only. The travel distance from the previous stop to this stop. + # If the current stop is the first stop in the list of journey + # segments, then the starting point is the vehicle's location recorded + # at the time that this stop was added to the list. This field might not be + # present if this journey segment is part of `JourneySharingInfo`. + # @!attribute [r] driving_duration + # @return [::Google::Protobuf::Duration] + # Output only. The travel time from the previous stop to this stop. + # If the current stop is the first stop in the list of journey + # segments, then the starting point is the Vehicle's location recorded + # at the time that this stop was added to the list. + # + # If this field is defined in the path + # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + # then it may be populated with the value from + # `DeliveryVehicle.remaining_duration` (gRPC) or + # `DeliveryVehicle.remainingDuration` (REST). + # This provides the remaining driving duration from the driver app's latest + # known location rather than the driving time from the previous stop. + # @!attribute [r] path + # @return [::Array<::Google::Type::LatLng>] + # Output only. The path from the previous stop to this stop. If the current + # stop is the first stop in the list of journey segments, then this is the + # path from the vehicle's current location to this stop at the time that the + # stop was added to the list. This field might not be present if this journey + # segment is part of `JourneySharingInfo`. + # + # If this field is defined in the path + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + # (REST), then it may be populated with the `LatLng`s decoded from + # `DeliveryVehicle.current_route_segment` (gRPC) or + # `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + # path from the driver app's latest known location rather than the path from + # the previous stop. + class VehicleJourneySegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a point where a Vehicle stops to perform one or more `Task`s. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Required. The location of the stop. Note that the locations in the `Task`s + # might not exactly match this location, but will be within a short distance + # of it. This field won't be populated in the response of a `GetTask` call. + # @!attribute [rw] tasks + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::TaskInfo>] + # The list of `Task`s to be performed at this stop. This field won't be + # populated in the response of a `GetTask` call. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::State] + # The state of the `VehicleStop`. This field won't be populated in the + # response of a `GetTask` call. + class VehicleStop + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional information about the Task performed at this stop. + # @!attribute [rw] task_id + # @return [::String] + # The Task ID. This field won't be populated in the response of a `GetTask` + # call. Task IDs are subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [r] task_duration + # @return [::Google::Protobuf::Duration] + # Output only. The time required to perform the Task. + # @!attribute [r] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # Output only. The time window during which the task should be completed. + # This is only set in the response to `GetDeliveryVehicle`. + class TaskInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current state of a `VehicleStop`. + module State + # Unknown. + STATE_UNSPECIFIED = 0 + + # Created, but not actively routing. + NEW = 1 + + # Assigned and actively routing. + ENROUTE = 2 + + # Arrived at stop. Assumes that when the Vehicle is routing to the next + # stop, that all previous stops have been completed. + ARRIVED = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb new file mode 100644 index 000000000000..8475ff84935a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.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 Maps + module FleetEngine + module Delivery + module V1 + # A RequestHeader contains fields common to all Delivery RPC requests. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as en-US or sr-Latn. For more information, + # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + # is specified, the response may be in any language, with a preference for + # English if such a name exists. Field value example: `en-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the region where the request originates. + # Field value example: `US`. + # @!attribute [rw] sdk_version + # @return [::String] + # Version of the calling SDK, if applicable. + # The version format is "major.minor.patch", example: `1.1.2`. + # @!attribute [rw] os_version + # @return [::String] + # Version of the operating system on which the calling SDK is running. + # Field value examples: `4.4.1`, `12.1`. + # @!attribute [rw] device_model + # @return [::String] + # Model of the device on which the calling SDK is running. + # Field value examples: `iPhone12,1`, `SM-G920F`. + # @!attribute [rw] sdk_type + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::SdkType] + # The type of SDK sending the request. + # @!attribute [rw] maps_sdk_version + # @return [::String] + # Version of the MapSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `5.2.1`. + # @!attribute [rw] nav_sdk_version + # @return [::String] + # Version of the NavSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `2.1.0`. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::Platform] + # Platform of the calling SDK. + # @!attribute [rw] manufacturer + # @return [::String] + # Manufacturer of the Android device from the calling SDK, only applicable + # for the Android SDKs. + # Field value example: `Samsung`. + # @!attribute [rw] android_api_level + # @return [::Integer] + # Android API level of the calling SDK, only applicable for the Android SDKs. + # Field value example: `23`. + # @!attribute [rw] trace_id + # @return [::String] + # Optional ID that can be provided for logging purposes in order to identify + # the request. + class DeliveryRequestHeader + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of SDK. + module SdkType + # The default value. This value is used if the `sdk_type` is omitted. + SDK_TYPE_UNSPECIFIED = 0 + + # The calling SDK is Consumer. + CONSUMER = 1 + + # The calling SDK is Driver. + DRIVER = 2 + + # The calling SDK is JavaScript. + JAVASCRIPT = 3 + end + + # The platform of the calling SDK. + module Platform + # The default value. This value is used if the platform is omitted. + PLATFORM_UNSPECIFIED = 0 + + # The request is coming from Android. + ANDROID = 1 + + # The request is coming from iOS. + IOS = 2 + + # The request is coming from the web. + WEB = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb new file mode 100644 index 000000000000..3a110fdb32d7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # The `TaskTrackingInfo` message. The message contains task tracking + # information which will be used for display. If a tracking ID is associated + # with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's + # TaskTrackingInfo to select. + # @!attribute [rw] name + # @return [::String] + # Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + # where `tracking` represents the tracking ID. + # @!attribute [rw] tracking_id + # @return [::String] + # Immutable. The tracking ID of a Task. + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] vehicle_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # The vehicle's last location. + # @!attribute [rw] route_polyline_points + # @return [::Array<::Google::Type::LatLng>] + # A list of points which when connected forms a polyline of the vehicle's + # expected route to the location of this task. + # @!attribute [rw] remaining_stop_count + # @return [::Google::Protobuf::Int32Value] + # Indicates the number of stops the vehicle remaining until the task stop is + # reached, including the task stop. For example, if the vehicle's next stop + # is the task stop, the value will be 1. + # @!attribute [rw] remaining_driving_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The total remaining distance in meters to the `VehicleStop` of interest. + # @!attribute [rw] estimated_arrival_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates the estimated arrival time to the stop + # location. + # @!attribute [rw] estimated_task_completion_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates the estimated completion time of a Task. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] + # The current execution state of the Task. + # @!attribute [rw] task_outcome + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] + # The outcome of attempting to execute a Task. + # @!attribute [rw] task_outcome_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates when the Task's outcome was set by the + # provider. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Immutable. The location where the Task will be completed. + # @!attribute [rw] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # The time window during which the task should be completed. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] + # The custom attributes set on the task. + class TaskTrackingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb new file mode 100644 index 000000000000..0bb1c3f6a05b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb @@ -0,0 +1,291 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module Delivery + module V1 + # A Task in the Delivery API represents a single action to track. In general, + # there is a distinction between shipment-related Tasks and break Tasks. A + # shipment can have multiple Tasks associated with it. For example, there could + # be one Task for the pickup, and one for the drop-off or transfer. Also, + # different Tasks for a given shipment can be handled by different vehicles. + # For example, one vehicle could handle the pickup, driving the shipment to the + # hub, while another vehicle drives the same shipment from the hub to the + # drop-off location. + # + # Note: gRPC and REST APIs use different field naming conventions. For example, + # the `Task.journey_sharing_info` field in the gRPC API and the + # `Task.journeySharingInfo` field in the REST API refer to the same + # field. + # @!attribute [rw] name + # @return [::String] + # Must be in the format `providers/{provider}/tasks/{task}`. + # @!attribute [rw] type + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::Type] + # Required. Immutable. Defines the type of the Task. For example, a break or + # shipment. + # @!attribute [rw] state + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] + # Required. The current execution state of the Task. + # @!attribute [rw] task_outcome + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] + # The outcome of the Task. + # @!attribute [rw] task_outcome_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that indicates when the `Task`'s outcome was set by the + # provider. + # @!attribute [rw] task_outcome_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # The location where the `Task`'s outcome was set. This value is updated as + # part of `UpdateTask`. If this value isn't explicitly updated by the + # provider, then Fleet Engine populates it by default with the last known + # vehicle location (the *raw* location). + # @!attribute [rw] task_outcome_location_source + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource] + # Indicates where the value of the `task_outcome_location` came from. + # @!attribute [rw] tracking_id + # @return [::String] + # Immutable. This field facilitates the storing of an ID so you can avoid + # using a complicated mapping. You cannot set `tracking_id` for Tasks of type + # `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + # following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [r] delivery_vehicle_id + # @return [::String] + # Output only. The ID of the vehicle that is executing this Task. Delivery + # Vehicle IDs are subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] planned_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] + # Immutable. The location where the Task will be completed. + # Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + # @!attribute [rw] task_duration + # @return [::Google::Protobuf::Duration] + # Required. Immutable. The time needed to execute a Task at this location. + # @!attribute [rw] target_time_window + # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] + # The time window during which the task should be completed. + # @!attribute [r] journey_sharing_info + # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo] + # Output only. Journey sharing-specific fields. Not populated when state is + # `CLOSED`. + # @!attribute [rw] task_tracking_view_config + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig] + # The configuration for task tracking that specifies which data elements are + # visible to the end users under what circumstances. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] + # A list of custom Task attributes. Each attribute must have a unique key. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Journey sharing specific fields. + # @!attribute [rw] remaining_vehicle_journey_segments + # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] + # Tracking information for the stops that the assigned vehicle will make + # before it completes this Task. Note that this list can contain stops + # from other tasks. + # + # The first segment, + # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + # or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + # contains route information from the driver's last known location to the + # upcoming `VehicleStop`. Current route information usually comes from the + # driver app, except for some cases noted in the documentation for + # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. + # The other segments in + # `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + # `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + # populated by Fleet Engine. They provide route information between the + # remaining `VehicleStops`. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] + # Indicates the vehicle's last reported location of the assigned vehicle. + # @!attribute [rw] last_location_snappable + # @return [::Boolean] + # Indicates whether the vehicle's lastLocation can be snapped to + # the `current_route_segment`. This value is False if either + # `last_location` or `current_route_segment` don't exist. This value is + # computed by Fleet Engine. Updates from clients are ignored. + class JourneySharingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of Task. + module Type + # Default, the Task type is unknown. + TYPE_UNSPECIFIED = 0 + + # A pickup Task is the action taken for picking up a shipment from a + # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` + # type. + PICKUP = 1 + + # A delivery Task is the action taken for delivering a shipment to an end + # customer. Depot or feeder vehicle dropoffs should use the + # `SCHEDULED_STOP` type. + DELIVERY = 2 + + # A scheduled stop Task is used for planning purposes. For example, it + # could represent picking up or dropping off shipments from feeder vehicles + # or depots. It shouldn't be used for any shipments that are picked up or + # dropped off from an end customer. + SCHEDULED_STOP = 3 + + # A Task that means the Vehicle is not available for service. For example, + # this can happen when the driver takes a break, or when the vehicle + # is being refueled. + UNAVAILABLE = 4 + end + + # The state of a Task. This indicates the Tasks's progress. + module State + # Default. Used for an unspecified or unrecognized Task state. + STATE_UNSPECIFIED = 0 + + # Either the Task has not yet been assigned to a delivery vehicle, or the + # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. + OPEN = 1 + + # When the vehicle passes the vehicle stop for this Task. + CLOSED = 2 + end + + # The outcome of attempting to execute a Task. When `TaskState` is closed, + # `TaskOutcome` indicates whether it was completed successfully. + module TaskOutcome + # The Task outcome before its value is set. + TASK_OUTCOME_UNSPECIFIED = 0 + + # The Task completed successfully. + SUCCEEDED = 1 + + # Either the Task couldn't be completed, or it was cancelled. + FAILED = 2 + end + + # The identity of the source that populated the `task_outcome_location`. + module TaskOutcomeLocationSource + # The task outcome before it is set. + TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0 + + # The provider-specified the `task_outcome_location`. + PROVIDER = 2 + + # The provider didn't specify the `task_outcome_location`, so Fleet Engine + # used the last known vehicle location. + LAST_VEHICLE_LOCATION = 3 + end + end + + # The configuration message that defines when a data element of a Task should + # be visible to the end users. + # @!attribute [rw] route_polyline_points_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when route polyline points can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + # @!attribute [rw] estimated_arrival_time_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when estimated arrival time can be visible. If + # this field is not specified, the project level default visibility + # configuration for this data will be used. + # @!attribute [rw] estimated_task_completion_time_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when estimated task completion time can be + # visible. If this field is not specified, the project level default + # visibility configuration for this data will be used. + # @!attribute [rw] remaining_driving_distance_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when remaining driving distance can be visible. If + # this field is not specified, the project level default visibility + # configuration for this data will be used. + # @!attribute [rw] remaining_stop_count_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when remaining stop count can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + # @!attribute [rw] vehicle_location_visibility + # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] + # The field that specifies when vehicle location can be visible. If this + # field is not specified, the project level default visibility configuration + # for this data will be used. + class TaskTrackingViewConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The option message that defines when a data element should be visible to + # the end users. + # @!attribute [rw] remaining_stop_count_threshold + # @return [::Integer] + # This data element is visible to the end users if the remaining stop + # count <= remaining_stop_count_threshold. + # + # Note: The following fields are mutually exclusive: `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] duration_until_estimated_arrival_time_threshold + # @return [::Google::Protobuf::Duration] + # This data element is visible to the end users if the ETA to the stop + # <= duration_until_estimated_arrival_time_threshold. + # + # Note: The following fields are mutually exclusive: `duration_until_estimated_arrival_time_threshold`, `remaining_stop_count_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remaining_driving_distance_meters_threshold + # @return [::Integer] + # This data element is visible to the end users if the remaining + # driving distance in meters <= + # remaining_driving_distance_meters_threshold. + # + # Note: The following fields are mutually exclusive: `remaining_driving_distance_meters_threshold`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] always + # @return [::Boolean] + # If set to true, this data element is always visible to the end users + # with no thresholds. This field cannot be set to false. + # + # Note: The following fields are mutually exclusive: `always`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] never + # @return [::Boolean] + # If set to true, this data element is always hidden from the end users + # with no thresholds. This field cannot be set to false. + # + # Note: The following fields are mutually exclusive: `never`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VisibilityOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..593314b4cde5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # An object that represents a latitude/longitude pair. This is expressed as a + # pair of doubles to represent degrees latitude and degrees longitude. Unless + # specified otherwise, this object must conform to the + # + # WGS84 standard. Values must be within normalized ranges. + # @!attribute [rw] latitude + # @return [::Float] + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # @!attribute [rw] longitude + # @return [::Float] + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + class LatLng + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile new file mode 100644 index 000000000000..30533202706d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1", path: "../" +else + gem "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb new file mode 100644 index 000000000000..14782a4848c5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the batch_create_tasks call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks. +# +def batch_create_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new + + # Call the batch_create_tasks method. + result = client.batch_create_tasks request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb new file mode 100644 index 000000000000..4e414ecb6e94 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the create_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle. +# +def create_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new + + # Call the create_delivery_vehicle method. + result = client.create_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb new file mode 100644 index 000000000000..786f6ae89625 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the create_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb new file mode 100644 index 000000000000..0a42a3ea4d16 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the delete_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle. +# +def delete_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new + + # Call the delete_delivery_vehicle method. + result = client.delete_delivery_vehicle request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb new file mode 100644 index 000000000000..7839b4fc3aa0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the delete_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb new file mode 100644 index 000000000000..ac4be0811ccf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle. +# +def get_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new + + # Call the get_delivery_vehicle method. + result = client.get_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb new file mode 100644 index 000000000000..51530e7ea2a7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb new file mode 100644 index 000000000000..50c6fcfcbe4c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the get_task_tracking_info call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info. +# +def get_task_tracking_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new + + # Call the get_task_tracking_info method. + result = client.get_task_tracking_info request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb new file mode 100644 index 000000000000..06025d2f85f2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the list_delivery_vehicles call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles. +# +def list_delivery_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new + + # Call the list_delivery_vehicles method. + result = client.list_delivery_vehicles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p item + end +end +# [END fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb new file mode 100644 index 000000000000..f5751c045373 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the list_tasks call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. + p item + end +end +# [END fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb new file mode 100644 index 000000000000..54d6bfef390a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the update_delivery_vehicle call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle. +# +def update_delivery_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new + + # Call the update_delivery_vehicle method. + result = client.update_delivery_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb new file mode 100644 index 000000000000..6413dfeaa315 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] +require "google/maps/fleet_engine/delivery/v1" + +## +# Snippet for the update_task call in the DeliveryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task. +# +def update_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new + + # Call the update_task method. + result = client.update_task request + + # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. + p result +end +# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json new file mode 100644 index 000000000000..7abad3f98118 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -0,0 +1,495 @@ +{ + "client_library": { + "name": "google-maps-fleet_engine-delivery-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "maps.fleetengine.delivery.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync", + "title": "Snippet for the create_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle.", + "file": "delivery_service/create_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "CreateDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync", + "title": "Snippet for the get_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle.", + "file": "delivery_service/get_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync", + "title": "Snippet for the delete_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle.", + "file": "delivery_service/delete_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "DeleteDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync", + "title": "Snippet for the update_delivery_vehicle call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle.", + "file": "delivery_service/update_delivery_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_delivery_vehicle", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "UpdateDeliveryVehicle", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateDeliveryVehicle", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync", + "title": "Snippet for the batch_create_tasks call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks.", + "file": "delivery_service/batch_create_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_tasks", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "BatchCreateTasks", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.BatchCreateTasks", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync", + "title": "Snippet for the create_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task.", + "file": "delivery_service/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync", + "title": "Snippet for the get_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task.", + "file": "delivery_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync", + "title": "Snippet for the delete_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task.", + "file": "delivery_service/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync", + "title": "Snippet for the update_task call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task.", + "file": "delivery_service/update_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_task", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "UpdateTask", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateTask", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks.", + "file": "delivery_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListTasks", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync", + "title": "Snippet for the get_task_tracking_info call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info.", + "file": "delivery_service/get_task_tracking_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task_tracking_info", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "GetTaskTrackingInfo", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTaskTrackingInfo", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync", + "title": "Snippet for the list_delivery_vehicles call in the DeliveryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles.", + "file": "delivery_service/list_delivery_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_delivery_vehicles", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse", + "client": { + "short_name": "DeliveryService::Client", + "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" + }, + "method": { + "short_name": "ListDeliveryVehicles", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListDeliveryVehicles", + "service": { + "short_name": "DeliveryService", + "full_name": "maps.fleetengine.delivery.v1.DeliveryService" + } + } + }, + "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-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb new file mode 100644 index 000000000000..8d3d04d6c721 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleet_engine/delivery/v1/delivery_service" + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.delivery_vehicle_path provider: "value0", vehicle: "value1" + assert_equal "providers/value0/deliveryVehicles/value1", path + end + end + + def test_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.provider_path provider: "value0" + assert_equal "providers/value0", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path provider: "value0", task: "value1" + assert_equal "providers/value0/tasks/value1", path + end + end + + def test_task_tracking_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_tracking_info_path provider: "value0", tracking: "value1" + assert_equal "providers/value0/taskTrackingInfo/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb new file mode 100644 index 000000000000..df0109912e9d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb @@ -0,0 +1,773 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" + + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + delivery_vehicle_id = "hello world" + delivery_vehicle = {} + + create_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_delivery_vehicle_client_stub.call_count + end + end + end + + def test_get_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_delivery_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_delivery_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_delivery_vehicle_client_stub.call_count + end + end + end + + def test_delete_delivery_vehicle + # 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. + header = {} + name = "hello world" + + delete_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_delivery_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_delivery_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_delivery_vehicle_client_stub.call_count + end + end + end + + def test_update_delivery_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + delivery_vehicle = {} + update_mask = {} + + update_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_delivery_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_delivery_vehicle_client_stub.call_count + end + end + end + + def test_batch_create_tasks + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + requests = [{}] + + batch_create_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_batch_create_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_tasks_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_create_tasks header: header, parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_create_tasks({ header: header, parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_tasks_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + task_id = "hello world" + task = {} + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_task header: header, parent: parent, task_id: task_id, task: task do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_task({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_task header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_task({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_delete_task + # 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. + header = {} + name = "hello world" + + delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_task({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_task header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_task({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_update_task + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + task = {} + update_mask = {} + + update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_task({ header: header, task: task, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_task header: header, task: task, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_task({ header: header, task: task, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_count + end + end + end + + def test_get_task_tracking_info + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_tracking_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_tracking_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_tracking_info_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_task_tracking_info({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_task_tracking_info header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_task_tracking_info({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_tracking_info_client_stub.call_count + end + end + end + + def test_list_delivery_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + viewport = {} + + list_delivery_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_delivery_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_delivery_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb new file mode 100644 index 000000000000..d08154229fd8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/delivery/v1/delivery_api_pb" +require "google/maps/fleet_engine/delivery/v1/delivery_service" + +class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + delivery_vehicle_id = "hello world" + delivery_vehicle = {} + + create_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["delivery_vehicle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_get_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_delivery_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_delivery_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_delete_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + delete_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_delivery_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_delivery_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, 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_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_update_delivery_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + delivery_vehicle = {} + update_mask = {} + + update_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_delivery_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_delivery_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle_client_stub.call_rpc_count + end + end + + def test_batch_create_tasks + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + requests = [{}] + + batch_create_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_tasks, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_tasks_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_tasks header: header, parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_tasks({ header: header, parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_tasks_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + task_id = "hello world" + task = {} + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["task_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_task header: header, parent: parent, task_id: task_id, task: task do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_task({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_task header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_task({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_task({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_task header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_task({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_task_client_stub.call_rpc_count + end + end + + def test_update_task + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + task = {} + update_mask = {} + + update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_task, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_task_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_task({ header: header, task: task, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_task header: header, task: task, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_task({ header: header, task: task, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_rpc_count + end + end + + def test_get_task_tracking_info + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + get_task_tracking_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task_tracking_info, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_tracking_info_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_task_tracking_info({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_task_tracking_info header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_task_tracking_info({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_tracking_info_client_stub.call_rpc_count + end + end + + def test_list_delivery_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + viewport = {} + + list_delivery_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_delivery_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_delivery_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_delivery_vehicles_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json new file mode 100644 index 000000000000..4592d201ad59 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "fleetengine.googleapis.com", + "api_shortname": "fleetengine", + "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-v1", + "distribution_name": "google-maps-fleet_engine-v1", + "is_cloud": false, + "language": "ruby", + "name": "fleetengine", + "name_pretty": "Local Rides and Deliveries V1 API", + "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml new file mode 100644 index 000000000000..50b9b02eb455 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-maps-fleet_engine-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-maps-fleet_engine-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts new file mode 100644 index 000000000000..53681741a35c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Local Rides and Deliveries 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-maps-fleet_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..934462c35216 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1" + +client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/maps/fleet_engine/v1" + +::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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/maps/fleet_engine/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/README.md new file mode 100644 index 000000000000..6abe0096016a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Local Rides and Deliveries V1 API + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Local Rides and Deliveries V1 API. Most users should consider using +the main client gem, +[google-maps-fleet_engine](https://rubygems.org/gems/google-maps-fleet_engine). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-maps-fleet_engine-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/fleetengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/maps/fleet_engine/v1" + +client = ::Google::Maps::FleetEngine::V1::TripService::Client.new +request = ::Google::Maps::FleetEngine::V1::CreateTripRequest.new # (request fields as keyword arguments...) +response = client.create_trip request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) +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/maps/fleet_engine/v1" +require "logger" + +client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-maps-fleet_engine`, +and lower-level _versioned_ client libraries with names such as +`google-maps-fleet_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-maps-fleet_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-maps-fleet_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-maps-fleet_engine-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-v1/Rakefile new file mode 100644 index 000000000000..3919676d82cf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1/trip_service/credentials" + ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-maps-fleet_engine-v1" + header "google-maps-fleet_engine-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-maps-fleet_engine-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json new file mode 100644 index 000000000000..0bdd51b5c575 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "maps.fleetengine.v1", + "libraryPackage": "::Google::Maps::FleetEngine::V1", + "services": { + "TripService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::V1::TripService::Client", + "rpcs": { + "CreateTrip": { + "methods": [ + "create_trip" + ] + }, + "GetTrip": { + "methods": [ + "get_trip" + ] + }, + "DeleteTrip": { + "methods": [ + "delete_trip" + ] + }, + "ReportBillableTrip": { + "methods": [ + "report_billable_trip" + ] + }, + "SearchTrips": { + "methods": [ + "search_trips" + ] + }, + "UpdateTrip": { + "methods": [ + "update_trip" + ] + } + } + } + } + }, + "VehicleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Maps::FleetEngine::V1::VehicleService::Client", + "rpcs": { + "CreateVehicle": { + "methods": [ + "create_vehicle" + ] + }, + "GetVehicle": { + "methods": [ + "get_vehicle" + ] + }, + "DeleteVehicle": { + "methods": [ + "delete_vehicle" + ] + }, + "UpdateVehicle": { + "methods": [ + "update_vehicle" + ] + }, + "UpdateVehicleAttributes": { + "methods": [ + "update_vehicle_attributes" + ] + }, + "ListVehicles": { + "methods": [ + "list_vehicles" + ] + }, + "SearchVehicles": { + "methods": [ + "search_vehicles" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec new file mode 100644 index 000000000000..e47fe7d61a50 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/maps/fleet_engine/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-maps-fleet_engine-v1" + gem.version = Google::Maps::FleetEngine::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details." + gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb new file mode 100644 index 000000000000..d09ab3bdc03a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-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/maps/fleet_engine/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb new file mode 100644 index 000000000000..b9e04593edfe --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleet_engine/v1/trip_service" +require "google/maps/fleet_engine/v1/vehicle_service" +require "google/maps/fleet_engine/v1/version" + +module Google + module Maps + module FleetEngine + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1" + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/maps/fleet_engine/v1" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/maps/fleet_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb new file mode 100644 index 000000000000..a0010e1c40d9 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service/rest" +require "google/maps/fleet_engine/v1/vehicle_service/rest" +require "google/maps/fleet_engine/v1/version" + +module Google + module Maps + module FleetEngine + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/maps/fleet_engine/v1/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb new file mode 100644 index 000000000000..cb3cd45ab109 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/trip_service/credentials" +require "google/maps/fleet_engine/v1/trip_service/paths" +require "google/maps/fleet_engine/v1/trip_service/client" +require "google/maps/fleet_engine/v1/trip_service/rest" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Trip management service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1/trip_service" + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/v1/trip_service/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module TripService + end + end + end + end +end + +helper_path = ::File.join __dir__, "trip_service", "helpers.rb" +require "google/maps/fleet_engine/v1/trip_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb new file mode 100644 index 000000000000..18ea9bb63065 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb @@ -0,0 +1,1153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/v1/trip_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + ## + # Client for the TripService service. + # + # Trip management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trip_service_stub + + ## + # Configure the TripService Client class. + # + # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TripService clients + # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Maps", "FleetEngine", "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_trip.timeout = 15.0 + default_config.rpcs.create_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_trip.timeout = 15.0 + default_config.rpcs.get_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_trips.timeout = 15.0 + default_config.rpcs.search_trips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_trip.timeout = 15.0 + default_config.rpcs.update_trip.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 TripService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @trip_service_stub.universe_domain + end + + ## + # Create a new TripService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TripService 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/maps/fleetengine/v1/trip_api_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 + + @trip_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::V1::TripService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @trip_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 + @trip_service_stub.logger + end + + # Service calls + + ## + # Creates a trip in the Fleet Engine and returns the new trip. + # + # @overload create_trip(request, options = nil) + # Pass arguments to `create_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) + # Pass arguments to `create_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param trip_id [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + # + # # Call the create_trip method. + # result = client.create_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def create_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :create_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get information about a single trip. + # + # @overload get_trip(request, options = nil) + # Pass arguments to `get_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) + # Pass arguments to `get_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param view [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetTripRequest.new + # + # # Call the get_trip method. + # result = client.get_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def get_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :get_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + # + # @overload delete_trip(request, options = nil) + # Pass arguments to `delete_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_trip(header: nil, name: nil) + # Pass arguments to `delete_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + # + # # Call the delete_trip method. + # result = client.delete_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :delete_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report billable trip usage. + # + # @overload report_billable_trip(request, options = nil) + # Pass arguments to `report_billable_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) + # Pass arguments to `report_billable_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @param country_code [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @param related_ids [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + # + # # Call the report_billable_trip method. + # result = client.report_billable_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def report_billable_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.report_billable_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.report_billable_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :report_billable_trip, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get all the trips for a specific vehicle. + # + # @overload search_trips(request, options = nil) + # Pass arguments to `search_trips` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) + # Pass arguments to `search_trips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @param active_trips_only [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @param page_size [::Integer] + # If not set, the server decides the number of results to return. + # @param page_token [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + # + # # Call the search_trips method. + # result = client.search_trips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + # p item + # end + # + def search_trips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest + + # Converts hash and nil to 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_trips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_trips.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_trips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :search_trips, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @trip_service_stub, :search_trips, request, response, 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 trip data. + # + # @overload update_trip(request, options = nil) + # Pass arguments to `update_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) + # Pass arguments to `update_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + # + # # Call the update_trip method. + # result = client.update_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def update_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_trip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.call_rpc :update_trip, request, 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 TripService API. + # + # This class represents the configuration for TripService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_trip to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the TripService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trip + ## + # RPC-specific configuration for `get_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trip + ## + # RPC-specific configuration for `delete_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trip + ## + # RPC-specific configuration for `report_billable_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :report_billable_trip + ## + # RPC-specific configuration for `search_trips` + # @return [::Gapic::Config::Method] + # + attr_reader :search_trips + ## + # RPC-specific configuration for `update_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trip + + # @private + def initialize parent_rpcs = nil + create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip + @create_trip = ::Gapic::Config::Method.new create_trip_config + get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip + @get_trip = ::Gapic::Config::Method.new get_trip_config + delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip + @delete_trip = ::Gapic::Config::Method.new delete_trip_config + report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip + @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config + search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips + @search_trips = ::Gapic::Config::Method.new search_trips_config + update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip + @update_trip = ::Gapic::Config::Method.new update_trip_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb new file mode 100644 index 000000000000..4377df747ce3 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + # Credentials for the TripService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb new file mode 100644 index 000000000000..7de4a91f901d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + module TripService + # Path helper methods for the TripService API. + module Paths + ## + # Create a fully-qualified Trip resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/trips/{trip}` + # + # @param provider [String] + # @param trip [String] + # + # @return [::String] + def trip_path provider:, trip: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/trips/#{trip}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb new file mode 100644 index 000000000000..8f43dcd60e6b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/trip_service/credentials" +require "google/maps/fleet_engine/v1/trip_service/paths" +require "google/maps/fleet_engine/v1/trip_service/rest/client" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Trip management service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/v1/trip_service/rest" + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + module TripService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/v1/trip_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb new file mode 100644 index 000000000000..78114c5d13b2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb @@ -0,0 +1,1062 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + module Rest + ## + # REST client for the TripService service. + # + # Trip management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trip_service_stub + + ## + # Configure the TripService Client class. + # + # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TripService clients + # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 + default_config.rpcs.create_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_trip.timeout = 15.0 + default_config.rpcs.get_trip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_trips.timeout = 15.0 + default_config.rpcs.search_trips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_trip.timeout = 15.0 + default_config.rpcs.update_trip.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 TripService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::V1::TripService::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 + @trip_service_stub.universe_domain + end + + ## + # Create a new TripService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TripService 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 + + @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @trip_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 + @trip_service_stub.logger + end + + # Service calls + + ## + # Creates a trip in the Fleet Engine and returns the new trip. + # + # @overload create_trip(request, options = nil) + # Pass arguments to `create_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) + # Pass arguments to `create_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param trip_id [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + # + # # Call the create_trip method. + # result = client.create_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def create_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest + + # Converts hash and nil to an 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_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.create_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get information about a single trip. + # + # @overload get_trip(request, options = nil) + # Pass arguments to `get_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) + # Pass arguments to `get_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param view [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetTripRequest.new + # + # # Call the get_trip method. + # result = client.get_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def get_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.get_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + # + # @overload delete_trip(request, options = nil) + # Pass arguments to `delete_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_trip(header: nil, name: nil) + # Pass arguments to `delete_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + # + # # Call the delete_trip method. + # result = client.delete_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.delete_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report billable trip usage. + # + # @overload report_billable_trip(request, options = nil) + # Pass arguments to `report_billable_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) + # Pass arguments to `report_billable_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @param country_code [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @param related_ids [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + # + # # Call the report_billable_trip method. + # result = client.report_billable_trip request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def report_billable_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.report_billable_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.report_billable_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.report_billable_trip request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get all the trips for a specific vehicle. + # + # @overload search_trips(request, options = nil) + # Pass arguments to `search_trips` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) + # Pass arguments to `search_trips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @param active_trips_only [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @param page_size [::Integer] + # If not set, the server decides the number of results to return. + # @param page_token [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + # + # # Call the search_trips method. + # result = client.search_trips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + # p item + # end + # + def search_trips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest + + # Converts hash and nil to an 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_trips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trips.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_trips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.search_trips request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, 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 trip data. + # + # @overload update_trip(request, options = nil) + # Pass arguments to `update_trip` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) + # Pass arguments to `update_trip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + # + # # Call the update_trip method. + # result = client.update_trip request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + # p result + # + def update_trip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_trip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_trip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_trip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trip_service_stub.update_trip request, 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 TripService REST API. + # + # This class represents the configuration for TripService 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::Maps::FleetEngine::V1::TripService::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_trip to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_trip.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 TripService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trip + ## + # RPC-specific configuration for `get_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trip + ## + # RPC-specific configuration for `delete_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trip + ## + # RPC-specific configuration for `report_billable_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :report_billable_trip + ## + # RPC-specific configuration for `search_trips` + # @return [::Gapic::Config::Method] + # + attr_reader :search_trips + ## + # RPC-specific configuration for `update_trip` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trip + + # @private + def initialize parent_rpcs = nil + create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip + @create_trip = ::Gapic::Config::Method.new create_trip_config + get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip + @get_trip = ::Gapic::Config::Method.new get_trip_config + delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip + @delete_trip = ::Gapic::Config::Method.new delete_trip_config + report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip + @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config + search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips + @search_trips = ::Gapic::Config::Method.new search_trips_config + update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip + @update_trip = ::Gapic::Config::Method.new update_trip_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb new file mode 100644 index 000000000000..989dd713b15c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb @@ -0,0 +1,451 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/v1/trip_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module TripService + module Rest + ## + # REST service stub for the TripService 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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def create_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def get_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 report_billable_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def report_billable_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_report_billable_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "report_billable_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_trips REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchTripsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchTripsResponse] + # A result object deserialized from the server's reply + def search_trips request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_trips_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trips", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Trip] + # A result object deserialized from the server's reply + def update_trip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_trip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_trip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] + # 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_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/trips", + body: "trip", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the report_billable_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_report_billable_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:report", + body: "*", + matches: [ + ["name", %r{^providers/[^/]+/billableTrips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_trips REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] + # 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_trips_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/trips:search", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_trip REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_trip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "trip", + matches: [ + ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb new file mode 100644 index 000000000000..8a9893ae0e60 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/vehicle_service/credentials" +require "google/maps/fleet_engine/v1/vehicle_service/paths" +require "google/maps/fleet_engine/v1/vehicle_service/client" +require "google/maps/fleet_engine/v1/vehicle_service/rest" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Vehicle management service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/maps/fleet_engine/v1/vehicle_service" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/maps/fleet_engine/v1/vehicle_service/rest" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + module VehicleService + end + end + end + end +end + +helper_path = ::File.join __dir__, "vehicle_service", "helpers.rb" +require "google/maps/fleet_engine/v1/vehicle_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb new file mode 100644 index 000000000000..c1b48e95c452 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb @@ -0,0 +1,1463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/v1/vehicle_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + ## + # Client for the VehicleService service. + # + # Vehicle management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vehicle_service_stub + + ## + # Configure the VehicleService Client class. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VehicleService clients + # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 + default_config.rpcs.create_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_vehicle.timeout = 15.0 + default_config.rpcs.get_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle.timeout = 15.0 + default_config.rpcs.update_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle_attributes.timeout = 15.0 + default_config.rpcs.update_vehicle_attributes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_vehicles.timeout = 15.0 + default_config.rpcs.search_vehicles.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 VehicleService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @vehicle_service_stub.universe_domain + end + + ## + # Create a new VehicleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VehicleService 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/maps/fleetengine/v1/vehicle_api_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 + + @vehicle_service_stub = ::Gapic::ServiceStub.new( + ::Google::Maps::FleetEngine::V1::VehicleService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @vehicle_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 + @vehicle_service_stub.logger + end + + # Service calls + + ## + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @overload create_vehicle(request, options = nil) + # Pass arguments to `create_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) + # Pass arguments to `create_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + # + # # Call the create_vehicle method. + # result = client.create_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def create_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :create_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a vehicle from the Fleet Engine. + # + # @overload get_vehicle(request, options = nil) + # Pass arguments to `get_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) + # Pass arguments to `get_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + # + # # Call the get_vehicle method. + # result = client.get_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def get_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :get_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + # + # @overload delete_vehicle(request, options = nil) + # Pass arguments to `delete_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_vehicle(header: nil, name: nil) + # Pass arguments to `delete_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + # + # # Call the delete_vehicle method. + # result = client.delete_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :delete_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + # + # @overload update_vehicle(request, options = nil) + # Pass arguments to `update_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) + # Pass arguments to `update_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + # + # # Call the update_vehicle method. + # result = client.update_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def update_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :update_vehicle, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + # + # @overload update_vehicle_attributes(request, options = nil) + # Pass arguments to `update_vehicle_attributes` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) + # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + # + # # Call the update_vehicle_attributes method. + # result = client.update_vehicle_attributes request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + # p result + # + def update_vehicle_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name && + %r{^providers/[^/]+/?$}.match?(request.name) + header_params["provider_id"] = request.name + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :update_vehicle_attributes, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a paginated list of vehicles associated with + # a provider that match the request options. + # + # @overload list_vehicles(request, options = nil) + # Pass arguments to `list_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) + # Pass arguments to `list_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param page_size [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @param page_token [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @param required_attributes [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @param required_one_of_attributes [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @param required_one_of_attribute_sets [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @param on_trip_only [::Boolean] + # Only return the vehicles with current trip(s). + # @param filter [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + # + # # Call the list_vehicles method. + # result = client.list_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + # p item + # end + # + def list_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :list_vehicles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of vehicles that match the request options. + # + # @overload search_vehicles(request, options = nil) + # Pass arguments to `search_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) + # Pass arguments to `search_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # Required. The pickup point to search near. + # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @param pickup_radius_meters [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @param count [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @param minimum_capacity [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @param include_back_to_back [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @param trip_id [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @param filter [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + # + # # Call the search_vehicles method. + # result = client.search_vehicles request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + # p result + # + def search_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest + + # Converts hash and nil to 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_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent && + %r{^providers/[^/]+/?$}.match?(request.parent) + header_params["provider_id"] = request.parent + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_vehicles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.call_rpc :search_vehicles, request, 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 VehicleService API. + # + # This class represents the configuration for VehicleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the VehicleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vehicle + ## + # RPC-specific configuration for `get_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vehicle + ## + # RPC-specific configuration for `delete_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vehicle + ## + # RPC-specific configuration for `update_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle + ## + # RPC-specific configuration for `update_vehicle_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle_attributes + ## + # RPC-specific configuration for `list_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vehicles + ## + # RPC-specific configuration for `search_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :search_vehicles + + # @private + def initialize parent_rpcs = nil + create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle + @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config + get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle + @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config + delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle + @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config + update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle + @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config + update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes + @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config + list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles + @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config + search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles + @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb new file mode 100644 index 000000000000..fa225faa2e96 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + # Credentials for the VehicleService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb new file mode 100644 index 000000000000..55fd593ff4b1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + # Path helper methods for the VehicleService API. + module Paths + ## + # Create a fully-qualified Vehicle resource string. + # + # The resource will be in the following format: + # + # `providers/{provider}/vehicles/{vehicle}` + # + # @param provider [String] + # @param vehicle [String] + # + # @return [::String] + def vehicle_path provider:, vehicle: + raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" + + "providers/#{provider}/vehicles/#{vehicle}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb new file mode 100644 index 000000000000..c638416560e4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" + +require "google/maps/fleet_engine/v1/vehicle_service/credentials" +require "google/maps/fleet_engine/v1/vehicle_service/paths" +require "google/maps/fleet_engine/v1/vehicle_service/rest/client" + +module Google + module Maps + module FleetEngine + module V1 + ## + # Vehicle management service. + # + # To load this service and instantiate a REST client: + # + # require "google/maps/fleet_engine/v1/vehicle_service/rest" + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + module VehicleService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/maps/fleet_engine/v1/vehicle_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb new file mode 100644 index 000000000000..6f30d8a08b7c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb @@ -0,0 +1,1364 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service/rest/service_stub" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + module Rest + ## + # REST client for the VehicleService service. + # + # Vehicle management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vehicle_service_stub + + ## + # Configure the VehicleService Client class. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VehicleService clients + # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 + default_config.rpcs.create_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_vehicle.timeout = 15.0 + default_config.rpcs.get_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle.timeout = 15.0 + default_config.rpcs.update_vehicle.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_vehicle_attributes.timeout = 15.0 + default_config.rpcs.update_vehicle_attributes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_vehicles.timeout = 15.0 + default_config.rpcs.search_vehicles.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 VehicleService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Maps::FleetEngine::V1::VehicleService::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 + @vehicle_service_stub.universe_domain + end + + ## + # Create a new VehicleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VehicleService 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 + + @vehicle_service_stub = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @vehicle_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 + @vehicle_service_stub.logger + end + + # Service calls + + ## + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # + # @overload create_vehicle(request, options = nil) + # Pass arguments to `create_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) + # Pass arguments to `create_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle_id [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + # + # # Call the create_vehicle method. + # result = client.create_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def create_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest + + # Converts hash and nil to an 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_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.create_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a vehicle from the Fleet Engine. + # + # @overload get_vehicle(request, options = nil) + # Pass arguments to `get_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) + # Pass arguments to `get_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + # + # # Call the get_vehicle method. + # result = client.get_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def get_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.get_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + # + # @overload delete_vehicle(request, options = nil) + # Pass arguments to `delete_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_vehicle(header: nil, name: nil) + # Pass arguments to `delete_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # Optional. The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + # + # # Call the delete_vehicle method. + # result = client.delete_vehicle request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.delete_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + # + # @overload update_vehicle(request, options = nil) + # Pass arguments to `update_vehicle` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) + # Pass arguments to `update_vehicle` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + # + # # Call the update_vehicle method. + # result = client.update_vehicle request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + # p result + # + def update_vehicle request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_vehicle.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vehicle.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.update_vehicle request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + # + # @overload update_vehicle_attributes(request, options = nil) + # Pass arguments to `update_vehicle_attributes` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) + # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param name [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + # + # # Call the update_vehicle_attributes method. + # result = client.update_vehicle_attributes request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + # p result + # + def update_vehicle_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.update_vehicle_attributes request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a paginated list of vehicles associated with + # a provider that match the request options. + # + # @overload list_vehicles(request, options = nil) + # Pass arguments to `list_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) + # Pass arguments to `list_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param page_size [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @param page_token [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @param required_attributes [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @param required_one_of_attributes [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @param required_one_of_attribute_sets [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @param on_trip_only [::Boolean] + # Only return the vehicles with current trip(s). + # @param filter [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @param viewport [::Google::Geo::Type::Viewport, ::Hash] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + # + # # Call the list_vehicles method. + # result = client.list_vehicles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + # p item + # end + # + def list_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.list_vehicles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, "vehicles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of vehicles that match the request options. + # + # @overload search_vehicles(request, options = nil) + # Pass arguments to `search_vehicles` via a request object, either of type + # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. + # + # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) + # Pass arguments to `search_vehicles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] + # The standard Fleet Engine request header. + # @param parent [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # Required. The pickup point to search near. + # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @param pickup_radius_meters [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @param count [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @param minimum_capacity [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @param include_back_to_back [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @param trip_id [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @param filter [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/maps/fleet_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + # + # # Call the search_vehicles method. + # result = client.search_vehicles request + # + # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + # p result + # + def search_vehicles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest + + # Converts hash and nil to an 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_vehicles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_vehicles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_vehicles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vehicle_service_stub.search_vehicles request, 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 VehicleService REST API. + # + # This class represents the configuration for VehicleService 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::Maps::FleetEngine::V1::VehicleService::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_vehicle to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_vehicle.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "fleetengine.googleapis.com" + + config_attr :endpoint, nil, ::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 VehicleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vehicle + ## + # RPC-specific configuration for `get_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vehicle + ## + # RPC-specific configuration for `delete_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vehicle + ## + # RPC-specific configuration for `update_vehicle` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle + ## + # RPC-specific configuration for `update_vehicle_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vehicle_attributes + ## + # RPC-specific configuration for `list_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vehicles + ## + # RPC-specific configuration for `search_vehicles` + # @return [::Gapic::Config::Method] + # + attr_reader :search_vehicles + + # @private + def initialize parent_rpcs = nil + create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle + @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config + get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle + @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config + delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle + @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config + update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle + @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config + update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes + @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config + list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles + @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config + search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles + @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb new file mode 100644 index 000000000000..ab5b0c346f64 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb @@ -0,0 +1,512 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/maps/fleetengine/v1/vehicle_api_pb" + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + module Rest + ## + # REST service stub for the VehicleService 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_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def create_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def get_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # A result object deserialized from the server's reply + def update_vehicle request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_vehicle", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_vehicle_attributes REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] + # A result object deserialized from the server's reply + def update_vehicle_attributes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_attributes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_vehicle_attributes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] + # A result object deserialized from the server's reply + def list_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.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_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] + # A result object deserialized from the server's reply + def search_vehicles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_vehicles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_vehicles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.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_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] + # 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_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vehicles", + body: "vehicle", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vehicle REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_vehicle_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}", + body: "vehicle", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vehicle_attributes REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_vehicle_attributes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:updateAttributes", + body: "*", + matches: [ + ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vehicles", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_vehicles REST call + # + # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] + # 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_vehicles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vehicles:search", + body: "*", + matches: [ + ["parent", %r{^providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb new file mode 100644 index 000000000000..5f98242dd062 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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 Maps + module FleetEngine + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb new file mode 100644 index 000000000000..58e92abfb79e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/fleetengine.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/traffic_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + TerminalPointId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalPointId").msgclass + TerminalLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalLocation").msgclass + TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass + VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass + VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass + TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass + TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule + WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule + PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule + NavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.NavigationStatus").enummodule + LocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationSensor").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb new file mode 100644 index 000000000000..3f8cd27dcedb --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/header.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/maps/fleetengine/v1/header.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x04\n\rRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12<\n\x08sdk_type\x18\x06 \x01(\x0e\x32*.maps.fleetengine.v1.RequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12=\n\x08platform\x18\t \x01(\x0e\x32+.maps.fleetengine.v1.RequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07HeadersP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + RequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader").msgclass + RequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.SdkType").enummodule + RequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.Platform").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb new file mode 100644 index 000000000000..14bfe0f2b53b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/traffic.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/maps/fleetengine/v1/traffic.proto\x12\x13maps.fleetengine.v1\"\xe3\x01\n\x14SpeedReadingInterval\x12\"\n\x1astart_polyline_point_index\x18\x01 \x01(\x05\x12 \n\x18\x65nd_polyline_point_index\x18\x02 \x01(\x05\x12>\n\x05speed\x18\x03 \x01(\x0e\x32/.maps.fleetengine.v1.SpeedReadingInterval.Speed\"E\n\x05Speed\x12\x15\n\x11SPEED_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04SLOW\x10\x02\x12\x0f\n\x0bTRAFFIC_JAM\x10\x03\"\x88\x01\n\x19\x43onsumableTrafficPolyline\x12I\n\x16speed_reading_interval\x18\x01 \x03(\x0b\x32).maps.fleetengine.v1.SpeedReadingInterval\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x02 \x01(\tB\xd8\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0cTrafficProtoP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + SpeedReadingInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval").msgclass + SpeedReadingInterval::Speed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval.Speed").enummodule + ConsumableTrafficPolyline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ConsumableTrafficPolyline").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb new file mode 100644 index 000000000000..eb001c21ef19 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/trip_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/header_pb' +require 'google/maps/fleetengine/v1/trips_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + CreateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateTripRequest").msgclass + GetTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetTripRequest").msgclass + DeleteTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteTripRequest").msgclass + ReportBillableTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest").msgclass + ReportBillableTripRequest::SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest.SolutionType").enummodule + UpdateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateTripRequest").msgclass + SearchTripsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsRequest").msgclass + SearchTripsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb new file mode 100644 index 000000000000..39026e91ba88 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/trip_api_pb' + +module Google + module Maps + module FleetEngine + module V1 + module TripService + # Trip management service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'maps.fleetengine.v1.TripService' + + # Creates a trip in the Fleet Engine and returns the new trip. + rpc :CreateTrip, ::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Google::Maps::FleetEngine::V1::Trip + # Get information about a single trip. + rpc :GetTrip, ::Google::Maps::FleetEngine::V1::GetTripRequest, ::Google::Maps::FleetEngine::V1::Trip + # Deletes a single Trip. + # + # Returns FAILED_PRECONDITION if the Trip is active and assigned to a + # vehicle. + rpc :DeleteTrip, ::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Google::Protobuf::Empty + # Report billable trip usage. + rpc :ReportBillableTrip, ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Google::Protobuf::Empty + # Get all the trips for a specific vehicle. + rpc :SearchTrips, ::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Google::Maps::FleetEngine::V1::SearchTripsResponse + # Updates trip data. + rpc :UpdateTrip, ::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Google::Maps::FleetEngine::V1::Trip + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb new file mode 100644 index 000000000000..2aea61330c0f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/trips.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/traffic_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + Trip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Trip").msgclass + StopLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.StopLocation").msgclass + TripStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripStatus").enummodule + BillingPlatformIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BillingPlatformIdentifier").enummodule + TripView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb new file mode 100644 index 000000000000..4a1949b764b4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/vehicle_api.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/geo/type/viewport_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/maps/fleetengine/v1/header_pb' +require 'google/maps/fleetengine/v1/vehicles_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n,google/maps/fleetengine/v1/vehicle_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a)google/maps/fleetengine/v1/vehicles.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xac\x01\n\x14\x43reateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvehicle_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x05 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\"\xfb\x01\n\x11GetVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x38\n\x04name\x18\x03 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11waypoints_version\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x89\x01\n\x14\x44\x65leteVehicleRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x38\n\x04name\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\"\xc7\x01\n\x14UpdateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa7\x01\n\x1eUpdateVehicleAttributesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12>\n\nattributes\x18\x04 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"a\n\x1fUpdateVehicleAttributesResponse\x12>\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"\xc6\t\n\x15SearchVehiclesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0cpickup_point\x18\x04 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x03\xe0\x41\x02\x12<\n\rdropoff_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12!\n\x14pickup_radius_meters\x18\x06 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05\x63ount\x18\x07 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10minimum_capacity\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x36\n\ntrip_types\x18\t \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12\x34\n\x11maximum_staleness\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\rvehicle_types\x18\x0e \x03(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x42\n\x13required_attributes\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12M\n\x1arequired_one_of_attributes\x18\x0f \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12Q\n\x1erequired_one_of_attribute_sets\x18\x14 \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12S\n\x08order_by\x18\r \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrderB\x03\xe0\x41\x02\x12\x1c\n\x14include_back_to_back\x18\x12 \x01(\x08\x12\x0f\n\x07trip_id\x18\x13 \x01(\t\x12]\n\x15\x63urrent_trips_present\x18\x15 \x01(\x0e\x32>.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent\x12\x13\n\x06\x66ilter\x18\x16 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x11VehicleMatchOrder\x12\x1f\n\x1bUNKNOWN_VEHICLE_MATCH_ORDER\x10\x00\x12\x14\n\x10PICKUP_POINT_ETA\x10\x01\x12\x19\n\x15PICKUP_POINT_DISTANCE\x10\x02\x12\x15\n\x11\x44ROPOFF_POINT_ETA\x10\x03\x12\"\n\x1ePICKUP_POINT_STRAIGHT_DISTANCE\x10\x04\x12\x08\n\x04\x43OST\x10\x05\"O\n\x13\x43urrentTripsPresent\x12%\n!CURRENT_TRIPS_PRESENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"L\n\x16SearchVehiclesResponse\x12\x32\n\x07matches\x18\x01 \x03(\x0b\x32!.maps.fleetengine.v1.VehicleMatch\"\xfe\x04\n\x13ListVehiclesRequest\x12\x32\n\x06header\x18\x0c \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x35\n\x10minimum_capacity\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\ntrip_types\x18\x07 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x34\n\x11maximum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12W\n\x17vehicle_type_categories\x18\t \x03(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.CategoryB\x03\xe0\x41\x02\x12\x1b\n\x13required_attributes\x18\n \x03(\t\x12\"\n\x1arequired_one_of_attributes\x18\r \x03(\t\x12&\n\x1erequired_one_of_attribute_sets\x18\x0f \x03(\t\x12\x38\n\rvehicle_state\x18\x0b \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12\x14\n\x0con_trip_only\x18\x0e \x01(\x08\x12\x13\n\x06\x66ilter\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08viewport\x18\x11 \x01(\x0b\x32\x19.google.geo.type.ViewportB\x03\xe0\x41\x01\"x\n\x14ListVehiclesResponse\x12.\n\x08vehicles\x18\x01 \x03(\x0b\x32\x1c.maps.fleetengine.v1.Vehicle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x17\n\ntotal_size\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\"Y\n\x08Waypoint\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12\'\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfe\x06\n\x0cVehicleMatch\x12\x32\n\x07vehicle\x18\x01 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x36\n\x12vehicle_pickup_eta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1evehicle_pickup_distance_meters\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12V\n,vehicle_pickup_straight_line_distance_meters\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\x12\x37\n\x13vehicle_dropoff_eta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n)vehicle_pickup_to_dropoff_distance_meters\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\ttrip_type\x18\x06 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12>\n\x17vehicle_trips_waypoints\x18\x07 \x03(\x0b\x32\x1d.maps.fleetengine.v1.Waypoint\x12N\n\x12vehicle_match_type\x18\x08 \x01(\x0e\x32\x32.maps.fleetengine.v1.VehicleMatch.VehicleMatchType\x12Z\n\x14requested_ordered_by\x18\t \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\x12P\n\nordered_by\x18\n \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\"g\n\x10VehicleMatchType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tEXCLUSIVE\x10\x01\x12\x10\n\x0c\x42\x41\x43K_TO_BACK\x10\x02\x12\x0b\n\x07\x43\x41RPOOL\x10\x03\x12\x18\n\x14\x43\x41RPOOL_BACK_TO_BACK\x10\x04\"Q\n\x14VehicleAttributeList\x12\x39\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute2\xa2\x0b\n\x0eVehicleService\x12\xb7\x01\n\rCreateVehicle\x12).maps.fleetengine.v1.CreateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"]\x82\xd3\xe4\x93\x02,\"!/v1/{parent=providers/*}/vehicles:\x07vehicle\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nGetVehicle\x12&.maps.fleetengine.v1.GetVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"R\x82\xd3\xe4\x93\x02#\x12!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xad\x01\n\rDeleteVehicle\x12).maps.fleetengine.v1.DeleteVehicleRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb5\x01\n\rUpdateVehicle\x12).maps.fleetengine.v1.UpdateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"[\x82\xd3\xe4\x93\x02,\x1a!/v1/{name=providers/*/vehicles/*}:\x07vehicle\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xec\x01\n\x17UpdateVehicleAttributes\x12\x33.maps.fleetengine.v1.UpdateVehicleAttributesRequest\x1a\x34.maps.fleetengine.v1.UpdateVehicleAttributesResponse\"f\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=providers/*/vehicles/*}:updateAttributes:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb9\x01\n\x0cListVehicles\x12(.maps.fleetengine.v1.ListVehiclesRequest\x1a).maps.fleetengine.v1.ListVehiclesResponse\"T\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=providers/*}/vehicles\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xc9\x01\n\x0eSearchVehicles\x12*.maps.fleetengine.v1.SearchVehiclesRequest\x1a+.maps.fleetengine.v1.SearchVehiclesResponse\"^\x82\xd3\xe4\x93\x02-\"(/v1/{parent=providers/*}/vehicles:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n\x1e\x63om.google.maps.fleetengine.v1B\nVehicleApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + CreateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateVehicleRequest").msgclass + GetVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetVehicleRequest").msgclass + DeleteVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteVehicleRequest").msgclass + UpdateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleRequest").msgclass + UpdateVehicleAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesRequest").msgclass + UpdateVehicleAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesResponse").msgclass + SearchVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest").msgclass + SearchVehiclesRequest::VehicleMatchOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder").enummodule + SearchVehiclesRequest::CurrentTripsPresent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent").enummodule + SearchVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesResponse").msgclass + ListVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesRequest").msgclass + ListVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesResponse").msgclass + Waypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Waypoint").msgclass + VehicleMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch").msgclass + VehicleMatch::VehicleMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch.VehicleMatchType").enummodule + VehicleAttributeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttributeList").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb new file mode 100644 index 000000000000..31ee1908cafc --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb @@ -0,0 +1,108 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/vehicle_api_pb' + +module Google + module Maps + module FleetEngine + module V1 + module VehicleService + # Vehicle management service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'maps.fleetengine.v1.VehicleService' + + # Instantiates a new vehicle associated with an on-demand rideshare or + # deliveries provider. Each `Vehicle` must have a unique vehicle ID. + # + # The following `Vehicle` fields are required when creating a `Vehicle`: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # The following `Vehicle` fields are ignored when creating a `Vehicle`: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + rpc :CreateVehicle, ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Returns a vehicle from the Fleet Engine. + rpc :GetVehicle, ::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Deletes a Vehicle from the Fleet Engine. + # + # Returns FAILED_PRECONDITION if the Vehicle has active Trips. + # assigned to it. + rpc :DeleteVehicle, ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Google::Protobuf::Empty + # Writes updated vehicle data to the Fleet Engine. + # + # When updating a `Vehicle`, the following fields cannot be updated since + # they are managed by the server: + # + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment_version` + # * `waypoints_version` + # + # The vehicle `name` also cannot be updated. + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, + # the `waypoints` field can be updated, but must contain all the waypoints + # currently on the vehicle, and no other waypoints. + rpc :UpdateVehicle, ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle + # Partially updates a vehicle's attributes. + # Only the attributes mentioned in the request will be updated, other + # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + # where the whole `attributes` field will be replaced by the one in + # `UpdateVehicleRequest`, attributes not in the request would be removed. + rpc :UpdateVehicleAttributes, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse + # Returns a paginated list of vehicles associated with + # a provider that match the request options. + rpc :ListVehicles, ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Google::Maps::FleetEngine::V1::ListVehiclesResponse + # Returns a list of vehicles that match the request options. + rpc :SearchVehicles, ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb new file mode 100644 index 000000000000..91a8f67ad59d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/maps/fleetengine/v1/vehicles.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/maps/fleetengine/v1/fleetengine_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n)google/maps/fleetengine/v1/vehicles.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\x0c\n\x07Vehicle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rvehicle_state\x18\x02 \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12;\n\x14supported_trip_types\x18\x03 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x1a\n\rcurrent_trips\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12;\n\rlast_location\x18\x05 \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocation\x12\x41\n\x0epast_locations\x18\x1e \x03(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x04\x12\x18\n\x10maximum_capacity\x18\x06 \x01(\x05\x12\x39\n\nattributes\x18\x08 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12\x43\n\x0cvehicle_type\x18\t \x01(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x38\n\rlicense_plate\x18\n \x01(\x0b\x32!.maps.fleetengine.v1.LicensePlate\x12\x38\n\x05route\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x02\x18\x01\x12\x1d\n\x15\x63urrent_route_segment\x18\x14 \x01(\t\x12T\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32(.maps.fleetengine.v1.TrafficPolylineDataB\x03\xe0\x41\x04\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12>\n\x19remaining_distance_meters\x18\x12 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x15\x65ta_to_first_waypoint\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x16remaining_time_seconds\x18\x19 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12\x34\n\twaypoints\x18\x16 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12:\n\x11waypoints_version\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x62\x61\x63k_to_back_enabled\x18\x17 \x01(\x08\x12@\n\x11navigation_status\x18\x1a \x01(\x0e\x32%.maps.fleetengine.v1.NavigationStatus\x12\x41\n\x0f\x64\x65vice_settings\x18\x1b \x01(\x0b\x32#.maps.fleetengine.v1.DeviceSettingsB\x03\xe0\x41\x04\x1a\xb8\x01\n\x0bVehicleType\x12\x43\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.Category\"d\n\x08\x43\x61tegory\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04TAXI\x10\x02\x12\t\n\x05TRUCK\x10\x03\x12\x0f\n\x0bTWO_WHEELER\x10\x04\x12\x0b\n\x07\x42ICYCLE\x10\x05\x12\x0e\n\nPEDESTRIAN\x10\x06:P\xea\x41M\n\"fleetengine.googleapis.com/Vehicle\x12\'providers/{provider}/vehicles/{vehicle}\"\x9d\x01\n\x0b\x42\x61tteryInfo\x12:\n\x0e\x62\x61ttery_status\x18\x01 \x01(\x0e\x32\".maps.fleetengine.v1.BatteryStatus\x12\x36\n\x0cpower_source\x18\x02 \x01(\x0e\x32 .maps.fleetengine.v1.PowerSource\x12\x1a\n\x12\x62\x61ttery_percentage\x18\x03 \x01(\x02\"\xca\x01\n\x0e\x44\x65viceSettings\x12L\n\x18location_power_save_mode\x18\x01 \x01(\x0e\x32*.maps.fleetengine.v1.LocationPowerSaveMode\x12\x1a\n\x12is_power_save_mode\x18\x02 \x01(\x08\x12\x16\n\x0eis_interactive\x18\x03 \x01(\x08\x12\x36\n\x0c\x62\x61ttery_info\x18\x04 \x01(\x0b\x32 .maps.fleetengine.v1.BatteryInfo\"A\n\x0cLicensePlate\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elast_character\x18\x02 \x01(\t\"\xf6\x02\n$VisualTrafficReportPolylineRendering\x12`\n\x0croad_stretch\x18\x01 \x03(\x0b\x32\x45.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretchB\x03\xe0\x41\x01\x1a\xeb\x01\n\x0bRoadStretch\x12_\n\x05style\x18\x01 \x01(\x0e\x32K.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.StyleB\x03\xe0\x41\x02\x12\x1a\n\roffset_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rlength_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"C\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLOWER_TRAFFIC\x10\x01\x12\x0f\n\x0bTRAFFIC_JAM\x10\x02\"k\n\x13TrafficPolylineData\x12T\n\x11traffic_rendering\x18\x01 \x01(\x0b\x32\x39.maps.fleetengine.v1.VisualTrafficReportPolylineRendering*B\n\x0cVehicleState\x12\x19\n\x15UNKNOWN_VEHICLE_STATE\x10\x00\x12\x0b\n\x07OFFLINE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\x92\x02\n\x15LocationPowerSaveMode\x12$\n UNKNOWN_LOCATION_POWER_SAVE_MODE\x10\x00\x12\x1b\n\x17LOCATION_MODE_NO_CHANGE\x10\x01\x12.\n*LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF\x10\x02\x12.\n*LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\x10\x03\x12!\n\x1dLOCATION_MODE_FOREGROUND_ONLY\x10\x04\x12\x33\n/LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF\x10\x05*\xc0\x01\n\rBatteryStatus\x12\x1a\n\x16UNKNOWN_BATTERY_STATUS\x10\x00\x12\x1b\n\x17\x42\x41TTERY_STATUS_CHARGING\x10\x01\x12\x1e\n\x1a\x42\x41TTERY_STATUS_DISCHARGING\x10\x02\x12\x17\n\x13\x42\x41TTERY_STATUS_FULL\x10\x03\x12\x1f\n\x1b\x42\x41TTERY_STATUS_NOT_CHARGING\x10\x04\x12\x1c\n\x18\x42\x41TTERY_STATUS_POWER_LOW\x10\x05*\x89\x01\n\x0bPowerSource\x12\x18\n\x14UNKNOWN_POWER_SOURCE\x10\x00\x12\x13\n\x0fPOWER_SOURCE_AC\x10\x01\x12\x14\n\x10POWER_SOURCE_USB\x10\x02\x12\x19\n\x15POWER_SOURCE_WIRELESS\x10\x03\x12\x1a\n\x16POWER_SOURCE_UNPLUGGED\x10\x04\x42\xd4\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x08VehiclesP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Maps + module FleetEngine + module V1 + Vehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle").msgclass + Vehicle::VehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType").msgclass + Vehicle::VehicleType::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType.Category").enummodule + BatteryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryInfo").msgclass + DeviceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeviceSettings").msgclass + LicensePlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LicensePlate").msgclass + VisualTrafficReportPolylineRendering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering").msgclass + VisualTrafficReportPolylineRendering::RoadStretch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch").msgclass + VisualTrafficReportPolylineRendering::RoadStretch::Style = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style").enummodule + TrafficPolylineData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TrafficPolylineData").msgclass + VehicleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleState").enummodule + LocationPowerSaveMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationPowerSaveMode").enummodule + BatteryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryStatus").enummodule + PowerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PowerSource").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md new file mode 100644 index 000000000000..faf4842e7c03 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Local Rides and Deliveries 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-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb new file mode 100644 index 000000000000..f387552a7073 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Geo + module Type + # A latitude-longitude viewport, represented as two diagonally opposite `low` + # and `high` points. A viewport is considered a closed region, i.e. it includes + # its boundary. The latitude bounds must range between -90 to 90 degrees + # inclusive, and the longitude bounds must range between -180 to 180 degrees + # inclusive. Various cases include: + # + # - If `low` = `high`, the viewport consists of that single point. + # + # - If `low.longitude` > `high.longitude`, the longitude range is inverted + # (the viewport crosses the 180 degree longitude line). + # + # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, + # the viewport includes all longitudes. + # + # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, + # the longitude range is empty. + # + # - If `low.latitude` > `high.latitude`, the latitude range is empty. + # + # Both `low` and `high` must be populated, and the represented box cannot be + # empty (as specified by the definitions above). An empty viewport will result + # in an error. + # + # For example, this viewport fully encloses New York City: + # + # { + # "low": { + # "latitude": 40.477398, + # "longitude": -74.259087 + # }, + # "high": { + # "latitude": 40.91618, + # "longitude": -73.70018 + # } + # } + # @!attribute [rw] low + # @return [::Google::Type::LatLng] + # Required. The low point of the viewport. + # @!attribute [rw] high + # @return [::Google::Type::LatLng] + # Required. The high point of the viewport. + class Viewport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb new file mode 100644 index 000000000000..9855fd75847c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb @@ -0,0 +1,394 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use + # `TerminalLocation.point` instead. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] place_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # + # Note: The following fields are mutually exclusive: `place_id`, `generated_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generated_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # + # Note: The following fields are mutually exclusive: `generated_id`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + class TerminalPointId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the location of a waypoint. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # Required. Denotes the location of a trip waypoint. + # @!attribute [rw] terminal_point_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Maps::FleetEngine::V1::TerminalPointId] + # Deprecated: Specify the `point` field instead. + # @!attribute [rw] access_point_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Specify the `point` field instead. + # @!attribute [rw] trip_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. + # @!attribute [rw] terminal_location_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Maps::FleetEngine::V1::WaypointType] + # Deprecated: `Vehicle.waypoint` will have this data. + class TerminalLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a stopping point on a vehicle's route or an ending point on a + # vehicle's trip. + # @!attribute [rw] location + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # The location of this waypoint. + # @!attribute [rw] trip_id + # @return [::String] + # The trip associated with this waypoint. + # @!attribute [rw] waypoint_type + # @return [::Google::Maps::FleetEngine::V1::WaypointType] + # The role this waypoint plays in this trip, such as pickup or dropoff. + # @!attribute [rw] path_to_waypoint + # @return [::Array<::Google::Type::LatLng>] + # The path from the previous waypoint to the current waypoint. Undefined for + # the first waypoint in a list. This field is only populated when requested. + # @!attribute [rw] encoded_path_to_waypoint + # @return [::String] + # The encoded path from the previous waypoint to the current waypoint. + # + #

Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. Decoding is not yet supported. + # @!attribute [rw] traffic_to_waypoint + # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] + # The traffic conditions along the path to this waypoint. Note that traffic + # is only available for Google Map Platform Rides and Deliveries Solution + # customers. + # @!attribute [rw] distance_meters + # @return [::Google::Protobuf::Int32Value] + # The path distance from the previous waypoint to the current waypoint. + # Undefined for the first waypoint in a list. + # @!attribute [rw] eta + # @return [::Google::Protobuf::Timestamp] + # The estimated time of arrival at this waypoint. Undefined for the first + # waypoint in a list. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The travel time from previous waypoint to this point. Undefined for the + # first waypoint in a list. + class TripWaypoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a vehicle attribute as a key-value pair. The "key:value" string + # length cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] value + # @return [::String] + # The attribute's value. + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: This is identical to the `value` field which will eventually be + # deprecated. For create or update methods, either field can be used, but + # it's strongly recommended to use `string_value`. If both `string_value` + # and `value` are set, they must be identical or an error will be thrown. + # Both fields are populated in responses. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VehicleAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location, speed, and heading of a vehicle at a point in time. + # @!attribute [rw] location + # @return [::Google::Type::LatLng] + # The location of the vehicle. + # When it is sent to Fleet Engine, the vehicle's location is a GPS location. + # When you receive it in a response, the vehicle's location can be either a + # GPS location, a supplemental location, or some other estimated location. + # The source is specified in `location_sensor`. + # @!attribute [rw] horizontal_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `latlng_accuracy` instead. + # @!attribute [rw] latlng_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `location` in meters as a radius. + # @!attribute [rw] heading + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees. 0 represents North. + # The valid range is [0,360). + # @!attribute [rw] bearing_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `heading_accuracy` instead. + # @!attribute [rw] heading_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `heading` in degrees. + # @!attribute [rw] altitude + # @return [::Google::Protobuf::DoubleValue] + # Altitude in meters above WGS84. + # @!attribute [rw] vertical_accuracy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::DoubleValue] + # Deprecated: Use `altitude_accuracy` instead. + # @!attribute [rw] altitude_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `altitude` in meters. + # @!attribute [rw] speed_kmph + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Speed of the vehicle in kilometers per hour. + # Deprecated: Use `speed` instead. + # @!attribute [rw] speed + # @return [::Google::Protobuf::DoubleValue] + # Speed of the vehicle in meters/second + # @!attribute [rw] speed_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `speed` in meters/second. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when `location` was reported by the sensor according to the + # sensor's clock. + # @!attribute [r] server_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the server received the location information. + # @!attribute [rw] location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Provider of location data (for example, `GPS`). + # @!attribute [rw] is_road_snapped + # @return [::Google::Protobuf::BoolValue] + # Whether `location` is snapped to a road. + # @!attribute [rw] is_gps_sensor_enabled + # @return [::Google::Protobuf::BoolValue] + # Input only. Indicates whether the GPS sensor is enabled on the mobile + # device. + # @!attribute [rw] time_since_update + # @return [::Google::Protobuf::Int32Value] + # Input only. Time (in seconds) since this location was first sent to the + # server. This will be zero for the first update. If the time is unknown (for + # example, when the app restarts), this value resets to zero. + # @!attribute [rw] num_stale_updates + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Int32Value] + # Input only. Deprecated: Other signals are now used to determine if a + # location is stale. + # @!attribute [rw] raw_location + # @return [::Google::Type::LatLng] + # Raw vehicle location (unprocessed by road-snapper). + # @!attribute [rw] raw_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the raw location. + # @!attribute [rw] raw_location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Source of the raw location. Defaults to `GPS`. + # @!attribute [rw] raw_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `raw_location` as a radius, in meters. + # @!attribute [rw] flp_location + # @return [::Google::Type::LatLng] + # The location from Android's Fused Location Provider. + # @!attribute [rw] flp_update_time + # @return [::Google::Protobuf::Timestamp] + # Update timestamp of `flp_location`. + # @!attribute [rw] flp_latlng_accuracy_meters + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `flp_location` in meters as a radius. + # @!attribute [rw] flp_heading_degrees + # @return [::Google::Protobuf::Int32Value] + # Direction the vehicle is moving in degrees, as determined by the Fused + # Location Provider. 0 represents North. The valid range is [0,360). + # @!attribute [rw] supplemental_location + # @return [::Google::Type::LatLng] + # Supplemental location provided by the integrating app. + # @!attribute [rw] supplemental_location_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp associated with the supplemental location. + # @!attribute [rw] supplemental_location_sensor + # @return [::Google::Maps::FleetEngine::V1::LocationSensor] + # Source of the supplemental location. Defaults to + # `CUSTOMER_SUPPLIED_LOCATION`. + # @!attribute [rw] supplemental_location_accuracy + # @return [::Google::Protobuf::DoubleValue] + # Accuracy of `supplemental_location` as a radius, in meters. + # @!attribute [rw] road_snapped + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: Use `is_road_snapped` instead. + class VehicleLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a trip attribute as a key-value pair. The "key:value" string length + # cannot exceed 256 characters. + # @!attribute [rw] key + # @return [::String] + # The attribute's key. Keys may not contain the colon character (:). + # @!attribute [rw] string_value + # @return [::String] + # String typed attribute value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean typed attribute value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Double typed attribute value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TripAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of a trip. + module TripType + # Default, used for unspecified or unrecognized trip types. + UNKNOWN_TRIP_TYPE = 0 + + # The trip may share a vehicle with other trips. + SHARED = 1 + + # The trip is exclusive to a vehicle. + EXCLUSIVE = 2 + end + + # The type of waypoint. + module WaypointType + # Unknown or unspecified waypoint type. + UNKNOWN_WAYPOINT_TYPE = 0 + + # Waypoints for picking up riders or items. + PICKUP_WAYPOINT_TYPE = 1 + + # Waypoints for dropping off riders or items. + DROP_OFF_WAYPOINT_TYPE = 2 + + # Waypoints for intermediate destinations in a multi-destination trip. + INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3 + end + + # The type of polyline format. + module PolylineFormatType + # The format is unspecified or unknown. + UNKNOWN_FORMAT_TYPE = 0 + + # A list of `google.type.LatLng`. + LAT_LNG_LIST_TYPE = 1 + + # A polyline encoded with a polyline compression algorithm. Decoding is not + # yet supported. + ENCODED_POLYLINE_TYPE = 2 + end + + # The vehicle's navigation status. + module NavigationStatus + # Unspecified navigation status. + UNKNOWN_NAVIGATION_STATUS = 0 + + # The Driver app's navigation is in `FREE_NAV` mode. + NO_GUIDANCE = 1 + + # Turn-by-turn navigation is available and the Driver app navigation has + # entered `GUIDED_NAV` mode. + ENROUTE_TO_DESTINATION = 2 + + # The vehicle has gone off the suggested route. + OFF_ROUTE = 3 + + # The vehicle is within approximately 50m of the destination. + ARRIVED_AT_DESTINATION = 4 + end + + # The sensor or methodology used to determine the location. + module LocationSensor + # The sensor is unspecified or unknown. + UNKNOWN_SENSOR = 0 + + # GPS or Assisted GPS. + GPS = 1 + + # Assisted GPS, cell tower ID, or WiFi access point. + NETWORK = 2 + + # Cell tower ID or WiFi access point. + PASSIVE = 3 + + # A location determined by the mobile device to be the most likely + # road position. + ROAD_SNAPPED_LOCATION_PROVIDER = 4 + + # A customer-supplied location from an independent source. Typically, this + # value is used for a location provided from sources other than the mobile + # device running Driver SDK. If the original source is described by one of + # the other enum values, use that value. Locations marked + # CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's + # `last_location.supplemental_location_sensor`. + CUSTOMER_SUPPLIED_LOCATION = 5 + + # A location calculated by Fleet Engine based on the signals available to it. + # Output only. This value will be rejected if it is received in a request. + FLEET_ENGINE_LOCATION = 6 + + # Android's Fused Location Provider. + FUSED_LOCATION_PROVIDER = 100 + + # The location provider on Apple operating systems. + CORE_LOCATION = 200 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb new file mode 100644 index 000000000000..dbc08c7760c6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.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 Maps + module FleetEngine + module V1 + # A RequestHeader contains fields common to all Fleet Engine RPC requests. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as en-US or sr-Latn. For more information, + # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + # is specified, the response may be in any language, with a preference for + # English if such a name exists. Field value example: `en-US`. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the region where the request originates. + # Field value example: `US`. + # @!attribute [rw] sdk_version + # @return [::String] + # Version of the calling SDK, if applicable. + # The version format is "major.minor.patch", example: `1.1.2`. + # @!attribute [rw] os_version + # @return [::String] + # Version of the operating system on which the calling SDK is running. + # Field value examples: `4.4.1`, `12.1`. + # @!attribute [rw] device_model + # @return [::String] + # Model of the device on which the calling SDK is running. + # Field value examples: `iPhone12,1`, `SM-G920F`. + # @!attribute [rw] sdk_type + # @return [::Google::Maps::FleetEngine::V1::RequestHeader::SdkType] + # The type of SDK sending the request. + # @!attribute [rw] maps_sdk_version + # @return [::String] + # Version of the MapSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `5.2.1`. + # @!attribute [rw] nav_sdk_version + # @return [::String] + # Version of the NavSDK which the calling SDK depends on, if applicable. + # The version format is "major.minor.patch", example: `2.1.0`. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::V1::RequestHeader::Platform] + # Platform of the calling SDK. + # @!attribute [rw] manufacturer + # @return [::String] + # Manufacturer of the Android device from the calling SDK, only applicable + # for the Android SDKs. + # Field value example: `Samsung`. + # @!attribute [rw] android_api_level + # @return [::Integer] + # Android API level of the calling SDK, only applicable for the Android SDKs. + # Field value example: `23`. + # @!attribute [rw] trace_id + # @return [::String] + # Optional ID that can be provided for logging purposes in order to identify + # the request. + class RequestHeader + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of SDK. + module SdkType + # The default value. This value is used if the `sdk_type` is omitted. + SDK_TYPE_UNSPECIFIED = 0 + + # The calling SDK is Consumer. + CONSUMER = 1 + + # The calling SDK is Driver. + DRIVER = 2 + + # The calling SDK is JavaScript. + JAVASCRIPT = 3 + end + + # The platform of the calling SDK. + module Platform + # The default value. This value is used if the platform is omitted. + PLATFORM_UNSPECIFIED = 0 + + # The request is coming from Android. + ANDROID = 1 + + # The request is coming from iOS. + IOS = 2 + + # The request is coming from the web. + WEB = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb new file mode 100644 index 000000000000..024d9a7221d4 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Traffic density indicator on a contiguous segment of a path. Given a path + # with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval + # defines an interval and describes its traffic using the following categories. + # @!attribute [rw] start_polyline_point_index + # @return [::Integer] + # The starting index of this interval in the path. + # In JSON, when the index is 0, the field will appear to be unpopulated. + # @!attribute [rw] end_polyline_point_index + # @return [::Integer] + # The ending index of this interval in the path. + # In JSON, when the index is 0, the field will appear to be unpopulated. + # @!attribute [rw] speed + # @return [::Google::Maps::FleetEngine::V1::SpeedReadingInterval::Speed] + # Traffic speed in this interval. + class SpeedReadingInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The classification of polyline speed based on traffic data. + module Speed + # Default value. This value is unused. + SPEED_UNSPECIFIED = 0 + + # Normal speed, no traffic delays. + NORMAL = 1 + + # Slowdown detected, medium amount of traffic. + SLOW = 2 + + # Traffic delays. + TRAFFIC_JAM = 3 + end + end + + # Traffic density along a Vehicle's path. + # @!attribute [rw] speed_reading_interval + # @return [::Array<::Google::Maps::FleetEngine::V1::SpeedReadingInterval>] + # Traffic speed along the path from the previous waypoint to the current + # waypoint. + # @!attribute [rw] encoded_path_to_waypoint + # @return [::String] + # The path the driver is taking from the previous waypoint to the current + # waypoint. This path has landmarks in it so clients can show traffic markers + # along the path (see `speed_reading_interval`). Decoding is not yet + # supported. + class ConsumableTrafficPolyline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb new file mode 100644 index 000000000000..4bf45f469f13 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb @@ -0,0 +1,312 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # CreateTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] trip_id + # @return [::String] + # Required. Unique Trip ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] trip + # @return [::Google::Maps::FleetEngine::V1::Trip] + # Required. Trip entity to create. + # + # When creating a Trip, the following fields are required: + # + # * `trip_type` + # * `pickup_point` + # + # The following fields are used if you provide them: + # + # * `number_of_passengers` + # * `vehicle_id` + # * `dropoff_point` + # * `intermediate_destinations` + # * `vehicle_waypoints` + # + # All other Trip fields are ignored. For example, all trips start with a + # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in + # the creation request. + # + # Only `EXCLUSIVE` trips support `intermediate_destinations`. + # + # When `vehicle_id` is set for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints for the vehicle, otherwise the waypoint order will be + # undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + class CreateTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] view + # @return [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that should be returned and their interpretation. + # @!attribute [rw] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which `Trip.route` or + # `Trip.current_route_segment` data are retrieved. If route data are + # unchanged since this timestamp, the route field is not set in the response. + # If a minimum is unspecified, the route data are always retrieved. + # @!attribute [rw] remaining_waypoints_version + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + # `remaining_waypoints_route_version` to control when + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + # @!attribute [rw] route_format_type + # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] + # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), + # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default + # is `LAT_LNG_LIST_TYPE`. + # @!attribute [rw] current_route_segment_traffic_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.current_route_segment_traffic` is retrieved. If traffic data are + # unchanged since this timestamp, the `current_route_segment_traffic` field + # is not set in the response. If a minimum is unspecified, the traffic data + # are always retrieved. Note that traffic is only available for On-Demand + # Rides and Deliveries Solution customers. + # @!attribute [rw] remaining_waypoints_route_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Trip.remaining_waypoints.traffic_to_waypoint` and + # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are + # unchanged since this timestamp, the fields above are + # not set in the response. If `remaining_waypoints_route_version` is + # unspecified, traffic and path are always retrieved. + class GetTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # Optional. The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/trips/{trip}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + class DeleteTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReportBillableTrip request message. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/billableTrips/{billable_trip}`. The + # provider must be the Project ID (for example, `sample-cloud-project`) of + # the Google Cloud Project of which the service account making this call is a + # member. + # @!attribute [rw] country_code + # @return [::String] + # Required. Two letter country code of the country where the trip takes + # place. Price is defined according to country code. + # @!attribute [rw] platform + # @return [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] + # The platform upon which the request was issued. + # @!attribute [rw] related_ids + # @return [::Array<::String>] + # The identifiers that are directly related to the trip being reported. These + # are usually IDs (for example, session IDs) of pre-booking operations done + # before the trip ID is available. The number of `related_ids` is + # limited to 50. + # @!attribute [rw] solution_type + # @return [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] + # The type of GMP product solution (for example, + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. + class ReportBillableTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Selector for different solution types of a reported trip. + module SolutionType + # The default value. For backwards-compatibility, the API will use + # `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first + # supported solution type. + SOLUTION_TYPE_UNSPECIFIED = 0 + + # The solution is an on-demand ridesharing and deliveries trip. + ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1 + end + end + + # UpdateTrip request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/trips/{trip}`. The provider must + # be the Project ID (for example, `sample-consumer-project`) of the Google + # Cloud Project of which the service account making this call is a member. + # @!attribute [rw] trip + # @return [::Google::Maps::FleetEngine::V1::Trip] + # Required. The Trip associated with the update. + # + # The following fields are maintained by the Fleet Engine. Do not update + # them using Trip.update. + # + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_traffic` + # * `current_route_segment_traffic_version` + # * `current_route_segment_version` + # * `dropoff_time` + # * `eta_to_next_waypoint` + # * `intermediate_destinations_version` + # * `last_location` + # * `name` + # * `number_of_passengers` + # * `pickup_time` + # * `remaining_distance_meters` + # * `remaining_time_to_first_waypoint` + # * `remaining_waypoints` + # * `remaining_waypoints_version` + # * `route` + # + # When you update the `Trip.vehicle_id` for a shared trip, you must supply + # the list of `Trip.vehicle_waypoints` to specify the order of the remaining + # waypoints, otherwise the order will be undetermined. + # + # When you specify `Trip.vehicle_waypoints`, the list must contain all + # the remaining waypoints of the vehicle's trips, with no extra waypoints. + # You must order these waypoints such that for a given trip, the pickup + # point is before intermediate destinations, and all intermediate + # destinations come before the drop-off point. An `EXCLUSIVE` trip's + # waypoints must not interleave with any other trips. + # The `trip_id`, `waypoint_type` and `location` fields are used, and all + # other TripWaypoint fields in `vehicle_waypoints` are ignored. + # + # To avoid a race condition for trips with multiple destinations, you + # should provide `Trip.intermediate_destinations_version` when updating + # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The + # `Trip.intermediate_destinations_version` passed must be consistent with + # Fleet Engine's version. If it isn't, the request fails. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The field mask indicating which fields in Trip to update. + # The `update_mask` must contain at least one field. + class UpdateTripRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SearchTrips request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle_id + # @return [::String] + # The vehicle associated with the trips in the request. If unspecified, the + # returned trips do not contain: + # + # * `current_route_segment` + # * `remaining_waypoints` + # * `remaining_distance_meters` + # * `eta_to_first_waypoint` + # @!attribute [rw] active_trips_only + # @return [::Boolean] + # If set to true, the response includes Trips that influence a driver's + # route. + # @!attribute [rw] page_size + # @return [::Integer] + # If not set, the server decides the number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # Set this to a value previously returned in the `SearchTripsResponse` to + # continue from previous results. + # @!attribute [rw] minimum_staleness + # @return [::Google::Protobuf::Duration] + # If specified, returns the trips that have not been updated after the time + # `(current - minimum_staleness)`. + class SearchTripsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SearchTrips response message. + # @!attribute [rw] trips + # @return [::Array<::Google::Maps::FleetEngine::V1::Trip>] + # The list of trips for the requested vehicle. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token in the SearchTripsRequest to page through list results. The + # API returns a trip list on each call, and when no more results remain the + # trip list is empty. + class SearchTripsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb new file mode 100644 index 000000000000..e5dd08d4fdac --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Trip metadata. + # @!attribute [r] name + # @return [::String] + # Output only. In the format "providers/\\{provider}/trips/\\{trip}" + # @!attribute [rw] vehicle_id + # @return [::String] + # ID of the vehicle making this trip. + # @!attribute [rw] trip_status + # @return [::Google::Maps::FleetEngine::V1::TripStatus] + # Current status of the trip. + # @!attribute [rw] trip_type + # @return [::Google::Maps::FleetEngine::V1::TripType] + # The type of the trip. + # @!attribute [rw] pickup_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Location where customer indicates they will be picked up. + # @!attribute [rw] actual_pickup_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual location when and where customer was picked up. + # This field is for provider to provide feedback on actual pickup + # information. + # @!attribute [rw] actual_pickup_arrival_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual time and location of the driver arrival at + # the pickup point. + # This field is for provider to provide feedback on actual arrival + # information at the pickup point. + # @!attribute [r] pickup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Either the estimated future time when the rider(s) will be + # picked up, or the actual time when they were picked up. + # @!attribute [rw] intermediate_destinations + # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] + # Intermediate stops in order that the trip requests (in addition + # to pickup and dropoff). Initially this will not be supported for shared + # trips. + # @!attribute [rw] intermediate_destinations_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the last time the `intermediate_destinations` was modified. + # Your server should cache this value and pass it in `UpdateTripRequest` + # when update `intermediate_destination_index` to ensure the + # `intermediate_destinations` is not changed. + # @!attribute [rw] intermediate_destination_index + # @return [::Integer] + # When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number + # between [0..N-1] indicating which intermediate destination the vehicle will + # cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a + # number between [0..N-1] indicating which intermediate destination the + # vehicle is at. The provider sets this value. If there are no + # `intermediate_destinations`, this field is ignored. + # @!attribute [rw] actual_intermediate_destination_arrival_points + # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] + # Input only. The actual time and location of the driver's arrival at + # an intermediate destination. + # This field is for provider to provide feedback on actual arrival + # information at intermediate destinations. + # @!attribute [rw] actual_intermediate_destinations + # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] + # Input only. The actual time and location when and where the customer was + # picked up from an intermediate destination. This field is for provider to + # provide feedback on actual pickup information at intermediate destinations. + # @!attribute [rw] dropoff_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Location where customer indicates they will be dropped off. + # @!attribute [rw] actual_dropoff_point + # @return [::Google::Maps::FleetEngine::V1::StopLocation] + # Input only. The actual time and location when and where customer was + # dropped off. This field is for provider to provide feedback on actual + # dropoff information. + # @!attribute [r] dropoff_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Either the estimated future time when the rider(s) will be + # dropped off at the final destination, or the actual time when they were + # dropped off. + # @!attribute [r] remaining_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # Output only. The full path from the current location to the dropoff point, + # inclusive. This path could include waypoints from other trips. + # @!attribute [rw] vehicle_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # This field supports manual ordering of the waypoints for the trip. It + # contains all of the remaining waypoints for the assigned vehicle, as well + # as the pickup and drop-off waypoints for this trip. If the trip hasn't been + # assigned to a vehicle, then Fleet Engine ignores this field. For privacy + # reasons, this field is only populated by the server on `UpdateTrip` and + # `CreateTrip` calls, NOT on `GetTrip` calls. + # @!attribute [r] route + # @return [::Array<::Google::Type::LatLng>] + # Output only. Anticipated route for this trip to the first entry in + # remaining_waypoints. Note that the first waypoint may belong to a different + # trip. + # @!attribute [r] current_route_segment + # @return [::String] + # Output only. An encoded path to the next waypoint. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. Decoding is not yet supported. + # @!attribute [r] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the route was modified. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_traffic + # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] + # Output only. Indicates the traffic conditions along the + # `current_route_segment` when they're available. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_traffic_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the `current_route_segment_traffic` + # was modified. + # + # Note: This field is intended only for use by the Driver SDK and Consumer + # SDK. + # @!attribute [r] current_route_segment_end_point + # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] + # Output only. The waypoint where `current_route_segment` ends. + # @!attribute [r] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Output only. The remaining driving distance in the `current_route_segment` + # field. The value is unspecified if the trip is not assigned to a vehicle, + # or the trip is completed or cancelled. + # @!attribute [r] eta_to_first_waypoint + # @return [::Google::Protobuf::Timestamp] + # Output only. The ETA to the next waypoint (the first entry in the + # `remaining_waypoints` field). The value is unspecified if the trip is not + # assigned to a vehicle, or the trip is inactive (completed or cancelled). + # @!attribute [r] remaining_time_to_first_waypoint + # @return [::Google::Protobuf::Duration] + # Output only. The duration from when the Trip data is returned to the time + # in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is + # not assigned to a vehicle, or the trip is inactive (completed or + # cancelled). + # @!attribute [r] remaining_waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time that `remaining_waypoints` was changed + # (a waypoint was added, removed, or changed). + # @!attribute [r] remaining_waypoints_route_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Indicates the last time the + # `remaining_waypoints.path_to_waypoint` and + # `remaining_waypoints.traffic_to_waypoint` were modified. Your client app + # should cache this value and pass it in `GetTripRequest` to ensure the + # paths and traffic for `remaining_waypoints` are only returned if updated. + # @!attribute [rw] number_of_passengers + # @return [::Integer] + # Immutable. Indicates the number of passengers on this trip and does not + # include the driver. A vehicle must have available capacity to be returned + # in a `SearchVehicles` response. + # @!attribute [r] last_location + # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] + # Output only. Indicates the last reported location of the vehicle along the + # route. + # @!attribute [r] last_location_snappable + # @return [::Boolean] + # Output only. Indicates whether the vehicle's `last_location` can be snapped + # to the current_route_segment. False if `last_location` or + # `current_route_segment` doesn't exist. + # It is computed by Fleet Engine. Any update from clients will be ignored. + # @!attribute [rw] view + # @return [::Google::Maps::FleetEngine::V1::TripView] + # The subset of Trip fields that are populated and how they should be + # interpreted. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] + # A list of custom Trip attributes. Each attribute must have a unique key. + class Trip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The actual location where a stop (pickup/dropoff) happened. + # @!attribute [rw] point + # @return [::Google::Type::LatLng] + # Required. Denotes the actual location. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates when the stop happened. + # @!attribute [rw] stop_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Input only. Deprecated. Use the timestamp field. + class StopLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of a trip indicating its progression. + module TripStatus + # Default, used for unspecified or unrecognized trip status. + UNKNOWN_TRIP_STATUS = 0 + + # Newly created trip. + NEW = 1 + + # The driver is on their way to the pickup point. + ENROUTE_TO_PICKUP = 2 + + # The driver has arrived at the pickup point. + ARRIVED_AT_PICKUP = 3 + + # The driver has arrived at an intermediate destination and is waiting for + # the rider. + ARRIVED_AT_INTERMEDIATE_DESTINATION = 7 + + # The driver is on their way to an intermediate destination + # (not the dropoff point). + ENROUTE_TO_INTERMEDIATE_DESTINATION = 8 + + # The driver has picked up the rider and is on their way to the + # next destination. + ENROUTE_TO_DROPOFF = 4 + + # The rider has been dropped off and the trip is complete. + COMPLETE = 5 + + # The trip was canceled prior to pickup by the driver, rider, or + # rideshare provider. + CANCELED = 6 + end + + # A set of values that indicate upon which platform the request was issued. + module BillingPlatformIdentifier + # Default. Used for unspecified platforms. + BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0 + + # The platform is a client server. + SERVER = 1 + + # The platform is a web browser. + WEB = 2 + + # The platform is an Android mobile device. + ANDROID = 3 + + # The platform is an IOS mobile device. + IOS = 4 + + # Other platforms that are not listed in this enumeration. + OTHERS = 5 + end + + # Selector for different sets of Trip fields in a `GetTrip` response. See + # [AIP-157](https://google.aip.dev/157) for context. Additional views are + # likely to be added. + module TripView + # The default value. For backwards-compatibility, the API will default to an + # SDK view. To ensure stability and support, customers are + # advised to select a `TripView` other than `SDK`. + TRIP_VIEW_UNSPECIFIED = 0 + + # Includes fields that may not be interpretable or supportable using + # publicly available libraries. + SDK = 1 + + # Trip fields are populated for the Journey Sharing use case. This view is + # intended for server-to-server communications. + JOURNEY_SHARING_V1S = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb new file mode 100644 index 000000000000..501bd43c50a3 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb @@ -0,0 +1,674 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # `CreateVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle_id + # @return [::String] + # Required. Unique Vehicle ID. + # Subject to the following restrictions: + # + # * Must be a valid Unicode string. + # * Limited to a maximum length of 64 characters. + # * Normalized according to [Unicode Normalization Form C] + # (http://www.unicode.org/reports/tr15/). + # * May not contain any of the following ASCII characters: '/', ':', '?', + # ',', or '#'. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. The Vehicle entity to create. When creating a Vehicle, the + # following fields are required: + # + # * `vehicleState` + # * `supportedTripTypes` + # * `maximumCapacity` + # * `vehicleType` + # + # When creating a Vehicle, the following fields are ignored: + # + # * `name` + # * `currentTrips` + # * `availableCapacity` + # * `current_route_segment` + # * `current_route_segment_end_point` + # * `current_route_segment_version` + # * `current_route_segment_traffic` + # * `route` + # * `waypoints` + # * `waypoints_version` + # * `remaining_distance_meters` + # * `remaining_time_seconds` + # * `eta_to_next_waypoint` + # * `navigation_status` + # + # All other fields are optional and used if provided. + class CreateVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `GetVehicle` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which + # `Vehicle.current_route_segment` is retrieved. + # If the route is unchanged since this timestamp, the `current_route_segment` + # field is not set in the response. If a minimum is unspecified, the + # `current_route_segment` is always retrieved. + # @!attribute [rw] waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` + # data is retrieved. If the waypoints are unchanged since this timestamp, the + # `vehicle.waypoints` data is not set in the response. If this field is + # unspecified, `vehicle.waypoints` is always retrieved. + class GetVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # Optional. The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + class DeleteVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicle request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format + # `providers/{provider}/vehicles/{vehicle}`. + # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, + # the following fields may not be updated as they are managed by the + # server. + # + # * `available_capacity` + # * `current_route_segment_version` + # * `current_trips` + # * `name` + # * `waypoints_version` + # + # If the `attributes` field is updated, **all** the vehicle's attributes are + # replaced with the attributes provided in the request. If you want to update + # only some attributes, see the `UpdateVehicleAttributes` method. + # + # Likewise, the `waypoints` field can be updated, but must contain all the + # waypoints currently on the vehicle, and no other waypoints. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A field mask indicating which fields of the `Vehicle` to update. + # At least one field name must be provided. + class UpdateVehicleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicleAttributes` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] name + # @return [::String] + # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Required. The vehicle attributes to update. Unmentioned attributes are not + # altered or removed. + class UpdateVehicleAttributesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateVehicleAttributes` response message. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Required. The updated full list of vehicle attributes, including new, + # altered, and untouched attributes. + class UpdateVehicleAttributesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `SearchVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] pickup_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # Required. The pickup point to search near. + # @!attribute [rw] dropoff_point + # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] + # The customer's intended dropoff location. The field is required if + # `trip_types` contains `TripType.SHARED`. + # @!attribute [rw] pickup_radius_meters + # @return [::Integer] + # Required. Defines the vehicle search radius around the pickup point. Only + # vehicles within the search radius will be returned. Value must be between + # 400 and 10000 meters (inclusive). + # @!attribute [rw] count + # @return [::Integer] + # Required. Specifies the maximum number of vehicles to return. The value + # must be between 1 and 50 (inclusive). + # @!attribute [rw] minimum_capacity + # @return [::Integer] + # Required. Specifies the number of passengers being considered for a trip. + # The value must be greater than or equal to one. The driver is not + # considered in the capacity value. + # @!attribute [rw] trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Required. Represents the type of proposed trip. Must include exactly one + # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only + # those vehicles that can support that trip type. + # @!attribute [rw] maximum_staleness + # @return [::Google::Protobuf::Duration] + # Restricts the search to only those vehicles that have sent location updates + # to Fleet Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If this field is not + # set, the server uses five minutes as the default value. + # @!attribute [rw] vehicle_types + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>] + # Required. Restricts the search to vehicles with one of the specified types. + # At least one vehicle type must be specified. VehicleTypes with a category + # of `UNKNOWN` are not allowed. + # @!attribute [rw] required_attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the search to only those vehicles with the specified attributes. + # This field is a conjunction/AND operation. A max of 50 required_attributes + # is allowed. This matches the maximum number of attributes allowed on a + # vehicle. + # @!attribute [rw] required_one_of_attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] + # Restricts the search to only those vehicles with at least one of + # the specified attributes in each `VehicleAttributeList`. Within each + # list, a vehicle must match at least one of the attributes. This field is an + # inclusive disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # @!attribute [rw] required_one_of_attribute_sets + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the search to only those vehicles with all the attributes in a + # `VehicleAttributeList`. Within each list, a + # vehicle must match all of the attributes. This field is a conjunction/AND + # operation in each `VehicleAttributeList` and inclusive disjunction/OR + # operation across the collection of `VehicleAttributeList`. + # @!attribute [rw] order_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # Required. Specifies the desired ordering criterion for results. + # @!attribute [rw] include_back_to_back + # @return [::Boolean] + # This indicates if vehicles with a single active trip are eligible for this + # search. This field is only used when `current_trips_present` is + # unspecified. When `current_trips_present` is unspecified and this field + # is `false`, vehicles with assigned trips are excluded from the search + # results. When `current_trips_present` is unspecified and this field is + # `true`, search results can include vehicles with one active trip that has a + # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, + # this field cannot be set to true. + # + # The default value is `false`. + # @!attribute [rw] trip_id + # @return [::String] + # Indicates the trip associated with this `SearchVehicleRequest`. + # @!attribute [rw] current_trips_present + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] + # This indicates if vehicles with active trips are eligible for this search. + # This must be set to something other than + # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when searching vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `minimum_capacity` or `vehicle_types`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + class SearchVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the order of the vehicle matches in the response. + module VehicleMatchOrder + # Default, used for unspecified or unrecognized vehicle matches order. + UNKNOWN_VEHICLE_MATCH_ORDER = 0 + + # Ascending order by vehicle driving time to the pickup point. + PICKUP_POINT_ETA = 1 + + # Ascending order by vehicle driving distance to the pickup point. + PICKUP_POINT_DISTANCE = 2 + + # Ascending order by vehicle driving time to the dropoff point. This order + # can only be used if the dropoff point is specified in the request. + DROPOFF_POINT_ETA = 3 + + # Ascending order by straight-line distance from the vehicle's last + # reported location to the pickup point. + PICKUP_POINT_STRAIGHT_DISTANCE = 4 + + # Ascending order by the configured match cost. Match cost is defined as a + # weighted calculation between straight-line distance and ETA. Weights are + # set with default values and can be modified per customer. Please contact + # Google support if these weights need to be modified for your project. + COST = 5 + end + + # Specifies the types of restrictions on a vehicle's current trips. + module CurrentTripsPresent + # The availability of vehicles with trips present is governed by the + # `include_back_to_back` field. + CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0 + + # Vehicles without trips can appear in search results. When this value is + # used, `include_back_to_back` cannot be `true`. + NONE = 1 + + # Vehicles with at most 5 current trips and 10 waypoints are included + # in the search results. When this value is used, `include_back_to_back` + # cannot be `true`. + ANY = 2 + end + end + + # `SearchVehicles` response message. + # @!attribute [rw] matches + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>] + # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered + # according to `SearchVehiclesRequest.order_by` field. + class SearchVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListVehicles` request message. + # @!attribute [rw] header + # @return [::Google::Maps::FleetEngine::V1::RequestHeader] + # The standard Fleet Engine request header. + # @!attribute [rw] parent + # @return [::String] + # Required. Must be in the format `providers/{provider}`. + # The provider must be the Project ID (for example, `sample-cloud-project`) + # of the Google Cloud Project of which the service account making + # this call is a member. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of vehicles to return. + # Default value: 100. + # @!attribute [rw] page_token + # @return [::String] + # The value of the `next_page_token` provided by a previous call to + # `ListVehicles` so that you can paginate through groups of vehicles. The + # value is undefined if the filter criteria of the request is not the same as + # the filter criteria for the previous call to `ListVehicles`. + # @!attribute [rw] minimum_capacity + # @return [::Google::Protobuf::Int32Value] + # Specifies the required minimum capacity of the vehicle. All vehicles + # returned will have a `maximum_capacity` greater than or equal to this + # value. If set, must be greater or equal to 0. + # @!attribute [rw] trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Restricts the response to vehicles that support at least one of the + # specified trip types. + # @!attribute [rw] maximum_staleness + # @return [::Google::Protobuf::Duration] + # Restricts the response to vehicles that have sent location updates to Fleet + # Engine within the specified duration. Stationary vehicles still + # transmitting their locations are not considered stale. If present, must be + # a valid positive duration. + # @!attribute [rw] vehicle_type_categories + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] + # Required. Restricts the response to vehicles with one of the specified type + # categories. `UNKNOWN` is not allowed. + # @!attribute [rw] required_attributes + # @return [::Array<::String>] + # Callers can form complex logical operations using any combination of the + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attribute_sets` fields. + # + # `required_attributes` is a list; `required_one_of_attributes` uses a + # message which allows a list of lists. In combination, the two fields allow + # the composition of this expression: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR + # ...) + # AND + # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR + # ...) + # ``` + # + # Restricts the response to vehicles with the specified attributes. This + # field is a conjunction/AND operation. A max of 50 required_attributes is + # allowed. This matches the maximum number of attributes allowed on a + # vehicle. Each repeated string should be of the format "key:value". + # @!attribute [rw] required_one_of_attributes + # @return [::Array<::String>] + # Restricts the response to vehicles with at least one of the specified + # attributes in each `VehicleAttributeList`. Within each list, a vehicle must + # match at least one of the attributes. This field is an inclusive + # disjunction/OR operation in each `VehicleAttributeList` and a + # conjunction/AND operation across the collection of `VehicleAttributeList`. + # Each repeated string should be of the format + # "key1:value1|key2:value2|key3:value3". + # @!attribute [rw] required_one_of_attribute_sets + # @return [::Array<::String>] + # `required_one_of_attribute_sets` provides additional functionality. + # + # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` + # uses a message which allows a list of lists, allowing expressions such as + # this one: + # + # ``` + # (required_attributes[0] AND required_attributes[1] AND ...) + # AND + # ( + # (required_one_of_attribute_sets[0][0] AND + # required_one_of_attribute_sets[0][1] AND + # ...) + # OR + # (required_one_of_attribute_sets[1][0] AND + # required_one_of_attribute_sets[1][1] AND + # ...) + # ) + # ``` + # + # Restricts the response to vehicles that match all the attributes in a + # `VehicleAttributeList`. Within each list, a vehicle must match all of the + # attributes. This field is a conjunction/AND operation in each + # `VehicleAttributeList` and inclusive disjunction/OR operation across the + # collection of `VehicleAttributeList`. Each repeated string should be of the + # format "key1:value1|key2:value2|key3:value3". + # @!attribute [rw] vehicle_state + # @return [::Google::Maps::FleetEngine::V1::VehicleState] + # Restricts the response to vehicles that have this vehicle state. + # @!attribute [rw] on_trip_only + # @return [::Boolean] + # Only return the vehicles with current trip(s). + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter query to apply when listing vehicles. See + # http://aip.dev/160 for examples of the filter syntax. + # + # This field is designed to replace the `required_attributes`, + # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. + # If a non-empty value is specified here, the following fields must be empty: + # `required_attributes`, `required_one_of_attributes`, and + # `required_one_of_attributes_sets`. + # + # This filter functions as an AND clause with other constraints, + # such as `vehicle_state` or `on_trip_only`. + # + # Note that the only queries supported are on vehicle attributes (for + # example, `attributes. = ` or `attributes. = AND + # attributes. = `). The maximum number of restrictions allowed + # in a filter query is 50. + # + # Also, all attributes are stored as strings, so the only supported + # comparisons against attributes are string comparisons. In order to compare + # against number or boolean values, the values must be explicitly quoted to + # be treated as strings (for example, `attributes. = "10"` or + # `attributes. = "true"`). + # @!attribute [rw] viewport + # @return [::Google::Geo::Type::Viewport] + # Optional. A filter that limits the vehicles returned to those whose last + # known location was in the rectangular area defined by the viewport. + class ListVehiclesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListVehicles` response message. + # @!attribute [rw] vehicles + # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>] + # Vehicles matching the criteria in the request. + # The maximum number of vehicles returned is determined by the `page_size` + # field in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of vehicles, or empty if there are no + # more vehicles that meet the request criteria. + # @!attribute [rw] total_size + # @return [::Integer] + # Required. Total number of vehicles matching the request criteria across all + # pages. + class ListVehiclesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes intermediate points along a route for a `VehicleMatch` in a + # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in + # all other endpoints. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # The location of this waypoint. + # @!attribute [rw] eta + # @return [::Google::Protobuf::Timestamp] + # The estimated time that the vehicle will arrive at this waypoint. + class Waypoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the vehicle and related estimates for a vehicle that match the + # points of active trips for the vehicle `SearchVehiclesRequest`. + # @!attribute [rw] vehicle + # @return [::Google::Maps::FleetEngine::V1::Vehicle] + # Required. A vehicle that matches the request. + # @!attribute [rw] vehicle_pickup_eta + # @return [::Google::Protobuf::Timestamp] + # The vehicle's driving ETA to the pickup point specified in the + # request. An empty value indicates a failure in calculating ETA for the + # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and + # this vehicle has an active trip, `vehicle_pickup_eta` includes the time + # required to complete the current active trip. + # @!attribute [rw] vehicle_pickup_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The distance from the Vehicle's current location to the pickup point + # specified in the request, including any intermediate pickup or dropoff + # points for existing trips. This distance comprises the calculated driving + # (route) distance, plus the straight line distance between the navigation + # end point and the requested pickup point. (The distance between the + # navigation end point and the requested pickup point is typically small.) An + # empty value indicates an error in calculating the distance. + # @!attribute [rw] vehicle_pickup_straight_line_distance_meters + # @return [::Google::Protobuf::Int32Value] + # Required. The straight-line distance between the vehicle and the pickup + # point specified in the request. + # @!attribute [rw] vehicle_dropoff_eta + # @return [::Google::Protobuf::Timestamp] + # The complete vehicle's driving ETA to the drop off point specified in the + # request. The ETA includes stopping at any waypoints before the + # `dropoff_point` specified in the request. The value will only be populated + # when a drop off point is specified in the request. An empty value indicates + # an error calculating the ETA. + # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The vehicle's driving distance (in meters) from the pickup point + # to the drop off point specified in the request. The distance is only + # between the two points and does not include the vehicle location or any + # other points that must be visited before the vehicle visits either the + # pickup point or dropoff point. The value will only be populated when a + # `dropoff_point` is specified in the request. An empty value indicates + # a failure in calculating the distance from the pickup to + # drop off point specified in the request. + # @!attribute [rw] trip_type + # @return [::Google::Maps::FleetEngine::V1::TripType] + # Required. The trip type of the request that was used to calculate the ETA + # to the pickup point. + # @!attribute [rw] vehicle_trips_waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>] + # The ordered list of waypoints used to calculate the ETA. The list + # includes vehicle location, the pickup points of active + # trips for the vehicle, and the pickup points provided in the + # request. An empty list indicates a failure in calculating ETA for the + # vehicle. + # @!attribute [rw] vehicle_match_type + # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType] + # Type of the vehicle match. + # @!attribute [rw] requested_ordered_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # The order requested for sorting vehicle matches. Equivalent to + # `ordered_by`. + # @!attribute [rw] ordered_by + # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] + # The order requested for sorting vehicle matches. Equivalent to + # `requested_ordered_by`. + class VehicleMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of vehicle match. + module VehicleMatchType + # Unknown vehicle match type + UNKNOWN = 0 + + # The vehicle currently has no trip assigned to it and can proceed to the + # pickup point. + EXCLUSIVE = 1 + + # The vehicle is currently assigned to a trip, but can proceed to the + # pickup point after completing the in-progress trip. ETA and distance + # calculations take the existing trip into account. + BACK_TO_BACK = 2 + + # The vehicle has sufficient capacity for a shared ride. + CARPOOL = 3 + + # The vehicle will finish its current, active trip before proceeding to the + # pickup point. ETA and distance calculations take the existing trip into + # account. + CARPOOL_BACK_TO_BACK = 4 + end + end + + # A list-of-lists datatype for vehicle attributes. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # A list of attributes in this collection. + class VehicleAttributeList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb new file mode 100644 index 000000000000..59703d2da0b2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb @@ -0,0 +1,365 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Maps + module FleetEngine + module V1 + # Vehicle metadata. + # @!attribute [r] name + # @return [::String] + # Output only. The unique name for this vehicle. + # The format is `providers/{provider}/vehicles/{vehicle}`. + # @!attribute [rw] vehicle_state + # @return [::Google::Maps::FleetEngine::V1::VehicleState] + # The vehicle state. + # @!attribute [rw] supported_trip_types + # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] + # Trip types supported by this vehicle. + # @!attribute [r] current_trips + # @return [::Array<::String>] + # Output only. List of `trip_id`'s for trips currently assigned to this + # vehicle. + # @!attribute [rw] last_location + # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] + # Last reported location of the vehicle. + # @!attribute [rw] past_locations + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleLocation>] + # Input only. Locations where this vehicle has been in the past that haven't + # yet been reported to Fleet Engine. This is used in `UpdateVehicleRequest` + # to record locations which were previously unable to be sent to the server. + # Typically this happens when the vehicle does not have internet + # connectivity. + # @!attribute [rw] maximum_capacity + # @return [::Integer] + # The total numbers of riders this vehicle can carry. The driver is not + # considered in this value. This value must be greater than or equal to one. + # @!attribute [rw] attributes + # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] + # List of vehicle attributes. A vehicle can have at most 100 + # attributes, and each attribute must have a unique key. + # @!attribute [rw] vehicle_type + # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType] + # Required. The type of this vehicle. Can be used to filter vehicles in + # `SearchVehicles` results. Also influences ETA and route calculations. + # @!attribute [rw] license_plate + # @return [::Google::Maps::FleetEngine::V1::LicensePlate] + # License plate information for the vehicle. + # @!attribute [rw] route + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] + # Deprecated: Use `Vehicle.waypoints` instead. + # @!attribute [rw] current_route_segment + # @return [::String] + # The polyline specifying the route the driver app intends to take to + # the next waypoint. This list is also returned in + # `Trip.current_route_segment` for all active trips assigned to the vehicle. + # + # Note: This field is intended only for use by the Driver SDK. Decoding is + # not yet supported. + # @!attribute [rw] current_route_segment_traffic + # @return [::Google::Maps::FleetEngine::V1::TrafficPolylineData] + # Input only. Fleet Engine uses this information to improve journey sharing. + # Note: This field is intended only for use by the Driver SDK. + # @!attribute [r] current_route_segment_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when `current_route_segment` was set. It can be stored by + # the client and passed in future `GetVehicle` requests to prevent returning + # routes that haven't changed. + # @!attribute [rw] current_route_segment_end_point + # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] + # The waypoint where `current_route_segment` ends. This can be supplied by + # drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint + # `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet + # Engine will then do its best to interpolate to an actual waypoint if it is + # not fully specified. This field is ignored in `UpdateVehicle` calls unless + # `current_route_segment` is also specified. + # @!attribute [rw] remaining_distance_meters + # @return [::Google::Protobuf::Int32Value] + # The remaining driving distance for the `current_route_segment`. + # This value is also returned in `Trip.remaining_distance_meters` for all + # active trips assigned to the vehicle. The value is unspecified if the + # `current_route_segment` field is empty. + # @!attribute [rw] eta_to_first_waypoint + # @return [::Google::Protobuf::Timestamp] + # The ETA to the first entry in the `waypoints` field. The value is + # unspecified if the `waypoints` field is empty or the + # `Vehicle.current_route_segment` field is empty. + # + # When updating a vehicle, `remaining_time_seconds` takes precedence over + # `eta_to_first_waypoint` in the same request. + # @!attribute [rw] remaining_time_seconds + # @return [::Google::Protobuf::Int32Value] + # Input only. The remaining driving time for the `current_route_segment`. The + # value is unspecified if the `waypoints` field is empty or the + # `Vehicle.current_route_segment` field is empty. This value should match + # `eta_to_first_waypoint` - `current_time` if all parties are using the same + # clock. + # + # When updating a vehicle, `remaining_time_seconds` takes precedence over + # `eta_to_first_waypoint` in the same request. + # @!attribute [rw] waypoints + # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] + # The remaining waypoints assigned to this Vehicle. + # @!attribute [r] waypoints_version + # @return [::Google::Protobuf::Timestamp] + # Output only. Last time the `waypoints` field was updated. Clients should + # cache this value and pass it in `GetVehicleRequest` to ensure the + # `waypoints` field is only returned if it is updated. + # @!attribute [rw] back_to_back_enabled + # @return [::Boolean] + # Indicates if the driver accepts back-to-back trips. If `true`, + # `SearchVehicles` may include the vehicle even if it is currently assigned + # to a trip. The default value is `false`. + # @!attribute [rw] navigation_status + # @return [::Google::Maps::FleetEngine::V1::NavigationStatus] + # The vehicle's navigation status. + # @!attribute [rw] device_settings + # @return [::Google::Maps::FleetEngine::V1::DeviceSettings] + # Input only. Information about settings in the mobile device being used by + # the driver. + class Vehicle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of vehicle. + # @!attribute [rw] category + # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category] + # Vehicle type category + class VehicleType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Vehicle type categories + module Category + # Default, used for unspecified or unrecognized vehicle categories. + UNKNOWN = 0 + + # An automobile. + AUTO = 1 + + # Any vehicle that acts as a taxi (typically licensed or regulated). + TAXI = 2 + + # Generally, a vehicle with a large storage capacity. + TRUCK = 3 + + # A motorcycle, moped, or other two-wheeled vehicle + TWO_WHEELER = 4 + + # Human-powered transport. + BICYCLE = 5 + + # A human transporter, typically walking or running, traveling along + # pedestrian pathways. + PEDESTRIAN = 6 + end + end + end + + # Information about the device's battery. + # @!attribute [rw] battery_status + # @return [::Google::Maps::FleetEngine::V1::BatteryStatus] + # Status of the battery, whether full or charging etc. + # @!attribute [rw] power_source + # @return [::Google::Maps::FleetEngine::V1::PowerSource] + # Status of battery power source. + # @!attribute [rw] battery_percentage + # @return [::Float] + # Current battery percentage [0-100]. + class BatteryInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about various settings on the mobile device. + # @!attribute [rw] location_power_save_mode + # @return [::Google::Maps::FleetEngine::V1::LocationPowerSaveMode] + # How location features are set to behave on the device when battery saver is + # on. + # @!attribute [rw] is_power_save_mode + # @return [::Boolean] + # Whether the device is currently in power save mode. + # @!attribute [rw] is_interactive + # @return [::Boolean] + # Whether the device is in an interactive state. + # @!attribute [rw] battery_info + # @return [::Google::Maps::FleetEngine::V1::BatteryInfo] + # Information about the battery state. + class DeviceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The license plate information of the Vehicle. To avoid storing + # personally-identifiable information, only the minimum information + # about the license plate is stored as part of the entity. + # @!attribute [rw] country_code + # @return [::String] + # Required. CLDR Country/Region Code. For example, `US` for United States, + # or `IN` for India. + # @!attribute [rw] last_character + # @return [::String] + # The last digit of the license plate or "-1" to denote no numeric value + # is present in the license plate. + # + # * "ABC 1234" -> "4" + # * "AB 123 CD" -> "3" + # * "ABCDEF" -> "-1" + class LicensePlate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how clients should color one portion of the polyline along the + # route. + # @!attribute [rw] road_stretch + # @return [::Array<::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch>] + # Optional. Road stretches that should be rendered along the polyline. + # Stretches are guaranteed to not overlap, and do not necessarily span the + # full route. + # + # In the absence of a road stretch to style, the client should apply the + # default for the route. + class VisualTrafficReportPolylineRendering + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # One road stretch that should be rendered. + # @!attribute [rw] style + # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch::Style] + # Required. The style to apply. + # @!attribute [rw] offset_meters + # @return [::Integer] + # Required. The style should be applied between `[offset_meters, + # offset_meters + length_meters)`. + # @!attribute [rw] length_meters + # @return [::Integer] + # Required. The length of the path where to apply the style. + class RoadStretch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The traffic style, indicating traffic speed. + module Style + # No style selected. + STYLE_UNSPECIFIED = 0 + + # Traffic is slowing down. + SLOWER_TRAFFIC = 1 + + # There is a traffic jam. + TRAFFIC_JAM = 2 + end + end + end + + # Traffic conditions along the expected vehicle route. + # @!attribute [rw] traffic_rendering + # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering] + # A polyline rendering of how fast traffic is for all regions along + # one stretch of a customer ride. + class TrafficPolylineData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of a `Vehicle`. + module VehicleState + # Default, used for unspecified or unrecognized vehicle states. + UNKNOWN_VEHICLE_STATE = 0 + + # The vehicle is not accepting new trips. Note: the vehicle may continue to + # operate in this state while completing a trip assigned to it. + OFFLINE = 1 + + # The vehicle is accepting new trips. + ONLINE = 2 + end + + # How location features are configured to behave on the mobile device when the + # devices "battery saver" feature is on. + # (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode()) + module LocationPowerSaveMode + # Undefined LocationPowerSaveMode + UNKNOWN_LOCATION_POWER_SAVE_MODE = 0 + + # Either the location providers shouldn't be affected by battery saver, or + # battery saver is off. + LOCATION_MODE_NO_CHANGE = 1 + + # The GPS based location provider should be disabled when battery saver is on + # and the device is non-interactive. + LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2 + + # All location providers should be disabled when battery saver is on and the + # device is non-interactive. + LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3 + + # All the location providers will be kept available, but location fixes + # should only be provided to foreground apps. + LOCATION_MODE_FOREGROUND_ONLY = 4 + + # Location will not be turned off, but LocationManager will throttle all + # requests to providers when the device is non-interactive. + LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5 + end + + # Status of the battery, whether full or charging etc. + module BatteryStatus + # Battery status unknown. + UNKNOWN_BATTERY_STATUS = 0 + + # Battery is being charged. + BATTERY_STATUS_CHARGING = 1 + + # Battery is discharging. + BATTERY_STATUS_DISCHARGING = 2 + + # Battery is full. + BATTERY_STATUS_FULL = 3 + + # Battery is not charging. + BATTERY_STATUS_NOT_CHARGING = 4 + + # Battery is low on power. + BATTERY_STATUS_POWER_LOW = 5 + end + + # Type of the charger being used to charge the battery. + module PowerSource + # Power source unknown. + UNKNOWN_POWER_SOURCE = 0 + + # Power source is an AC charger. + POWER_SOURCE_AC = 1 + + # Power source is a USB port. + POWER_SOURCE_USB = 2 + + # Power source is wireless. + POWER_SOURCE_WIRELESS = 3 + + # Battery is unplugged. + POWER_SOURCE_UNPLUGGED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..593314b4cde5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # An object that represents a latitude/longitude pair. This is expressed as a + # pair of doubles to represent degrees latitude and degrees longitude. Unless + # specified otherwise, this object must conform to the + # + # WGS84 standard. Values must be within normalized ranges. + # @!attribute [rw] latitude + # @return [::Float] + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # @!attribute [rw] longitude + # @return [::Float] + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + class LatLng + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile new file mode 100644 index 000000000000..1a35fc6011c5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1", path: "../" +else + gem "google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json new file mode 100644 index 000000000000..a69f797d658e --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-maps-fleet_engine-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "maps.fleetengine.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "fleetengine_v1_generated_TripService_CreateTrip_sync", + "title": "Snippet for the create_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#create_trip.", + "file": "trip_service/create_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#create_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::CreateTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "CreateTrip", + "full_name": "maps.fleetengine.v1.TripService.CreateTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_GetTrip_sync", + "title": "Snippet for the get_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#get_trip.", + "file": "trip_service/get_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#get_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::GetTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "GetTrip", + "full_name": "maps.fleetengine.v1.TripService.GetTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_DeleteTrip_sync", + "title": "Snippet for the delete_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#delete_trip.", + "file": "trip_service/delete_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#delete_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::DeleteTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "DeleteTrip", + "full_name": "maps.fleetengine.v1.TripService.DeleteTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_ReportBillableTrip_sync", + "title": "Snippet for the report_billable_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip.", + "file": "trip_service/report_billable_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "report_billable_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::ReportBillableTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "ReportBillableTrip", + "full_name": "maps.fleetengine.v1.TripService.ReportBillableTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_SearchTrips_sync", + "title": "Snippet for the search_trips call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#search_trips.", + "file": "trip_service/search_trips.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_trips", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#search_trips", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::SearchTripsRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::SearchTripsResponse", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "SearchTrips", + "full_name": "maps.fleetengine.v1.TripService.SearchTrips", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_TripService_UpdateTrip_sync", + "title": "Snippet for the update_trip call in the TripService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#update_trip.", + "file": "trip_service/update_trip.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_trip", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#update_trip", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateTripRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Trip", + "client": { + "short_name": "TripService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" + }, + "method": { + "short_name": "UpdateTrip", + "full_name": "maps.fleetengine.v1.TripService.UpdateTrip", + "service": { + "short_name": "TripService", + "full_name": "maps.fleetengine.v1.TripService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_CreateVehicle_sync", + "title": "Snippet for the create_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle.", + "file": "vehicle_service/create_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::CreateVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "CreateVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.CreateVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_GetVehicle_sync", + "title": "Snippet for the get_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle.", + "file": "vehicle_service/get_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::GetVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "GetVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.GetVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_DeleteVehicle_sync", + "title": "Snippet for the delete_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle.", + "file": "vehicle_service/delete_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::DeleteVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "DeleteVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.DeleteVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicle_sync", + "title": "Snippet for the update_vehicle call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle.", + "file": "vehicle_service/update_vehicle.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vehicle", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "UpdateVehicle", + "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicle", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync", + "title": "Snippet for the update_vehicle_attributes call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes.", + "file": "vehicle_service/update_vehicle_attributes.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vehicle_attributes", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "UpdateVehicleAttributes", + "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicleAttributes", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_ListVehicles_sync", + "title": "Snippet for the list_vehicles call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles.", + "file": "vehicle_service/list_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vehicles", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::ListVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::ListVehiclesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "ListVehicles", + "full_name": "maps.fleetengine.v1.VehicleService.ListVehicles", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "fleetengine_v1_generated_VehicleService_SearchVehicles_sync", + "title": "Snippet for the search_vehicles call in the VehicleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles.", + "file": "vehicle_service/search_vehicles.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_vehicles", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles", + "async": false, + "parameters": [ + { + "type": "::Google::Maps::FleetEngine::V1::SearchVehiclesRequest", + "name": "request" + } + ], + "result_type": "::Google::Maps::FleetEngine::V1::SearchVehiclesResponse", + "client": { + "short_name": "VehicleService::Client", + "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" + }, + "method": { + "short_name": "SearchVehicles", + "full_name": "maps.fleetengine.v1.VehicleService.SearchVehicles", + "service": { + "short_name": "VehicleService", + "full_name": "maps.fleetengine.v1.VehicleService" + } + } + }, + "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-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb new file mode 100644 index 000000000000..471ee490d00d --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_CreateTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the create_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#create_trip. +# +def create_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::CreateTripRequest.new + + # Call the create_trip method. + result = client.create_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_CreateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb new file mode 100644 index 000000000000..892398e76959 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_DeleteTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the delete_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#delete_trip. +# +def delete_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new + + # Call the delete_trip method. + result = client.delete_trip request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_TripService_DeleteTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb new file mode 100644 index 000000000000..d02ae4f6720c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_GetTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the get_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#get_trip. +# +def get_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::GetTripRequest.new + + # Call the get_trip method. + result = client.get_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_GetTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb new file mode 100644 index 000000000000..66c560dccfb5 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_ReportBillableTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the report_billable_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip. +# +def report_billable_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new + + # Call the report_billable_trip method. + result = client.report_billable_trip request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_TripService_ReportBillableTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb new file mode 100644 index 000000000000..213ca35edfd8 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_SearchTrips_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the search_trips call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#search_trips. +# +def search_trips + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new + + # Call the search_trips method. + result = client.search_trips request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. + p item + end +end +# [END fleetengine_v1_generated_TripService_SearchTrips_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb new file mode 100644 index 000000000000..caca64f14dad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_TripService_UpdateTrip_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_trip call in the TripService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::TripService::Client#update_trip. +# +def update_trip + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::TripService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new + + # Call the update_trip method. + result = client.update_trip request + + # The returned object is of type Google::Maps::FleetEngine::V1::Trip. + p result +end +# [END fleetengine_v1_generated_TripService_UpdateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb new file mode 100644 index 000000000000..70db086501d6 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_CreateVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the create_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle. +# +def create_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new + + # Call the create_vehicle method. + result = client.create_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_CreateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb new file mode 100644 index 000000000000..c040d402cb0b --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the delete_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle. +# +def delete_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new + + # Call the delete_vehicle method. + result = client.delete_vehicle request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb new file mode 100644 index 000000000000..4872490fa433 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_GetVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the get_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle. +# +def get_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new + + # Call the get_vehicle method. + result = client.get_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_GetVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb new file mode 100644 index 000000000000..1119502e68a1 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_ListVehicles_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the list_vehicles call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles. +# +def list_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new + + # Call the list_vehicles method. + result = client.list_vehicles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. + p item + end +end +# [END fleetengine_v1_generated_VehicleService_ListVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb new file mode 100644 index 000000000000..e28a620bb8ef --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_SearchVehicles_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the search_vehicles call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles. +# +def search_vehicles + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new + + # Call the search_vehicles method. + result = client.search_vehicles request + + # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. + p result +end +# [END fleetengine_v1_generated_VehicleService_SearchVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb new file mode 100644 index 000000000000..87e5b21b85ad --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_vehicle call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle. +# +def update_vehicle + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new + + # Call the update_vehicle method. + result = client.update_vehicle request + + # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. + p result +end +# [END fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb new file mode 100644 index 000000000000..abf97493f162 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] +require "google/maps/fleet_engine/v1" + +## +# Snippet for the update_vehicle_attributes call in the VehicleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes. +# +def update_vehicle_attributes + # Create a client object. The client can be reused for multiple calls. + client = Google::Maps::FleetEngine::V1::VehicleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new + + # Call the update_vehicle_attributes method. + result = client.update_vehicle_attributes request + + # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. + p result +end +# [END fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb new file mode 100644 index 000000000000..f1ddb3264a50 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/trip_service" + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.trip_path provider: "value0", trip: "value1" + assert_equal "providers/value0/trips/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb new file mode 100644 index 000000000000..a6042f765747 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service/rest" + + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + trip_id = "hello world" + trip = {} + + create_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_create_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_trip_client_stub.call_count + end + end + end + + def test_get_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + view = :TRIP_VIEW_UNSPECIFIED + current_route_segment_version = {} + remaining_waypoints_version = {} + route_format_type = :UNKNOWN_FORMAT_TYPE + current_route_segment_traffic_version = {} + remaining_waypoints_route_version = {} + + get_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_get_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_trip_client_stub.call_count + end + end + end + + def test_delete_trip + # 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. + header = {} + name = "hello world" + + delete_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_delete_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_trip({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_trip header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_trip({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_trip_client_stub.call_count + end + end + end + + def test_report_billable_trip + # 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" + country_code = "hello world" + platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + related_ids = ["hello world"] + solution_type = :SOLUTION_TYPE_UNSPECIFIED + + report_billable_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_report_billable_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, report_billable_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, report_billable_trip_client_stub.call_count + end + end + end + + def test_search_trips + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + active_trips_only = true + page_size = 42 + page_token = "hello world" + minimum_staleness = {} + + search_trips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_search_trips_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_trips_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_trips_client_stub.call_count + end + end + end + + def test_update_trip + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Trip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + trip = {} + update_mask = {} + + update_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_update_trip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb new file mode 100644 index 000000000000..38356c41018f --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/v1/trip_api_pb" +require "google/maps/fleet_engine/v1/trip_service" + +class ::Google::Maps::FleetEngine::V1::TripService::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_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + trip_id = "hello world" + trip = {} + + create_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::CreateTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["trip_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_trip_client_stub.call_rpc_count + end + end + + def test_get_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + view = :TRIP_VIEW_UNSPECIFIED + current_route_segment_version = {} + remaining_waypoints_version = {} + route_format_type = :UNKNOWN_FORMAT_TYPE + current_route_segment_traffic_version = {} + remaining_waypoints_route_version = {} + + get_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::GetTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal :TRIP_VIEW_UNSPECIFIED, request["view"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_version"] + assert_equal :UNKNOWN_FORMAT_TYPE, request["route_format_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_traffic_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_route_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_trip_client_stub.call_rpc_count + end + end + + def test_delete_trip + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + delete_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_trip({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_trip header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_trip({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, 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_trip_client_stub.call_rpc_count + end + end + + def test_report_billable_trip + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + country_code = "hello world" + platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + related_ids = ["hello world"] + solution_type = :SOLUTION_TYPE_UNSPECIFIED + + report_billable_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :report_billable_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["country_code"] + assert_equal :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED, request["platform"] + assert_equal ["hello world"], request["related_ids"] + assert_equal :SOLUTION_TYPE_UNSPECIFIED, request["solution_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, report_billable_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, report_billable_trip_client_stub.call_rpc_count + end + end + + def test_search_trips + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + active_trips_only = true + page_size = 42 + page_token = "hello world" + minimum_staleness = {} + + search_trips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_trips, name + assert_kind_of ::Google::Maps::FleetEngine::V1::SearchTripsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vehicle_id"] + assert_equal true, request["active_trips_only"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["minimum_staleness"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_trips_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_trips_client_stub.call_rpc_count + end + end + + def test_update_trip + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + trip = {} + update_mask = {} + + update_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_trip, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateTripRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_trip_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::V1::TripService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb new file mode 100644 index 000000000000..104283f54a4c --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/vehicle_service" + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vehicle_path provider: "value0", vehicle: "value1" + assert_equal "providers/value0/vehicles/value1", path + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb new file mode 100644 index 000000000000..e5e9ed6215e7 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service/rest" + + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + vehicle = {} + + create_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_create_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_vehicle_client_stub.call_count + end + end + end + + def test_get_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + current_route_segment_version = {} + waypoints_version = {} + + get_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_get_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vehicle_client_stub.call_count + end + end + end + + def test_delete_vehicle + # 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. + header = {} + name = "hello world" + + delete_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_delete_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_vehicle({ header: header, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_vehicle header: header, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_vehicle({ header: header, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_vehicle_client_stub.call_count + end + end + end + + def test_update_vehicle + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + vehicle = {} + update_mask = {} + + update_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vehicle_client_stub.call_count + end + end + end + + def test_update_vehicle_attributes + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + attributes = [{}] + + update_vehicle_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_attributes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vehicle_attributes_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_vehicle_attributes header: header, name: name, attributes: attributes do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vehicle_attributes_client_stub.call_count + end + end + end + + def test_list_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + minimum_capacity = {} + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_type_categories = [:UNKNOWN] + required_attributes = ["hello world"] + required_one_of_attributes = ["hello world"] + required_one_of_attribute_sets = ["hello world"] + vehicle_state = :UNKNOWN_VEHICLE_STATE + on_trip_only = true + filter = "hello world" + viewport = {} + + list_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_list_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_vehicles_client_stub.call_count + end + end + end + + def test_search_vehicles + # Create test objects. + client_result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + pickup_point = {} + dropoff_point = {} + pickup_radius_meters = 42 + count = 42 + minimum_capacity = 42 + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_types = [{}] + required_attributes = [{}] + required_one_of_attributes = [{}] + required_one_of_attribute_sets = [{}] + order_by = :UNKNOWN_VEHICLE_MATCH_ORDER + include_back_to_back = true + trip_id = "hello world" + current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED + filter = "hello world" + + search_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_search_vehicles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb new file mode 100644 index 000000000000..f20a91100c3a --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb @@ -0,0 +1,601 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/maps/fleetengine/v1/vehicle_api_pb" +require "google/maps/fleet_engine/v1/vehicle_service" + +class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + vehicle_id = "hello world" + vehicle = {} + + create_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vehicle_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_vehicle_client_stub.call_rpc_count + end + end + + def test_get_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + current_route_segment_version = {} + waypoints_version = {} + + get_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::GetVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["waypoints_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_vehicle_client_stub.call_rpc_count + end + end + + def test_delete_vehicle + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + + delete_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_vehicle({ header: header, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_vehicle header: header, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_vehicle({ header: header, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, 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_vehicle_client_stub.call_rpc_count + end + end + + def test_update_vehicle + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + vehicle = {} + update_mask = {} + + update_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vehicle, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vehicle_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle_client_stub.call_rpc_count + end + end + + def test_update_vehicle_attributes + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + name = "hello world" + attributes = [{}] + + update_vehicle_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vehicle_attributes, name + assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["name"] + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["attributes"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vehicle_attributes_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_vehicle_attributes header: header, name: name, attributes: attributes do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_vehicle_attributes_client_stub.call_rpc_count + end + end + + def test_list_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + page_size = 42 + page_token = "hello world" + minimum_capacity = {} + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_type_categories = [:UNKNOWN] + required_attributes = ["hello world"] + required_one_of_attributes = ["hello world"] + required_one_of_attribute_sets = ["hello world"] + vehicle_state = :UNKNOWN_VEHICLE_STATE + on_trip_only = true + filter = "hello world" + viewport = {} + + list_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["minimum_capacity"] + assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] + assert_equal [:UNKNOWN], request["vehicle_type_categories"] + assert_equal ["hello world"], request["required_attributes"] + assert_equal ["hello world"], request["required_one_of_attributes"] + assert_equal ["hello world"], request["required_one_of_attribute_sets"] + assert_equal :UNKNOWN_VEHICLE_STATE, request["vehicle_state"] + assert_equal true, request["on_trip_only"] + assert_equal "hello world", request["filter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_vehicles_client_stub.call_rpc_count + end + end + + def test_search_vehicles + # Create GRPC objects. + grpc_response = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + header = {} + parent = "hello world" + pickup_point = {} + dropoff_point = {} + pickup_radius_meters = 42 + count = 42 + minimum_capacity = 42 + trip_types = [:UNKNOWN_TRIP_TYPE] + maximum_staleness = {} + vehicle_types = [{}] + required_attributes = [{}] + required_one_of_attributes = [{}] + required_one_of_attribute_sets = [{}] + order_by = :UNKNOWN_VEHICLE_MATCH_ORDER + include_back_to_back = true + trip_id = "hello world" + current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED + filter = "hello world" + + search_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_vehicles, name + assert_kind_of ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["pickup_point"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["dropoff_point"] + assert_equal 42, request["pickup_radius_meters"] + assert_equal 42, request["count"] + assert_equal 42, request["minimum_capacity"] + assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] + assert_kind_of ::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, request["vehicle_types"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["required_attributes"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attributes"].first + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attribute_sets"].first + assert_equal :UNKNOWN_VEHICLE_MATCH_ORDER, request["order_by"] + assert_equal true, request["include_back_to_back"] + assert_equal "hello world", request["trip_id"] + assert_equal :CURRENT_TRIPS_PRESENT_UNSPECIFIED, request["current_trips_present"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_vehicles_client_stub do + # Create client + c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_vehicles_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-css-v1/.gitignore b/owl-bot-staging/google-shopping-css-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json new file mode 100644 index 000000000000..4ce57214d802 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "css.googleapis.com", + "api_shortname": "css", + "client_documentation": "https://rubydoc.info/gems/google-shopping-css-v1", + "distribution_name": "google-shopping-css-v1", + "is_cloud": false, + "language": "ruby", + "name": "css", + "name_pretty": "CSS V1 API", + "product_documentation": "https://developers.google.com/comparison-shopping-services/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/comparison-shopping-services/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml new file mode 100644 index 000000000000..b53d398f0a64 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-css-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-shopping-css-v1.rb" diff --git a/owl-bot-staging/google-shopping-css-v1/.toys.rb b/owl-bot-staging/google-shopping-css-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.yardopts b/owl-bot-staging/google-shopping-css-v1/.yardopts new file mode 100644 index 000000000000..f293265f462f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="CSS 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-shopping-css-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..bd124d2e6f59 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-css-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-shopping-css-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/shopping/css/v1" + +client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/css/v1" + +::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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/shopping/css/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-css-v1/Gemfile b/owl-bot-staging/google-shopping-css-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-css-v1/LICENSE.md b/owl-bot-staging/google-shopping-css-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/README.md b/owl-bot-staging/google-shopping-css-v1/README.md new file mode 100644 index 000000000000..d415042608c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the CSS V1 API + +Programmatically manage your Comparison Shopping Service (CSS) account data at scale. + +Programmatically manage your Comparison Shopping Service (CSS) account data at scale. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the CSS V1 API. Most users should consider using +the main client gem, +[google-shopping-css](https://rubygems.org/gems/google-shopping-css). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-css-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/css.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/css/v1" + +client = ::Google::Shopping::Css::V1::AccountsService::Client.new +request = ::Google::Shopping::Css::V1::ListChildAccountsRequest.new # (request fields as keyword arguments...) +response = client.list_child_accounts request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-css-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/comparison-shopping-services/api) +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/shopping/css/v1" +require "logger" + +client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-css`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-css-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-shopping-css`. +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-shopping-css-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-shopping-css-v1/Rakefile b/owl-bot-staging/google-shopping-css-v1/Rakefile new file mode 100644 index 000000000000..635d913938d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-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/shopping/css/v1/accounts_service/credentials" + ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-css-v1" + header "google-shopping-css-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-css-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json new file mode 100644 index 000000000000..752bb921cc5e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json @@ -0,0 +1,119 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.css.v1", + "libraryPackage": "::Google::Shopping::Css::V1", + "services": { + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::AccountsService::Client", + "rpcs": { + "ListChildAccounts": { + "methods": [ + "list_child_accounts" + ] + }, + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "UpdateLabels": { + "methods": [ + "update_labels" + ] + } + } + } + } + }, + "AccountLabelsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::AccountLabelsService::Client", + "rpcs": { + "ListAccountLabels": { + "methods": [ + "list_account_labels" + ] + }, + "CreateAccountLabel": { + "methods": [ + "create_account_label" + ] + }, + "UpdateAccountLabel": { + "methods": [ + "update_account_label" + ] + }, + "DeleteAccountLabel": { + "methods": [ + "delete_account_label" + ] + } + } + } + } + }, + "CssProductInputsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::CssProductInputsService::Client", + "rpcs": { + "InsertCssProductInput": { + "methods": [ + "insert_css_product_input" + ] + }, + "UpdateCssProductInput": { + "methods": [ + "update_css_product_input" + ] + }, + "DeleteCssProductInput": { + "methods": [ + "delete_css_product_input" + ] + } + } + } + } + }, + "CssProductsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::CssProductsService::Client", + "rpcs": { + "GetCssProduct": { + "methods": [ + "get_css_product" + ] + }, + "ListCssProducts": { + "methods": [ + "list_css_products" + ] + } + } + } + } + }, + "QuotaService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Css::V1::QuotaService::Client", + "rpcs": { + "ListQuotaGroups": { + "methods": [ + "list_quota_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec new file mode 100644 index 000000000000..691a6b20a1da --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/css/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-css-v1" + gem.version = Google::Shopping::Css::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details." + gem.summary = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb new file mode 100644 index 000000000000..a93e9af0be45 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-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/shopping/css/v1" diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb new file mode 100644 index 000000000000..d1249eab068b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_service" +require "google/shopping/css/v1/account_labels_service" +require "google/shopping/css/v1/css_product_inputs_service" +require "google/shopping/css/v1/css_products_service" +require "google/shopping/css/v1/quota_service" +require "google/shopping/css/v1/version" + +module Google + module Shopping + module Css + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/css/v1" + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/css/v1" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/css/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb new file mode 100644 index 000000000000..bd9585d09cc4 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" + +require "google/shopping/css/v1/account_labels_service/credentials" +require "google/shopping/css/v1/account_labels_service/paths" +require "google/shopping/css/v1/account_labels_service/client" +require "google/shopping/css/v1/account_labels_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Manages Merchant Center and CSS accounts labels. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/account_labels_service" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/account_labels_service/rest" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + module AccountLabelsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_labels_service", "helpers.rb" +require "google/shopping/css/v1/account_labels_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb new file mode 100644 index 000000000000..f12cbcd80856 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb @@ -0,0 +1,785 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/accounts_labels_pb" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + ## + # Client for the AccountLabelsService service. + # + # Manages Merchant Center and CSS accounts labels. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_labels_service_stub + + ## + # Configure the AccountLabelsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLabelsService clients + # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_account_labels.timeout = 60.0 + default_config.rpcs.list_account_labels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_account_label.timeout = 60.0 + + default_config.rpcs.update_account_label.timeout = 60.0 + + default_config.rpcs.delete_account_label.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLabelsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @account_labels_service_stub.universe_domain + end + + ## + # Create a new AccountLabelsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLabelsService 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/shopping/css/v1/accounts_labels_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 + + @account_labels_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::AccountLabelsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @account_labels_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 + @account_labels_service_stub.logger + end + + # Service calls + + ## + # Lists the labels owned by an account. + # + # @overload list_account_labels(request, options = nil) + # Pass arguments to `list_account_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + # + # # Call the list_account_labels method. + # result = client.list_account_labels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + # p item + # end + # + def list_account_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :list_account_labels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new label, not assigned to any account. + # + # @overload create_account_label(request, options = nil) + # Pass arguments to `create_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_account_label(parent: nil, account_label: nil) + # Pass arguments to `create_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The label to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + # + # # Call the create_account_label method. + # result = client.create_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def create_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :create_account_label, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a label. + # + # @overload update_account_label(request, options = nil) + # Pass arguments to `update_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_label(account_label: nil) + # Pass arguments to `update_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The updated label. All fields must be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + # + # # Call the update_account_label method. + # result = client.update_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def update_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_label&.name + header_params["account_label.name"] = request.account_label.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :update_account_label, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a label and removes it from all accounts to which it was assigned. + # + # @overload delete_account_label(request, options = nil) + # Pass arguments to `delete_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account_label(name: nil) + # Pass arguments to `delete_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + # + # # Call the delete_account_label method. + # result = client.delete_account_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.call_rpc :delete_account_label, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountLabelsService API. + # + # This class represents the configuration for AccountLabelsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountLabelsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_account_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_labels + ## + # RPC-specific configuration for `create_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_label + ## + # RPC-specific configuration for `update_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_label + ## + # RPC-specific configuration for `delete_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_label + + # @private + def initialize parent_rpcs = nil + list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels + @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config + create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label + @create_account_label = ::Gapic::Config::Method.new create_account_label_config + update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label + @update_account_label = ::Gapic::Config::Method.new update_account_label_config + delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label + @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb new file mode 100644 index 000000000000..0e7c2cfdd5da --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + # Credentials for the AccountLabelsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb new file mode 100644 index 000000000000..2f421e27577b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + # Path helper methods for the AccountLabelsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountLabel resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/labels/{label}` + # + # @param account [String] + # @param label [String] + # + # @return [::String] + def account_label_path account:, label: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/labels/#{label}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb new file mode 100644 index 000000000000..728b66d6ac46 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" + +require "google/shopping/css/v1/account_labels_service/credentials" +require "google/shopping/css/v1/account_labels_service/paths" +require "google/shopping/css/v1/account_labels_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Manages Merchant Center and CSS accounts labels. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/account_labels_service/rest" + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + module AccountLabelsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/account_labels_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb new file mode 100644 index 000000000000..0a653f5e9a25 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb @@ -0,0 +1,714 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + module Rest + ## + # REST client for the AccountLabelsService service. + # + # Manages Merchant Center and CSS accounts labels. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_labels_service_stub + + ## + # Configure the AccountLabelsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLabelsService clients + # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_account_labels.timeout = 60.0 + default_config.rpcs.list_account_labels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_account_label.timeout = 60.0 + + default_config.rpcs.update_account_label.timeout = 60.0 + + default_config.rpcs.delete_account_label.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLabelsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::AccountLabelsService::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 + @account_labels_service_stub.universe_domain + end + + ## + # Create a new AccountLabelsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLabelsService 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 + + @account_labels_service_stub = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_labels_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 + @account_labels_service_stub.logger + end + + # Service calls + + ## + # Lists the labels owned by an account. + # + # @overload list_account_labels(request, options = nil) + # Pass arguments to `list_account_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + # + # # Call the list_account_labels method. + # result = client.list_account_labels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + # p item + # end + # + def list_account_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.list_account_labels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, "account_labels", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new label, not assigned to any account. + # + # @overload create_account_label(request, options = nil) + # Pass arguments to `create_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_account_label(parent: nil, account_label: nil) + # Pass arguments to `create_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The label to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + # + # # Call the create_account_label method. + # result = client.create_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def create_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest + + # Converts hash and nil to an 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_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.create_account_label request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a label. + # + # @overload update_account_label(request, options = nil) + # Pass arguments to `update_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_label(account_label: nil) + # Pass arguments to `update_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] + # Required. The updated label. All fields must be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + # + # # Call the update_account_label method. + # result = client.update_account_label request + # + # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + # p result + # + def update_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.update_account_label request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a label and removes it from all accounts to which it was assigned. + # + # @overload delete_account_label(request, options = nil) + # Pass arguments to `delete_account_label` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account_label(name: nil) + # Pass arguments to `delete_account_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + # + # # Call the delete_account_label method. + # result = client.delete_account_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account_label.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_labels_service_stub.delete_account_label request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountLabelsService REST API. + # + # This class represents the configuration for AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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_account_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountLabelsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_account_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_labels + ## + # RPC-specific configuration for `create_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_label + ## + # RPC-specific configuration for `update_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_label + ## + # RPC-specific configuration for `delete_account_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_label + + # @private + def initialize parent_rpcs = nil + list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels + @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config + create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label + @create_account_label = ::Gapic::Config::Method.new create_account_label_config + update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label + @update_account_label = ::Gapic::Config::Method.new update_account_label_config + delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label + @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb new file mode 100644 index 000000000000..a9b8cb91fe84 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_labels_pb" + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + module Rest + ## + # REST service stub for the AccountLabelsService 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_account_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListAccountLabelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListAccountLabelsResponse] + # A result object deserialized from the server's reply + def list_account_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_labels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.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_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # A result object deserialized from the server's reply + def create_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_account_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::AccountLabel] + # A result object deserialized from the server's reply + def update_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_account_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_account_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_label_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_account_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/labels", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] + # 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_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/labels", + body: "account_label", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{account_label.name}", + body: "account_label", + matches: [ + ["account_label.name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account_label REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb new file mode 100644 index 000000000000..91f38e92911a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/accounts_labels.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n,google/shopping/css/v1/accounts_labels.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x03\n\x0c\x41\x63\x63ountLabel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08label_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\naccount_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tH\x01\x88\x01\x01\x12G\n\nlabel_type\x18\x06 \x01(\x0e\x32..google.shopping.css.v1.AccountLabel.LabelTypeB\x03\xe0\x41\x03\"B\n\tLabelType\x12\x1a\n\x16LABEL_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:d\xea\x41\x61\n\x1f\x63ss.googleapis.com/AccountLabel\x12!accounts/{account}/labels/{label}*\raccountLabels2\x0c\x61\x63\x63ountLabelB\x0f\n\r_display_nameB\x0e\n\x0c_description\"z\n\x18ListAccountLabelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x19ListAccountLabelsResponse\x12<\n\x0e\x61\x63\x63ount_labels\x18\x01 \x03(\x0b\x32$.google.shopping.css.v1.AccountLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x19\x43reateAccountLabelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12@\n\raccount_label\x18\x02 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"]\n\x19UpdateAccountLabelRequest\x12@\n\raccount_label\x18\x01 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"R\n\x19\x44\x65leteAccountLabelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ss.googleapis.com/AccountLabel2\x97\x06\n\x14\x41\x63\x63ountLabelsService\x12\xa9\x01\n\x11ListAccountLabels\x12\x30.google.shopping.css.v1.ListAccountLabelsRequest\x1a\x31.google.shopping.css.v1.ListAccountLabelsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/labels\x12\xbb\x01\n\x12\x43reateAccountLabel\x12\x31.google.shopping.css.v1.CreateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"L\xda\x41\x14parent,account_label\x82\xd3\xe4\x93\x02/\"\x1e/v1/{parent=accounts/*}/labels:\raccount_label\x12\xc2\x01\n\x12UpdateAccountLabel\x12\x31.google.shopping.css.v1.UpdateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"S\xda\x41\raccount_label\x82\xd3\xe4\x93\x02=2,/v1/{account_label.name=accounts/*/labels/*}:\raccount_label\x12\x8e\x01\n\x12\x44\x65leteAccountLabel\x12\x31.google.shopping.css.v1.DeleteAccountLabelRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=accounts/*/labels/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb5\x01\n\x1a\x63om.google.shopping.css.v1B\x13\x41\x63\x63ountsLabelsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + AccountLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel").msgclass + AccountLabel::LabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel.LabelType").enummodule + ListAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsRequest").msgclass + ListAccountLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsResponse").msgclass + CreateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CreateAccountLabelRequest").msgclass + UpdateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelRequest").msgclass + DeleteAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteAccountLabelRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb new file mode 100644 index 000000000000..1d0c4f3552e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/accounts_labels_pb' + +module Google + module Shopping + module Css + module V1 + module AccountLabelsService + # Manages Merchant Center and CSS accounts labels. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.AccountLabelsService' + + # Lists the labels owned by an account. + rpc :ListAccountLabels, ::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Google::Shopping::Css::V1::ListAccountLabelsResponse + # Creates a new label, not assigned to any account. + rpc :CreateAccountLabel, ::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel + # Updates a label. + rpc :UpdateAccountLabel, ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel + # Deletes a label and removes it from all accounts to which it was assigned. + rpc :DeleteAccountLabel, ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb new file mode 100644 index 000000000000..4c0a1eaabeb1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/accounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n%google/shopping/css/v1/accounts.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x01\n\x18ListChildAccountsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x15\n\x08label_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tfull_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\t_label_idB\x0c\n\n_full_name\"g\n\x19ListChildAccountsResponse\x12\x31\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1f.google.shopping.css.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x89\x01\n\x11GetAccountRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x37\n\x06parent\x18\x02 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xa5\x01\n\x1aUpdateAccountLabelsRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x11\n\tlabel_ids\x18\x02 \x03(\x03\x12\x37\n\x06parent\x18\x03 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xbb\x04\n\x07\x41\x63\x63ount\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\tfull_name\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x0chomepage_uri\x18\x04 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x13\n\x06parent\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x11\n\tlabel_ids\x18\x06 \x03(\x03\x12\x1b\n\x13\x61utomatic_label_ids\x18\x07 \x03(\x03\x12\x46\n\x0c\x61\x63\x63ount_type\x18\x08 \x01(\x0e\x32+.google.shopping.css.v1.Account.AccountTypeB\x03\xe0\x41\x03\"\xc6\x01\n\x0b\x41\x63\x63ountType\x12\x1c\n\x18\x41\x43\x43OUNT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCSS_GROUP\x10\x01\x12\x0e\n\nCSS_DOMAIN\x10\x02\x12\x16\n\x12MC_PRIMARY_CSS_MCA\x10\x03\x12\x0e\n\nMC_CSS_MCA\x10\x04\x12\x16\n\x12MC_MARKETPLACE_MCA\x10\x05\x12\x10\n\x0cMC_OTHER_MCA\x10\x06\x12\x11\n\rMC_STANDALONE\x10\x07\x12\x15\n\x11MC_MCA_SUBACCOUNT\x10\x08:F\xea\x41\x43\n\x1a\x63ss.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x0f\n\r_display_nameB\x0f\n\r_homepage_uriB\t\n\x07_parent2\xa5\x04\n\x0f\x41\x63\x63ountsService\x12\xb4\x01\n\x11ListChildAccounts\x12\x30.google.shopping.css.v1.ListChildAccountsRequest\x1a\x31.google.shopping.css.v1.ListChildAccountsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=accounts/*}:listChildAccounts\x12~\n\nGetAccount\x12).google.shopping.css.v1.GetAccountRequest\x1a\x1f.google.shopping.css.v1.Account\"$\xda\x41\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=accounts/*}\x12\x99\x01\n\x0cUpdateLabels\x12\x32.google.shopping.css.v1.UpdateAccountLabelsRequest\x1a\x1f.google.shopping.css.v1.Account\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=accounts/*}:updateLabels:\x01*\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaf\x01\n\x1a\x63om.google.shopping.css.v1B\rAccountsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + ListChildAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsRequest").msgclass + ListChildAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsResponse").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetAccountRequest").msgclass + UpdateAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelsRequest").msgclass + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account").msgclass + Account::AccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account.AccountType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb new file mode 100644 index 000000000000..cbe6be04f569 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" + +require "google/shopping/css/v1/accounts_service/credentials" +require "google/shopping/css/v1/accounts_service/paths" +require "google/shopping/css/v1/accounts_service/client" +require "google/shopping/css/v1/accounts_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service for managing CSS/MC account information. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/accounts_service" + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/accounts_service/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/css/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb new file mode 100644 index 000000000000..da91d95b8f0c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb @@ -0,0 +1,709 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/accounts_pb" + +module Google + module Shopping + module Css + module V1 + module AccountsService + ## + # Client for the AccountsService service. + # + # Service for managing CSS/MC account information. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_child_accounts.timeout = 60.0 + default_config.rpcs.list_child_accounts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_account.timeout = 60.0 + default_config.rpcs.get_account.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_labels.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/css/v1/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::AccountsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + # + # @overload list_child_accounts(request, options = nil) + # Pass arguments to `list_child_accounts` via a request object, either of type + # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_child_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @param label_id [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @param full_name [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + # + # # Call the list_child_accounts method. + # result = client.list_child_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::Account. + # p item + # end + # + def list_child_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_child_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_child_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_child_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single CSS/MC account by ID. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account(name: nil, parent: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @param parent [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates labels assigned to CSS/MC accounts by a CSS domain. + # + # @overload update_labels(request, options = nil) + # Pass arguments to `update_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_labels(name: nil, label_ids: nil, parent: nil) + # Pass arguments to `update_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @param label_ids [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @param parent [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + # + # # Call the update_labels method. + # result = client.update_labels request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def update_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_labels, request, 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 AccountsService API. + # + # This class represents the configuration for AccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::AccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_child_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_child_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_child_accounts + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `update_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :update_labels + + # @private + def initialize parent_rpcs = nil + list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts + @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels + @update_labels = ::Gapic::Config::Method.new update_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb new file mode 100644 index 000000000000..4584fe4873de --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb new file mode 100644 index 000000000000..e069680bdb33 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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 Shopping + module Css + module V1 + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb new file mode 100644 index 000000000000..996c51dd8cec --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" + +require "google/shopping/css/v1/accounts_service/credentials" +require "google/shopping/css/v1/accounts_service/paths" +require "google/shopping/css/v1/accounts_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service for managing CSS/MC account information. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/accounts_service/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb new file mode 100644 index 000000000000..8a279b8f7067 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb @@ -0,0 +1,645 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service for managing CSS/MC account information. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Css::V1::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_child_accounts.timeout = 60.0 + default_config.rpcs.list_child_accounts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_account.timeout = 60.0 + default_config.rpcs.get_account.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_labels.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + # + # @overload list_child_accounts(request, options = nil) + # Pass arguments to `list_child_accounts` via a request object, either of type + # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_child_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @param label_id [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @param full_name [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + # + # # Call the list_child_accounts method. + # result = client.list_child_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::Account. + # p item + # end + # + def list_child_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_child_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_child_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_child_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, "accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a single CSS/MC account by ID. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account(name: nil, parent: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @param parent [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates labels assigned to CSS/MC accounts by a CSS domain. + # + # @overload update_labels(request, options = nil) + # Pass arguments to `update_labels` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_labels(name: nil, label_ids: nil, parent: nil) + # Pass arguments to `update_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @param label_ids [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @param parent [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + # + # # Call the update_labels method. + # result = client.update_labels request + # + # # The returned object is of type Google::Shopping::Css::V1::Account. + # p result + # + def update_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_labels request, 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 AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Css::V1::AccountsService::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_child_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_child_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_child_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_child_accounts + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `update_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :update_labels + + # @private + def initialize parent_rpcs = nil + list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts + @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels + @update_labels = ::Gapic::Config::Method.new update_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..afe5123dbfaa --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_pb" + +module Google + module Shopping + module Css + module V1 + module AccountsService + module Rest + ## + # REST service stub for the AccountsService 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_child_accounts REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListChildAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListChildAccountsResponse] + # A result object deserialized from the server's reply + def list_child_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_child_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_child_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_account REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::Account.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::Account] + # A result object deserialized from the server's reply + def update_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_labels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::Account.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_child_accounts REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_child_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:listChildAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_labels REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:updateLabels", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb new file mode 100644 index 000000000000..6528ad62148c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/accounts_pb' + +module Google + module Shopping + module Css + module V1 + module AccountsService + # Service for managing CSS/MC account information. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.AccountsService' + + # Lists all the accounts under the specified CSS account ID, and + # optionally filters by label ID and account name. + rpc :ListChildAccounts, ::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Google::Shopping::Css::V1::ListChildAccountsResponse + # Retrieves a single CSS/MC account by ID. + rpc :GetAccount, ::Google::Shopping::Css::V1::GetAccountRequest, ::Google::Shopping::Css::V1::Account + # Updates labels assigned to CSS/MC accounts by a CSS domain. + rpc :UpdateLabels, ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Google::Shopping::Css::V1::Account + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb new file mode 100644 index 000000000000..bd5bfbf234cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_product_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n/google/shopping/css/v1/css_product_common.proto\x12\x16google.shopping.css.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xbc\x13\n\nAttributes\x12\x15\n\x08\x63pp_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63pp_mobile_link\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x63pp_ads_redirect\x18* \x01(\tH\x02\x88\x01\x01\x12.\n\tlow_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nhigh_price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1d\n\x10number_of_offers\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18headline_offer_condition\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x14headline_offer_price\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12 \n\x13headline_offer_link\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\'\n\x1aheadline_offer_mobile_link\x18\t \x01(\tH\x06\x88\x01\x01\x12\x42\n\x1dheadline_offer_shipping_price\x18) \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x12\n\x05title\x18\n \x01(\tH\x07\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x18\n\x0b\x64\x65scription\x18\r \x01(\tH\t\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x0e \x01(\tH\n\x88\x01\x01\x12\x10\n\x03mpn\x18\x0f \x01(\tH\x0b\x88\x01\x01\x12\x11\n\x04gtin\x18\x10 \x01(\tH\x0c\x88\x01\x01\x12\x15\n\rproduct_types\x18$ \x03(\t\x12$\n\x17google_product_category\x18\x11 \x01(\tH\r\x88\x01\x01\x12\x12\n\x05\x61\x64ult\x18\x12 \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\tmultipack\x18\x13 \x01(\x03H\x0f\x88\x01\x01\x12\x16\n\tis_bundle\x18\x14 \x01(\x08H\x10\x88\x01\x01\x12\x16\n\tage_group\x18\x15 \x01(\tH\x11\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x12\x88\x01\x01\x12\x13\n\x06gender\x18\x17 \x01(\tH\x13\x88\x01\x01\x12\x15\n\x08material\x18\x18 \x01(\tH\x14\x88\x01\x01\x12\x14\n\x07pattern\x18\x19 \x01(\tH\x15\x88\x01\x01\x12\x11\n\x04size\x18\x1a \x01(\tH\x16\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x1b \x01(\tH\x17\x88\x01\x01\x12\x12\n\nsize_types\x18\x1c \x03(\t\x12\x1a\n\ritem_group_id\x18\x1d \x01(\tH\x18\x88\x01\x01\x12>\n\x0fproduct_details\x18\x1e \x03(\x0b\x32%.google.shopping.css.v1.ProductDetail\x12=\n\x0eproduct_weight\x18\x1f \x01(\x0b\x32%.google.shopping.css.v1.ProductWeight\x12@\n\x0eproduct_length\x18 \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12?\n\rproduct_width\x18! \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12@\n\x0eproduct_height\x18\" \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12\x1a\n\x12product_highlights\x18# \x03(\t\x12=\n\x0e\x63\x65rtifications\x18\' \x03(\x0b\x32%.google.shopping.css.v1.Certification\x12\x33\n\x0f\x65xpiration_date\x18( \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15included_destinations\x18+ \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18, \x03(\t\x12\x12\n\x05pause\x18- \x01(\tH\x19\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18. \x01(\tH\x1a\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18/ \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18\x30 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18\x31 \x01(\tH\x1d\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18\x32 \x01(\tH\x1e\x88\x01\x01\x12T\n\x1aheadline_offer_installment\x18\x33 \x01(\x0b\x32\x30.google.shopping.css.v1.HeadlineOfferInstallment\x12_\n headline_offer_subscription_cost\x18\x34 \x01(\x0b\x32\x35.google.shopping.css.v1.HeadlineOfferSubscriptionCost\x12\x19\n\x0creview_count\x18\x36 \x01(\x03H\x1f\x88\x01\x01\x12\x17\n\nmin_rating\x18\x37 \x01(\x03H \x88\x01\x01\x12\x17\n\nmax_rating\x18\x38 \x01(\x03H!\x88\x01\x01\x12\x13\n\x06rating\x18\x39 \x01(\x01H\"\x88\x01\x01\x42\x0b\n\t_cpp_linkB\x12\n\x10_cpp_mobile_linkB\x13\n\x11_cpp_ads_redirectB\x13\n\x11_number_of_offersB\x1b\n\x19_headline_offer_conditionB\x16\n\x14_headline_offer_linkB\x1d\n\x1b_headline_offer_mobile_linkB\x08\n\x06_titleB\r\n\x0b_image_linkB\x0e\n\x0c_descriptionB\x08\n\x06_brandB\x06\n\x04_mpnB\x07\n\x05_gtinB\x1a\n\x18_google_product_categoryB\x08\n\x06_adultB\x0c\n\n_multipackB\x0c\n\n_is_bundleB\x0c\n\n_age_groupB\x08\n\x06_colorB\t\n\x07_genderB\x0b\n\t_materialB\n\n\x08_patternB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x10\n\x0e_item_group_idB\x08\n\x06_pauseB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x0f\n\r_review_countB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_rating\">\n\rCertification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x05\n\x10\x43ssProductStatus\x12X\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32:.google.shopping.css.v1.CssProductStatus.DestinationStatus\x12R\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x37.google.shopping.css.v1.CssProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x11\x44\x65stinationStatus\x12\x13\n\x0b\x64\x65stination\x18\x01 \x01(\t\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xc9\x01\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0bservability\x18\x02 \x01(\t\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"\x9f\x01\n\x1dHeadlineOfferSubscriptionCost\x12:\n\x06period\x18\x01 \x01(\x0e\x32*.google.shopping.css.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\x89\x01\n\x18HeadlineOfferInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x30\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductCommonProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Attributes").msgclass + Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Certification").msgclass + ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDetail").msgclass + ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDimension").msgclass + ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductWeight").msgclass + CssProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus").msgclass + CssProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.DestinationStatus").msgclass + CssProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.ItemLevelIssue").msgclass + HeadlineOfferSubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferSubscriptionCost").msgclass + HeadlineOfferInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferInstallment").msgclass + SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.SubscriptionPeriod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb new file mode 100644 index 000000000000..4b67b42e62d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_product_inputs.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/css/v1/css_product_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n/google/shopping/css/v1/css_product_inputs.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"\xa7\x03\n\x0f\x43ssProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nfinal_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fraw_provided_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x66reshness_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x36\n\nattributes\x18\x07 \x01(\x0b\x32\".google.shopping.css.v1.Attributes\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:`\xea\x41]\n\"css.googleapis.com/CssProductInput\x12\x37\x61\x63\x63ounts/{account}/cssProductInputs/{css_product_input}\"\xbb\x01\n\x1cInsertCssProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"css.googleapis.com/CssProductInput\x12G\n\x11\x63ss_product_input\x18\x02 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12\x16\n\x07\x66\x65\x65\x64_id\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x01\"\x98\x01\n\x1cUpdateCssProductInputRequest\x12G\n\x11\x63ss_product_input\x18\x01 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n\x1c\x44\x65leteCssProductInputRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"css.googleapis.com/CssProductInput\x12!\n\x14supplemental_feed_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x17\n\x15_supplemental_feed_id2\xb0\x05\n\x17\x43ssProductInputsService\x12\xc2\x01\n\x15InsertCssProductInput\x12\x34.google.shopping.css.v1.InsertCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"J\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accounts/*}/cssProductInputs:insert:\x11\x63ss_product_input\x12\xed\x01\n\x15UpdateCssProductInput\x12\x34.google.shopping.css.v1.UpdateCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"u\xda\x41\x1d\x63ss_product_input,update_mask\x82\xd3\xe4\x93\x02O2:/v1/{css_product_input.name=accounts/*/cssProductInputs/*}:\x11\x63ss_product_input\x12\x9e\x01\n\x15\x44\x65leteCssProductInput\x12\x34.google.shopping.css.v1.DeleteCssProductInputRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=accounts/*/cssProductInputs/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductInputsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + CssProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductInput").msgclass + InsertCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.InsertCssProductInputRequest").msgclass + UpdateCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateCssProductInputRequest").msgclass + DeleteCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteCssProductInputRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb new file mode 100644 index 000000000000..d9b82213398f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/css/v1/version" + +require "google/shopping/css/v1/css_product_inputs_service/credentials" +require "google/shopping/css/v1/css_product_inputs_service/paths" +require "google/shopping/css/v1/css_product_inputs_service/client" +require "google/shopping/css/v1/css_product_inputs_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/css_product_inputs_service" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/css_product_inputs_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + module CssProductInputsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "css_product_inputs_service", "helpers.rb" +require "google/shopping/css/v1/css_product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb new file mode 100644 index 000000000000..79c357cee408 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb @@ -0,0 +1,716 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/css_product_inputs_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + ## + # Client for the CssProductInputsService service. + # + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_product_inputs_service_stub + + ## + # Configure the CssProductInputsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductInputsService clients + # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 + + default_config.rpcs.update_css_product_input.timeout = 60.0 + + default_config.rpcs.delete_css_product_input.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @css_product_inputs_service_stub.universe_domain + end + + ## + # Create a new CssProductInputsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductInputsService 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/shopping/css/v1/css_product_inputs_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 + + @css_product_inputs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::CssProductInputsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @css_product_inputs_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 + @css_product_inputs_service_stub.logger + end + + # Service calls + + ## + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + # + # @overload insert_css_product_input(request, options = nil) + # Pass arguments to `insert_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) + # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS Product Input to insert. + # @param feed_id [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + # + # # Call the insert_css_product_input method. + # result = client.insert_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def insert_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :insert_css_product_input, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + # + # @overload update_css_product_input(request, options = nil) + # Pass arguments to `update_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_css_product_input(css_product_input: nil, update_mask: nil) + # Pass arguments to `update_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + # + # # Call the update_css_product_input method. + # result = client.update_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def update_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.css_product_input&.name + header_params["css_product_input.name"] = request.css_product_input.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :update_css_product_input, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + # + # @overload delete_css_product_input(request, options = nil) + # Pass arguments to `delete_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) + # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @param supplemental_feed_id [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + # + # # Call the delete_css_product_input method. + # result = client.delete_css_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.call_rpc :delete_css_product_input, request, 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 CssProductInputsService API. + # + # This class represents the configuration for CssProductInputsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_css_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CssProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_css_product_input + ## + # RPC-specific configuration for `update_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_css_product_input + ## + # RPC-specific configuration for `delete_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_css_product_input + + # @private + def initialize parent_rpcs = nil + insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input + @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config + update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input + @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config + delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input + @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb new file mode 100644 index 000000000000..066f5ca9210d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + # Credentials for the CssProductInputsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb new file mode 100644 index 000000000000..b71796db1d3e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + # Path helper methods for the CssProductInputsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified CssProductInput resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/cssProductInputs/{css_product_input}` + # + # @param account [String] + # @param css_product_input [String] + # + # @return [::String] + def css_product_input_path account:, css_product_input: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/cssProductInputs/#{css_product_input}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb new file mode 100644 index 000000000000..06be63d42390 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/css/v1/version" + +require "google/shopping/css/v1/css_product_inputs_service/credentials" +require "google/shopping/css/v1/css_product_inputs_service/paths" +require "google/shopping/css/v1/css_product_inputs_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/css_product_inputs_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + module CssProductInputsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/css_product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb new file mode 100644 index 000000000000..42512d523193 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb @@ -0,0 +1,652 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + module Rest + ## + # REST client for the CssProductInputsService service. + # + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_product_inputs_service_stub + + ## + # Configure the CssProductInputsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductInputsService clients + # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 + + default_config.rpcs.update_css_product_input.timeout = 60.0 + + default_config.rpcs.delete_css_product_input.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CssProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::CssProductInputsService::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 + @css_product_inputs_service_stub.universe_domain + end + + ## + # Create a new CssProductInputsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductInputsService 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 + + @css_product_inputs_service_stub = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @css_product_inputs_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 + @css_product_inputs_service_stub.logger + end + + # Service calls + + ## + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + # + # @overload insert_css_product_input(request, options = nil) + # Pass arguments to `insert_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) + # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS Product Input to insert. + # @param feed_id [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + # + # # Call the insert_css_product_input method. + # result = client.insert_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def insert_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.insert_css_product_input request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + # + # @overload update_css_product_input(request, options = nil) + # Pass arguments to `update_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_css_product_input(css_product_input: nil, update_mask: nil) + # Pass arguments to `update_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + # + # # Call the update_css_product_input method. + # result = client.update_css_product_input request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + # p result + # + def update_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.update_css_product_input request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + # + # @overload delete_css_product_input(request, options = nil) + # Pass arguments to `delete_css_product_input` via a request object, either of type + # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) + # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @param supplemental_feed_id [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + # + # # Call the delete_css_product_input method. + # result = client.delete_css_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_css_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_css_product_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_css_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_product_inputs_service_stub.delete_css_product_input request, 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 CssProductInputsService REST API. + # + # This class represents the configuration for CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 + # # insert_css_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_css_product_input.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_css_product_input + ## + # RPC-specific configuration for `update_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_css_product_input + ## + # RPC-specific configuration for `delete_css_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_css_product_input + + # @private + def initialize parent_rpcs = nil + insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input + @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config + update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input + @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config + delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input + @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb new file mode 100644 index 000000000000..3eb2aa0f1884 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/css_product_inputs_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + module Rest + ## + # REST service stub for the CssProductInputsService 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 insert_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # A result object deserialized from the server's reply + def insert_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_css_product_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_css_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProductInput] + # A result object deserialized from the server's reply + def update_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_css_product_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_css_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_css_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_css_product_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_css_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 insert_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/cssProductInputs:insert", + body: "css_product_input", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{css_product_input.name}", + body: "css_product_input", + matches: [ + ["css_product_input.name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_css_product_input REST call + # + # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_css_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb new file mode 100644 index 000000000000..a872c72a6951 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/css_product_inputs_pb' + +module Google + module Shopping + module Css + module V1 + module CssProductInputsService + # Service to use CssProductInput resource. + # This service helps to insert/update/delete CSS Products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.CssProductInputsService' + + # Uploads a CssProductInput to your CSS Center account. If an + # input with the same contentLanguage, identity, feedLabel and feedId already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a CSS Product input, it may + # take several minutes before the processed CSS Product can be retrieved. + rpc :InsertCssProductInput, ::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput + # Updates the existing Css Product input in your CSS Center account. + # + # After inserting, updating, or deleting a CSS Product input, it may take + # several minutes before the processed Css Product can be retrieved. + rpc :UpdateCssProductInput, ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput + # Deletes a CSS Product input from your CSS Center account. + # + # After a delete it may take several minutes until the input is no longer + # available. + rpc :DeleteCssProductInput, ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb new file mode 100644 index 000000000000..b23a373fe93d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/css_products.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/shopping/css/v1/css_product_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n)google/shopping/css/v1/css_products.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"K\n\x14GetCssProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63ss.googleapis.com/CssProduct\"\xaa\x03\n\nCssProduct\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fraw_provided_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12;\n\nattributes\x18\x05 \x01(\x0b\x32\".google.shopping.css.v1.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\x06 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12I\n\x12\x63ss_product_status\x18\x08 \x01(\x0b\x32(.google.shopping.css.v1.CssProductStatusB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/CssProduct\x12,accounts/{account}/cssProducts/{css_product}*\x0b\x63ssProducts2\ncssProduct\"v\n\x16ListCssProductsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/CssProduct\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListCssProductsResponse\x12\x38\n\x0c\x63ss_products\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.CssProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x98\x03\n\x12\x43ssProductsService\x12\x95\x01\n\rGetCssProduct\x12,.google.shopping.css.v1.GetCssProductRequest\x1a\".google.shopping.css.v1.CssProduct\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=accounts/*/cssProducts/*}\x12\xa8\x01\n\x0fListCssProducts\x12..google.shopping.css.v1.ListCssProductsRequest\x1a/.google.shopping.css.v1.ListCssProductsResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=accounts/*}/cssProducts\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb2\x01\n\x1a\x63om.google.shopping.css.v1B\x10\x43ssProductsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + GetCssProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetCssProductRequest").msgclass + CssProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProduct").msgclass + ListCssProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsRequest").msgclass + ListCssProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb new file mode 100644 index 000000000000..ace56839641d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/css/v1/version" + +require "google/shopping/css/v1/css_products_service/credentials" +require "google/shopping/css/v1/css_products_service/paths" +require "google/shopping/css/v1/css_products_service/client" +require "google/shopping/css/v1/css_products_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/css_products_service" + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/css_products_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + module CssProductsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "css_products_service", "helpers.rb" +require "google/shopping/css/v1/css_products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb new file mode 100644 index 000000000000..5f43148a4403 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb @@ -0,0 +1,606 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/css_products_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + ## + # Client for the CssProductsService service. + # + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_products_service_stub + + ## + # Configure the CssProductsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductsService clients + # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Css", "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_css_product.timeout = 60.0 + default_config.rpcs.get_css_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_css_products.timeout = 60.0 + default_config.rpcs.list_css_products.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 CssProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @css_products_service_stub.universe_domain + end + + ## + # Create a new CssProductsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductsService 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/shopping/css/v1/css_products_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 + + @css_products_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::CssProductsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @css_products_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 + @css_products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_css_product(request, options = nil) + # Pass arguments to `get_css_product` via a request object, either of type + # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_css_product(name: nil) + # Pass arguments to `get_css_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetCssProductRequest.new + # + # # Call the get_css_product method. + # result = client.get_css_product request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProduct. + # p result + # + def get_css_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_css_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_css_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.call_rpc :get_css_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + # + # @overload list_css_products(request, options = nil) + # Pass arguments to `list_css_products` via a request object, either of type + # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_css_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListCssProductsRequest.new + # + # # Call the list_css_products method. + # result = client.list_css_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. + # p item + # end + # + def list_css_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_css_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_css_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.call_rpc :list_css_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @css_products_service_stub, :list_css_products, request, response, 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 CssProductsService API. + # + # This class represents the configuration for CssProductsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_css_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CssProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_css_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_css_product + ## + # RPC-specific configuration for `list_css_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_css_products + + # @private + def initialize parent_rpcs = nil + get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product + @get_css_product = ::Gapic::Config::Method.new get_css_product_config + list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products + @list_css_products = ::Gapic::Config::Method.new list_css_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb new file mode 100644 index 000000000000..5656f955c92c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + # Credentials for the CssProductsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb new file mode 100644 index 000000000000..e311ef6467e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + module CssProductsService + # Path helper methods for the CssProductsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified CssProduct resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/cssProducts/{css_product}` + # + # @param account [String] + # @param css_product [String] + # + # @return [::String] + def css_product_path account:, css_product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/cssProducts/#{css_product}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb new file mode 100644 index 000000000000..6c5a8ef0a46d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/css/v1/version" + +require "google/shopping/css/v1/css_products_service/credentials" +require "google/shopping/css/v1/css_products_service/paths" +require "google/shopping/css/v1/css_products_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/css_products_service/rest" + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + module CssProductsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/css_products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb new file mode 100644 index 000000000000..ca2c12860121 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb @@ -0,0 +1,549 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + module Rest + ## + # REST client for the CssProductsService service. + # + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :css_products_service_stub + + ## + # Configure the CssProductsService Client class. + # + # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CssProductsService clients + # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "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_css_product.timeout = 60.0 + default_config.rpcs.get_css_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_css_products.timeout = 60.0 + default_config.rpcs.list_css_products.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 CssProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::CssProductsService::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 + @css_products_service_stub.universe_domain + end + + ## + # Create a new CssProductsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CssProductsService 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 + + @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @css_products_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 + @css_products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + # + # @overload get_css_product(request, options = nil) + # Pass arguments to `get_css_product` via a request object, either of type + # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_css_product(name: nil) + # Pass arguments to `get_css_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::GetCssProductRequest.new + # + # # Call the get_css_product method. + # result = client.get_css_product request + # + # # The returned object is of type Google::Shopping::Css::V1::CssProduct. + # p result + # + def get_css_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_css_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_css_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.get_css_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + # + # @overload list_css_products(request, options = nil) + # Pass arguments to `list_css_products` via a request object, either of type + # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_css_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListCssProductsRequest.new + # + # # Call the list_css_products method. + # result = client.list_css_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. + # p item + # end + # + def list_css_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_css_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_css_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @css_products_service_stub.list_css_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_products", request, result, 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 CssProductsService REST API. + # + # This class represents the configuration for CssProductsService 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::Shopping::Css::V1::CssProductsService::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_css_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_css_product.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 CssProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_css_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_css_product + ## + # RPC-specific configuration for `list_css_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_css_products + + # @private + def initialize parent_rpcs = nil + get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product + @get_css_product = ::Gapic::Config::Method.new get_css_product_config + list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products + @list_css_products = ::Gapic::Config::Method.new list_css_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb new file mode 100644 index 000000000000..d7eea4bfc0da --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/css_products_pb" + +module Google + module Shopping + module Css + module V1 + module CssProductsService + module Rest + ## + # REST service stub for the CssProductsService 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_css_product REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::CssProduct] + # A result object deserialized from the server's reply + def get_css_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_css_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_css_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::CssProduct.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_css_products REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListCssProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListCssProductsResponse] + # A result object deserialized from the server's reply + def list_css_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_css_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_css_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListCssProductsResponse.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_css_product REST call + # + # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_css_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/cssProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_css_products REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_css_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cssProducts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb new file mode 100644 index 000000000000..50ec396539bb --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/css_products_pb' + +module Google + module Shopping + module Css + module V1 + module CssProductsService + # Service for doing get and list on Css Products(a.k.a Aggregate Offers + # internally). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.CssProductsService' + + # Retrieves the processed CSS Product from your CSS Center account. After + # inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + rpc :GetCssProduct, ::Google::Shopping::Css::V1::GetCssProductRequest, ::Google::Shopping::Css::V1::CssProduct + # Lists the processed CSS Products in your CSS Center account. The response + # might contain fewer items than specified by pageSize. Rely on pageToken to + # determine if there are more items to be requested. + # + # After inserting, updating, or deleting a CSS product input, it may + # take several minutes before the updated processed CSS product can be + # retrieved. + rpc :ListCssProducts, ::Google::Shopping::Css::V1::ListCssProductsRequest, ::Google::Shopping::Css::V1::ListCssProductsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb new file mode 100644 index 000000000000..6f35b13b6859 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/css/v1/quota.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n\"google/shopping/css/v1/quota.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0emethod_details\x18\x04 \x03(\x0b\x32%.google.shopping.css.v1.MethodDetailsB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/QuotaGroup\x12,accounts/{account}/quotaGroups/{quota_group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x80\x01\n\x16ListQuotaGroupsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/QuotaGroup\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\"l\n\x17ListQuotaGroupsResponse\x12\x38\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf5\x01\n\x0cQuotaService\x12\xa3\x01\n\x0fListQuotaGroups\x12..google.shopping.css.v1.ListQuotaGroupsRequest\x1a/.google.shopping.css.v1.ListQuotaGroupsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/quotas\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xac\x01\n\x1a\x63om.google.shopping.css.v1B\nQuotaProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Css + module V1 + QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.QuotaGroup").msgclass + MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.MethodDetails").msgclass + ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsRequest").msgclass + ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb new file mode 100644 index 000000000000..8318f2e1b7a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" + +require "google/shopping/css/v1/quota_service/credentials" +require "google/shopping/css/v1/quota_service/paths" +require "google/shopping/css/v1/quota_service/client" +require "google/shopping/css/v1/quota_service/rest" + +module Google + module Shopping + module Css + module V1 + ## + # Service to get method call quota information per CSS API method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/css/v1/quota_service" + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/css/v1/quota_service/rest" + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + module QuotaService + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_service", "helpers.rb" +require "google/shopping/css/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb new file mode 100644 index 000000000000..cb7d6d1fe847 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb @@ -0,0 +1,495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/quota_pb" + +module Google + module Shopping + module Css + module V1 + module QuotaService + ## + # Client for the QuotaService service. + # + # Service to get method call quota information per CSS API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_quota_groups.timeout = 60.0 + default_config.rpcs.list_quota_groups.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 QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService 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/shopping/css/v1/quota_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Css::V1::QuotaService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your CSS Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::QuotaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService API. + # + # This class represents the configuration for QuotaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Css::V1::QuotaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb new file mode 100644 index 000000000000..300c3137cdf6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Css + module V1 + module QuotaService + # Credentials for the QuotaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + 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-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb new file mode 100644 index 000000000000..d6952334dd8d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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 Shopping + module Css + module V1 + module QuotaService + # Path helper methods for the QuotaService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb new file mode 100644 index 000000000000..d008263afad8 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" + +require "google/shopping/css/v1/quota_service/credentials" +require "google/shopping/css/v1/quota_service/paths" +require "google/shopping/css/v1/quota_service/rest/client" + +module Google + module Shopping + module Css + module V1 + ## + # Service to get method call quota information per CSS API method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/css/v1/quota_service/rest" + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + module QuotaService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/css/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb new file mode 100644 index 000000000000..becee6c58f15 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb @@ -0,0 +1,445 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service/rest/service_stub" + +module Google + module Shopping + module Css + module V1 + module QuotaService + module Rest + ## + # REST client for the QuotaService service. + # + # Service to get method call quota information per CSS API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_quota_groups.timeout = 60.0 + default_config.rpcs.list_quota_groups.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 QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_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 + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your CSS Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/css/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Css::V1::QuotaService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Css::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.list_quota_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService REST API. + # + # This class represents the configuration for QuotaService 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::Shopping::Css::V1::QuotaService::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_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Css::V1::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "css.googleapis.com" + + config_attr :endpoint, nil, ::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 QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb new file mode 100644 index 000000000000..0104aec48d94 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/quota_pb" + +module Google + module Shopping + module Css + module V1 + module QuotaService + module Rest + ## + # REST service stub for the QuotaService 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_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] + # A result object deserialized from the server's reply + def list_quota_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_quota_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.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_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_quota_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/quotas", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb new file mode 100644 index 000000000000..2176f57358bf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/css/v1/quota_pb' + +module Google + module Shopping + module Css + module V1 + module QuotaService + # Service to get method call quota information per CSS API method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.css.v1.QuotaService' + + # Lists the daily call quota and usage per group for your CSS Center account. + rpc :ListQuotaGroups, ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Google::Shopping::Css::V1::ListQuotaGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb new file mode 100644 index 000000000000..2cc3b855b50d --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/css/v1/accounts_service/rest" +require "google/shopping/css/v1/account_labels_service/rest" +require "google/shopping/css/v1/css_product_inputs_service/rest" +require "google/shopping/css/v1/css_products_service/rest" +require "google/shopping/css/v1/quota_service/rest" +require "google/shopping/css/v1/version" + +module Google + module Shopping + module Css + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/css/v1/rest" + # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb new file mode 100644 index 000000000000..d1011ac40878 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/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 Shopping + module Css + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md new file mode 100644 index 000000000000..d5bb47472267 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# CSS 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-shopping-css-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb new file mode 100644 index 000000000000..eba13c9a7aad --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # The request message for the `ListChildAccounts` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. Must be a CSS group or domain. + # Format: accounts/\\{account} + # @!attribute [rw] label_id + # @return [::Integer] + # If set, only the MC accounts with the given label ID will be returned. + # @!attribute [rw] full_name + # @return [::String] + # If set, only the MC accounts with the given name (case sensitive) will be + # returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 50 accounts will be + # returned. The maximum value is 100; values above 100 will be coerced to + # 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListChildAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChildAccounts` must + # match the call that provided the page token. + class ListChildAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListChildAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Css::V1::Account>] + # The CSS/MC accounts returned for the specified CSS parent account. + # @!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 ListChildAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the managed CSS/MC account. + # Format: accounts/\\{account} + # @!attribute [rw] parent + # @return [::String] + # Optional. Only required when retrieving MC account information. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `UpdateLabels` method. + # @!attribute [rw] name + # @return [::String] + # Required. The label resource name. + # Format: accounts/\\{account} + # @!attribute [rw] label_ids + # @return [::Array<::Integer>] + # The list of label IDs to overwrite the existing account label IDs. + # If the list is empty, all currently assigned label IDs will be deleted. + # @!attribute [rw] parent + # @return [::String] + # Optional. Only required when updating MC account labels. + # The CSS domain that is the parent resource of the MC account. + # Format: accounts/\\{account} + class UpdateAccountLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about CSS/MC account. + # @!attribute [rw] name + # @return [::String] + # The label resource name. + # Format: accounts/\\{account} + # @!attribute [r] full_name + # @return [::String] + # Output only. Immutable. The CSS/MC account's full name. + # @!attribute [rw] display_name + # @return [::String] + # The CSS/MC account's short display name. + # @!attribute [r] homepage_uri + # @return [::String] + # Output only. Immutable. The CSS/MC account's homepage. + # @!attribute [rw] parent + # @return [::String] + # The CSS/MC account's parent resource. CSS group for CSS domains; CSS + # domain for MC accounts. Returned only if the user has access to the + # parent account. + # Note: For MC sub-accounts, this is also the CSS domain that is the parent + # resource of the MCA account, since we are effectively flattening the + # hierarchy." + # @!attribute [rw] label_ids + # @return [::Array<::Integer>] + # Manually created label IDs assigned to the CSS/MC account by a CSS parent + # account. + # @!attribute [rw] automatic_label_ids + # @return [::Array<::Integer>] + # Automatically created label IDs assigned to the MC account by + # CSS Center. + # @!attribute [r] account_type + # @return [::Google::Shopping::Css::V1::Account::AccountType] + # Output only. The type of this account. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The account type. + module AccountType + # Unknown account type. + ACCOUNT_TYPE_UNSPECIFIED = 0 + + # CSS group account. + CSS_GROUP = 1 + + # CSS domain account. + CSS_DOMAIN = 2 + + # MC Primary CSS MCA account. + MC_PRIMARY_CSS_MCA = 3 + + # MC CSS MCA account. + MC_CSS_MCA = 4 + + # MC Marketplace MCA account. + MC_MARKETPLACE_MCA = 5 + + # MC Other MCA account. + MC_OTHER_MCA = 6 + + # MC Standalone account. + MC_STANDALONE = 7 + + # MC MCA sub-account. + MC_MCA_SUBACCOUNT = 8 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb new file mode 100644 index 000000000000..055f23e04511 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # Label assigned by CSS domain or CSS group to one of its sub-accounts. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the label. + # Format: accounts/\\{account}/labels/\\{label} + # @!attribute [r] label_id + # @return [::Integer] + # Output only. The ID of the label. + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of account this label belongs to. + # @!attribute [rw] display_name + # @return [::String] + # The display name of this label. + # @!attribute [rw] description + # @return [::String] + # The description of this label. + # @!attribute [r] label_type + # @return [::Google::Shopping::Css::V1::AccountLabel::LabelType] + # Output only. The type of this label. + class AccountLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The label type. + module LabelType + # Unknown label type. + LABEL_TYPE_UNSPECIFIED = 0 + + # Indicates that the label was created manually. + MANUAL = 1 + + # Indicates that the label was created automatically by CSS Center. + AUTOMATIC = 2 + end + end + + # Request message for the `ListAccountLabels` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of labels to return. The service may return fewer than + # this value. + # If unspecified, at most 50 labels will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListAccountLabels` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLabels` must + # match the call that provided the page token. + class ListAccountLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountLabels` method. + # @!attribute [rw] account_labels + # @return [::Array<::Google::Shopping::Css::V1::AccountLabel>] + # The labels from the specified account. + # @!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 ListAccountLabelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the 'CreateAccountLanel' method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. + # Format: accounts/\\{account} + # @!attribute [rw] account_label + # @return [::Google::Shopping::Css::V1::AccountLabel] + # Required. The label to create. + class CreateAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccountLabel` method. + # @!attribute [rw] account_label + # @return [::Google::Shopping::Css::V1::AccountLabel] + # Required. The updated label. All fields must be provided. + class UpdateAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the 'DeleteAccountLabel' method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the label to delete. + # Format: accounts/\\{account}/labels/\\{label} + class DeleteAccountLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb new file mode 100644 index 000000000000..c00f0c3460d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # Attributes for CSS Product. + # @!attribute [rw] cpp_link + # @return [::String] + # URL directly linking to your the Product Detail Page of the CSS. + # @!attribute [rw] cpp_mobile_link + # @return [::String] + # URL for the mobile-optimized version of the Product Detail Page of the CSS. + # @!attribute [rw] cpp_ads_redirect + # @return [::String] + # Allows advertisers to override the item URL when the product is shown + # within the context of Product Ads. + # @!attribute [rw] low_price + # @return [::Google::Shopping::Type::Price] + # Low Price of the CSS Product. + # @!attribute [rw] high_price + # @return [::Google::Shopping::Type::Price] + # High Price of the CSS Product. + # @!attribute [rw] number_of_offers + # @return [::Integer] + # The number of CSS Products. + # @!attribute [rw] headline_offer_condition + # @return [::String] + # Condition of the headline offer. + # @!attribute [rw] headline_offer_price + # @return [::Google::Shopping::Type::Price] + # Headline Price of the CSS Product. + # @!attribute [rw] headline_offer_link + # @return [::String] + # Link to the headline offer. + # @!attribute [rw] headline_offer_mobile_link + # @return [::String] + # Mobile Link to the headline offer. + # @!attribute [rw] headline_offer_shipping_price + # @return [::Google::Shopping::Type::Price] + # Headline Price of the CSS Product. + # @!attribute [rw] title + # @return [::String] + # Title of the item. + # @!attribute [rw] image_link + # @return [::String] + # URL of an image of the item. + # @!attribute [rw] additional_image_links + # @return [::Array<::String>] + # Additional URL of images of the item. + # @!attribute [rw] description + # @return [::String] + # Description of the item. + # @!attribute [rw] brand + # @return [::String] + # Product Related Attributes.[14-36] + # Brand of the item. + # @!attribute [rw] mpn + # @return [::String] + # Manufacturer Part Number + # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the + # item. + # @!attribute [rw] gtin + # @return [::String] + # Global Trade Item Number + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # @!attribute [rw] product_types + # @return [::Array<::String>] + # Categories of the item (formatted as in [products data + # specification](https://support.google.com/merchants/answer/6324406)). + # @!attribute [rw] google_product_category + # @return [::String] + # Google's category of the item (see [Google product + # taxonomy](https://support.google.com/merchants/answer/1705911)). When + # querying products, this field will contain the user provided value. There + # is currently no way to get back the auto assigned google product + # categories through the API. + # @!attribute [rw] adult + # @return [::Boolean] + # Set to true if the item is targeted towards adults. + # @!attribute [rw] multipack + # @return [::Integer] + # The number of identical products in a merchant-defined multipack. + # @!attribute [rw] is_bundle + # @return [::Boolean] + # Whether the item is a merchant-defined bundle. A bundle is a custom + # grouping of different products sold by a merchant for a single price. + # @!attribute [rw] age_group + # @return [::String] + # Target age group of the item. + # @!attribute [rw] color + # @return [::String] + # Color of the item. + # @!attribute [rw] gender + # @return [::String] + # Target gender of the item. + # @!attribute [rw] material + # @return [::String] + # The material of which the item is made. + # @!attribute [rw] pattern + # @return [::String] + # The item's pattern (e.g. polka dots). + # @!attribute [rw] size + # @return [::String] + # Size of the item. Only one value is allowed. For variants with different + # sizes, insert a separate product for each size with the same + # `itemGroupId` value (see + # [https://support.google.com/merchants/answer/6324492](size definition)). + # @!attribute [rw] size_system + # @return [::String] + # System in which the size is specified. Recommended for apparel items. + # @!attribute [rw] size_types + # @return [::Array<::String>] + # The cut of the item. It can be used to represent combined size types for + # apparel items. Maximum two of size types can be provided (see + # [size type](https://support.google.com/merchants/answer/6324497). + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] product_details + # @return [::Array<::Google::Shopping::Css::V1::ProductDetail>] + # Technical specification or additional product details. + # @!attribute [rw] product_weight + # @return [::Google::Shopping::Css::V1::ProductWeight] + # The weight of the product in the units provided. The value must be + # between 0 (exclusive) and 2000 (inclusive). + # @!attribute [rw] product_length + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The length of the product in the units provided. The value must be + # between 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_width + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The width of the product in the units provided. The value must be between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_height + # @return [::Google::Shopping::Css::V1::ProductDimension] + # The height of the product in the units provided. The value must be + # between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_highlights + # @return [::Array<::String>] + # Bullet points describing the most relevant highlights of a product. + # @!attribute [rw] certifications + # @return [::Array<::Google::Shopping::Css::V1::Certification>] + # A list of certificates claimed by the CSS for the given product. + # @!attribute [rw] expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item should expire, as specified upon insertion, in + # [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual + # expiration date is exposed in `productstatuses` as + # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) + # and might be earlier if `expirationDate` is too far in the future. + # Note: It may take 2+ days from the expiration date for the item to + # actually get deleted. + # @!attribute [rw] included_destinations + # @return [::Array<::String>] + # The list of destinations to include for this target (corresponds to + # checked check boxes in Merchant Center). Default destinations are always + # included unless provided in `excludedDestinations`. + # @!attribute [rw] excluded_destinations + # @return [::Array<::String>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # @!attribute [rw] pause + # @return [::String] + # Publication of this item will be temporarily paused. + # @!attribute [rw] custom_label_0 + # @return [::String] + # Custom label 0 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # Custom label 1 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # Custom label 2 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # Custom label 3 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # Custom label 4 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] headline_offer_installment + # @return [::Google::Shopping::Css::V1::HeadlineOfferInstallment] + # Number and amount of installments to pay for an item. + # @!attribute [rw] headline_offer_subscription_cost + # @return [::Google::Shopping::Css::V1::HeadlineOfferSubscriptionCost] + # Number of periods (months or years) and amount of payment per period + # for an item with an associated subscription contract. + # @!attribute [rw] review_count + # @return [::Integer] + # Number of reviews of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] min_rating + # @return [::Integer] + # Minimum rating score of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] max_rating + # @return [::Integer] + # Maximum rating score of the product. Required if + # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. + # This field is for an upcoming feature and is not yet used. + # @!attribute [rw] rating + # @return [::Float] + # Average rating score of the product. The value must be within the + # range of [`min_rating`, `max_rating`], inclusive. When displayed on the + # product page, this rating is normalized to a scale of [1, 5] with one + # decimal place. If provided, + # {::Google::Shopping::Css::V1::Attributes#review_count `review_count`}, + # {::Google::Shopping::Css::V1::Attributes#min_rating `min_rating`}, and + # {::Google::Shopping::Css::V1::Attributes#max_rating `max_rating`} are also + # required. This field is for an upcoming feature and is not yet used. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The certification for the product. Use the this attribute to describe + # certifications, such as energy efficiency ratings, associated with a product. + # @!attribute [rw] name + # @return [::String] + # The name of the certification. At this time, the most common value is + # "EPREL", which represents energy efficiency certifications in the EU + # European Registry for Energy Labeling (EPREL) database. + # @!attribute [rw] authority + # @return [::String] + # The authority or certification body responsible for issuing the + # certification. At this time, the most common value is "EC" or + # “European_Commission” for energy labels in the EU. + # @!attribute [rw] code + # @return [::String] + # The code of the certification. For example, for the EPREL certificate with + # the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 + # the code is 123456. The code is required for European Energy Labels. + class Certification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product details. + # @!attribute [rw] section_name + # @return [::String] + # The section header used to group a set of product details. + # @!attribute [rw] attribute_name + # @return [::String] + # The name of the product detail. + # @!attribute [rw] attribute_value + # @return [::String] + # The value of the product detail. + class ProductDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dimension of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The dimension value represented as a number. The value can have a + # maximum precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The dimension units. + # Acceptable values are: + # * "`in`" + # * "`cm`" + class ProductDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The weight of the product. + # @!attribute [rw] value + # @return [::Float] + # Required. The weight represented as a number. The weight can have a maximum + # precision of four decimal places. + # @!attribute [rw] unit + # @return [::String] + # Required. The weight unit. + # Acceptable values are: + # * "`g`" + # * "`kg`" + # * "`oz`" + # * "`lb`" + class ProductWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the Css Product, data validation issues, that is, + # information about the Css Product computed asynchronously. + # @!attribute [rw] destination_statuses + # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::DestinationStatus>] + # The intended destinations for the product. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::ItemLevelIssue>] + # A list of all issues associated with the product. + # @!attribute [rw] creation_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been created, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item has been last updated, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] google_expiration_date + # @return [::Google::Protobuf::Timestamp] + # Date on which the item expires, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + class CssProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product status. + # @!attribute [rw] destination + # @return [::String] + # The name of the destination + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # approved. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # pending approval. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is + # disapproved. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product status. + # @!attribute [rw] code + # @return [::String] + # The error code of the issue. + # @!attribute [rw] servability + # @return [::String] + # How this issue affects serving of the CSS Product. + # @!attribute [rw] resolution + # @return [::String] + # Whether the issue can be resolved by the merchant. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] destination + # @return [::String] + # The destination the issue applies to. + # @!attribute [rw] description + # @return [::String] + # A short issue description in English. + # @!attribute [rw] detail + # @return [::String] + # A detailed issue description in English. + # @!attribute [rw] documentation + # @return [::String] + # The URL of a web page to help with resolving this issue. + # @!attribute [rw] applicable_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where issue applies to the + # CSS Product. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The SubscriptionCost of the product. + # @!attribute [rw] period + # @return [::Google::Shopping::Css::V1::SubscriptionPeriod] + # The type of subscription period. + # Supported values are: + # * "`month`" + # * "`year`" + # @!attribute [rw] period_length + # @return [::Integer] + # The number of subscription periods the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per subscription period. + class HeadlineOfferSubscriptionCost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents installment. + # @!attribute [rw] months + # @return [::Integer] + # The number of installments the buyer has to pay. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount the buyer has to pay per month. + # @!attribute [rw] downpayment + # @return [::Google::Shopping::Type::Price] + # The up-front down payment amount the buyer has to pay. + class HeadlineOfferInstallment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The subscription period of the product. + module SubscriptionPeriod + # Indicates that the subscription period is unspecified. + SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 + + # Indicates that the subscription period is month. + MONTH = 1 + + # Indicates that the subscription period is year. + YEAR = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb new file mode 100644 index 000000000000..c6945a0046a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Css + module V1 + # This resource represents input data you submit for a CSS Product, not + # the processed CSS Product that you see in CSS Center, in Shopping Ads, or + # across Google surfaces. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the CSS Product input. + # Format: + # `accounts/{account}/cssProductInputs/{css_product_input}`, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @!attribute [r] final_name + # @return [::String] + # Output only. The name of the processed CSS Product. + # Format: + # `accounts/{account}/cssProducts/{css_product}` + # " + # @!attribute [rw] raw_provided_id + # @return [::String] + # Required. Your unique identifier for the CSS Product. This is the same for + # the CSS Product input and processed CSS Product. We only allow ids with + # alphanumerics, underscores and dashes. See the [products feed + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the CSS + # Product. + # @!attribute [rw] feed_label + # @return [::String] + # Required. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the CSS Product. + # Feed Label is synonymous to "target country" and hence should always be a + # valid region code. For example: 'DE' for Germany, 'FR' for France. + # @!attribute [rw] freshness_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # DEPRECATED. Use expiration_date instead. + # Represents the existing version (freshness) of the CSS Product, which + # can be used to preserve the right order when multiple updates are done at + # the same time. + # + # This field must not be set to the future time. + # + # If set, the update is prevented if a newer version of the item already + # exists in our system (that is the last update time of the existing + # CSS products is later than the freshness time set in the update). If + # the update happens, the last update time is then set to this freshness + # time. + # + # If not set, the update will not be prevented and the last update time will + # default to when this request was received by the CSS API. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Css::V1::Attributes] + # A list of CSS Product attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (CSS-provided) attributes. It can also be used for + # submitting any attribute of the feed specification in its generic + # form (for example: + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API, such as additional attributes used for Buy on Google. + class CssProductInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertCssProductInput method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this CSS Product will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] css_product_input + # @return [::Google::Shopping::Css::V1::CssProductInput] + # Required. The CSS Product Input to insert. + # @!attribute [rw] feed_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Optional. DEPRECATED. Feed id is not required for CSS Products. + # The primary or supplemental feed id. If CSS Product already exists and + # feed id provided is different, then the CSS Product will be moved to a + # new feed. + # Note: For now, CSSs do not need to provide feed ids as we create + # feeds on the fly. + # We do not have supplemental feed support for CSS Products yet. + class InsertCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateCssProductInput method. + # @!attribute [rw] css_product_input + # @return [::Google::Shopping::Css::V1::CssProductInput] + # Required. The CSS product input resource to update. Information you submit + # will be applied to the processed CSS product as well. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of CSS product attributes to be updated. + # + # If the update mask is omitted, then it is treated as implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # Attributes specified in the update mask without a value specified in the + # body will be deleted from the CSS product. + # + # Update mask can only be specified for top level fields in + # attributes and custom attributes. + # + # To specify the update mask for custom attributes you need to add the + # `custom_attribute.` prefix. + # + # Providing special "*" value for full CSS product replacement is not + # supported. + class UpdateCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteCssProductInput method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CSS product input resource to delete. + # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the + # last section `css_product_input` consists of 3 parts: + # contentLanguage~feedLabel~offerId. Example: + # accounts/123/cssProductInputs/de~DE~rawProvidedId123 + # @!attribute [rw] supplemental_feed_id + # @return [::Integer] + # The Content API Supplemental Feed ID. + # The field must not be set if the action applies to a primary feed. + # If the field is set, then product action applies to a supplemental feed + # instead of primary Content API feed. + class DeleteCssProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb new file mode 100644 index 000000000000..d61414008787 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.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 Shopping + module Css + module V1 + # The request message for the `GetCssProduct` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CSS product to retrieve. + # Format: `accounts/{account}/cssProducts/{css_product}` + class GetCssProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The processed CSS Product. + # @!attribute [rw] name + # @return [::String] + # The name of the CSS Product. + # Format: + # `"accounts/{account}/cssProducts/{css_product}"` + # @!attribute [r] raw_provided_id + # @return [::String] + # Output only. Your unique raw identifier for the product. + # @!attribute [r] content_language + # @return [::String] + # Output only. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [r] feed_label + # @return [::String] + # Output only. The feed label for the product. + # @!attribute [r] attributes + # @return [::Google::Shopping::Css::V1::Attributes] + # Output only. A list of product attributes. + # @!attribute [r] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Output only. A list of custom (CSS-provided) attributes. It can also be + # used to submit any attribute of the feed specification in its generic form + # (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API, such as additional attributes used for Buy on Google. + # @!attribute [r] css_product_status + # @return [::Google::Shopping::Css::V1::CssProductStatus] + # Output only. The status of a product, data validation issues, that is, + # information about a product computed asynchronously. + class CssProduct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListCssProducts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account/domain to list processed CSS Products for. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of CSS Products to return. The service may return + # fewer than this value. + # The maximum value is 1000; values above 1000 will be coerced to 1000. If + # unspecified, the maximum number of CSS products will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCssProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCssProducts` + # must match the call that provided the page token. + class ListCssProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListCssProducts method. + # @!attribute [rw] css_products + # @return [::Array<::Google::Shopping::Css::V1::CssProduct>] + # The processed CSS products from the specified account. These are your + # processed CSS products after applying rules and supplemental feeds. + # @!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 ListCssProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb new file mode 100644 index 000000000000..d0d83c380b21 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.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 Shopping + module Css + module V1 + # The group information for methods in the CSS API. The quota is shared + # between all methods in the group. Even if none of the methods within the + # group have usage the information for the group is returned. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the quota group. + # Format: accounts/\\{account}/quotas/\\{group} + # Example: `accounts/12345678/quotas/css-products-insert` + # Note: The \\{group} part is not guaranteed to follow a specific pattern. + # @!attribute [r] quota_usage + # @return [::Integer] + # Output only. The current quota usage, meaning the number of calls already + # made on a given day to the methods in the group. The daily quota limits + # reset at at 12:00 PM midday UTC. + # @!attribute [r] quota_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per day for the group. + # @!attribute [r] quota_minute_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per minute for the group. + # @!attribute [r] method_details + # @return [::Array<::Google::Shopping::Css::V1::MethodDetails>] + # Output only. List of all methods group quota applies to. + class QuotaGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The method details per method in the CSS API. + # @!attribute [r] method + # @return [::String] + # Output only. The name of the method for example + # `cssproductsservice.listcssproducts`. + # @!attribute [r] version + # @return [::String] + # Output only. The API version that the method belongs to. + # @!attribute [r] subapi + # @return [::String] + # Output only. The sub-API that the method belongs to. In the CSS API, this + # is always `css`. + # @!attribute [r] path + # @return [::String] + # Output only. The path for the method such as + # `v1/cssproductsservice.listcssproducts`. + class MethodDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListQuotaGroups method. + # @!attribute [rw] parent + # @return [::String] + # Required. The CSS account that owns the collection of method quotas and + # resources. In most cases, this is the CSS domain. Format: + # accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + class ListQuotaGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListMethodGroups method. + # @!attribute [rw] quota_groups + # @return [::Array<::Google::Shopping::Css::V1::QuotaGroup>] + # The methods, current quota usage and limits per each group. The quota is + # shared between all methods in the group. The groups are sorted in + # descending order based on + # {::Google::Shopping::Css::V1::QuotaGroup#quota_usage quota_usage}. + # @!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 ListQuotaGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,248 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile new file mode 100644 index 000000000000..64af0f406f42 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-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-shopping-css-v1", path: "../" +else + gem "google-shopping-css-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-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb new file mode 100644 index 000000000000..3e0da7936320 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the create_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label. +# +def create_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new + + # Call the create_account_label method. + result = client.create_account_label request + + # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + p result +end +# [END css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb new file mode 100644 index 000000000000..37acf2da6b88 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the delete_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label. +# +def delete_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new + + # Call the delete_account_label method. + result = client.delete_account_label request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb new file mode 100644 index 000000000000..b6e45b80ec3f --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_ListAccountLabels_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_account_labels call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels. +# +def list_account_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new + + # Call the list_account_labels method. + result = client.list_account_labels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. + p item + end +end +# [END css_v1_generated_AccountLabelsService_ListAccountLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb new file mode 100644 index 000000000000..3a87e7d4688c --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_account_label call in the AccountLabelsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label. +# +def update_account_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountLabelsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new + + # Call the update_account_label method. + result = client.update_account_label request + + # The returned object is of type Google::Shopping::Css::V1::AccountLabel. + p result +end +# [END css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..99a758913d47 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountsService_GetAccount_sync] +require "google/shopping/css/v1" + +## +# Snippet for the get_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Css::V1::Account. + p result +end +# [END css_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb new file mode 100644 index 000000000000..56b92aa4cccf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountsService_ListChildAccounts_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_child_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts. +# +def list_child_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListChildAccountsRequest.new + + # Call the list_child_accounts method. + result = client.list_child_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::Account. + p item + end +end +# [END css_v1_generated_AccountsService_ListChildAccounts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb new file mode 100644 index 000000000000..d5f667ab066e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_AccountsService_UpdateLabels_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_labels call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::AccountsService::Client#update_labels. +# +def update_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new + + # Call the update_labels method. + result = client.update_labels request + + # The returned object is of type Google::Shopping::Css::V1::Account. + p result +end +# [END css_v1_generated_AccountsService_UpdateLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb new file mode 100644 index 000000000000..006857df17cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the delete_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input. +# +def delete_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new + + # Call the delete_css_product_input method. + result = client.delete_css_product_input request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb new file mode 100644 index 000000000000..1acf0e41e05a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the insert_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input. +# +def insert_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new + + # Call the insert_css_product_input method. + result = client.insert_css_product_input request + + # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + p result +end +# [END css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb new file mode 100644 index 000000000000..b0f42257db06 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] +require "google/shopping/css/v1" + +## +# Snippet for the update_css_product_input call in the CssProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input. +# +def update_css_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new + + # Call the update_css_product_input method. + result = client.update_css_product_input request + + # The returned object is of type Google::Shopping::Css::V1::CssProductInput. + p result +end +# [END css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb new file mode 100644 index 000000000000..859163887d62 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_CssProductsService_GetCssProduct_sync] +require "google/shopping/css/v1" + +## +# Snippet for the get_css_product call in the CssProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductsService::Client#get_css_product. +# +def get_css_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::GetCssProductRequest.new + + # Call the get_css_product method. + result = client.get_css_product request + + # The returned object is of type Google::Shopping::Css::V1::CssProduct. + p result +end +# [END css_v1_generated_CssProductsService_GetCssProduct_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb new file mode 100644 index 000000000000..e65a9a1d0a0a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_CssProductsService_ListCssProducts_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_css_products call in the CssProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::CssProductsService::Client#list_css_products. +# +def list_css_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::CssProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListCssProductsRequest.new + + # Call the list_css_products method. + result = client.list_css_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::CssProduct. + p item + end +end +# [END css_v1_generated_CssProductsService_ListCssProducts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb new file mode 100644 index 000000000000..3efd74d00a2a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START css_v1_generated_QuotaService_ListQuotaGroups_sync] +require "google/shopping/css/v1" + +## +# Snippet for the list_quota_groups call in the QuotaService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups. +# +def list_quota_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Css::V1::QuotaService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new + + # Call the list_quota_groups method. + result = client.list_quota_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. + p item + end +end +# [END css_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json new file mode 100644 index 000000000000..eef1fd62fe59 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-shopping-css-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.css.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "css_v1_generated_AccountsService_ListChildAccounts_sync", + "title": "Snippet for the list_child_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts.", + "file": "accounts_service/list_child_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_child_accounts", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListChildAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListChildAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "ListChildAccounts", + "full_name": "google.shopping.css.v1.AccountsService.ListChildAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.css.v1.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountsService_UpdateLabels_sync", + "title": "Snippet for the update_labels call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#update_labels.", + "file": "accounts_service/update_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_labels", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#update_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateAccountLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" + }, + "method": { + "short_name": "UpdateLabels", + "full_name": "google.shopping.css.v1.AccountsService.UpdateLabels", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.css.v1.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_ListAccountLabels_sync", + "title": "Snippet for the list_account_labels call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels.", + "file": "account_labels_service/list_account_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_labels", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListAccountLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListAccountLabelsResponse", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "ListAccountLabels", + "full_name": "google.shopping.css.v1.AccountLabelsService.ListAccountLabels", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_CreateAccountLabel_sync", + "title": "Snippet for the create_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label.", + "file": "account_labels_service/create_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::CreateAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::AccountLabel", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "CreateAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.CreateAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync", + "title": "Snippet for the update_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label.", + "file": "account_labels_service/update_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::AccountLabel", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "UpdateAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.UpdateAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync", + "title": "Snippet for the delete_account_label call in the AccountLabelsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label.", + "file": "account_labels_service/delete_account_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account_label", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::DeleteAccountLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountLabelsService::Client", + "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" + }, + "method": { + "short_name": "DeleteAccountLabel", + "full_name": "google.shopping.css.v1.AccountLabelsService.DeleteAccountLabel", + "service": { + "short_name": "AccountLabelsService", + "full_name": "google.shopping.css.v1.AccountLabelsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_InsertCssProductInput_sync", + "title": "Snippet for the insert_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input.", + "file": "css_product_inputs_service/insert_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::InsertCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProductInput", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "InsertCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.InsertCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync", + "title": "Snippet for the update_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input.", + "file": "css_product_inputs_service/update_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::UpdateCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProductInput", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "UpdateCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.UpdateCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync", + "title": "Snippet for the delete_css_product_input call in the CssProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input.", + "file": "css_product_inputs_service/delete_css_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_css_product_input", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::DeleteCssProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CssProductInputsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" + }, + "method": { + "short_name": "DeleteCssProductInput", + "full_name": "google.shopping.css.v1.CssProductInputsService.DeleteCssProductInput", + "service": { + "short_name": "CssProductInputsService", + "full_name": "google.shopping.css.v1.CssProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductsService_GetCssProduct_sync", + "title": "Snippet for the get_css_product call in the CssProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#get_css_product.", + "file": "css_products_service/get_css_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_css_product", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#get_css_product", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::GetCssProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::CssProduct", + "client": { + "short_name": "CssProductsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" + }, + "method": { + "short_name": "GetCssProduct", + "full_name": "google.shopping.css.v1.CssProductsService.GetCssProduct", + "service": { + "short_name": "CssProductsService", + "full_name": "google.shopping.css.v1.CssProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_CssProductsService_ListCssProducts_sync", + "title": "Snippet for the list_css_products call in the CssProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#list_css_products.", + "file": "css_products_service/list_css_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_css_products", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#list_css_products", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListCssProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListCssProductsResponse", + "client": { + "short_name": "CssProductsService::Client", + "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" + }, + "method": { + "short_name": "ListCssProducts", + "full_name": "google.shopping.css.v1.CssProductsService.ListCssProducts", + "service": { + "short_name": "CssProductsService", + "full_name": "google.shopping.css.v1.CssProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "css_v1_generated_QuotaService_ListQuotaGroups_sync", + "title": "Snippet for the list_quota_groups call in the QuotaService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups.", + "file": "quota_service/list_quota_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_quota_groups", + "full_name": "::Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Css::V1::ListQuotaGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Css::V1::ListQuotaGroupsResponse", + "client": { + "short_name": "QuotaService::Client", + "full_name": "::Google::Shopping::Css::V1::QuotaService::Client" + }, + "method": { + "short_name": "ListQuotaGroups", + "full_name": "google.shopping.css.v1.QuotaService.ListQuotaGroups", + "service": { + "short_name": "QuotaService", + "full_name": "google.shopping.css.v1.QuotaService" + } + } + }, + "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-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb new file mode 100644 index 000000000000..06be5bd23520 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_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/shopping/css/v1/account_labels_service" + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_label_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_label_path account: "value0", label: "value1" + assert_equal "accounts/value0/labels/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb new file mode 100644 index 000000000000..0b1bb88d645a --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb @@ -0,0 +1,318 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service/rest" + + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new + http_response = OpenStruct.new 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_account_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_list_account_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_labels_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_count + end + end + end + + def test_create_account_label + # Create test objects. + client_result = ::Google::Shopping::Css::V1::AccountLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_label = {} + + create_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_create_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_account_label({ parent: parent, account_label: account_label }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_account_label parent: parent, account_label: account_label do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_account_label({ parent: parent, account_label: account_label }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_account_label_client_stub.call_count + end + end + end + + def test_update_account_label + # Create test objects. + client_result = ::Google::Shopping::Css::V1::AccountLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_label = {} + + update_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_update_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_account_label({ account_label: account_label }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_account_label account_label: account_label do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_account_label({ account_label: account_label }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_label_client_stub.call_count + end + end + end + + def test_delete_account_label + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_delete_account_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_account_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_account_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_account_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb new file mode 100644 index 000000000000..309bc3a0ae62 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb @@ -0,0 +1,347 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/accounts_labels_pb" +require "google/shopping/css/v1/account_labels_service" + +class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_labels, name + assert_kind_of ::Google::Shopping::Css::V1::ListAccountLabelsRequest, 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_account_labels_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_rpc_count + end + end + + def test_create_account_label + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_label = {} + + create_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::CreateAccountLabelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_account_label({ parent: parent, account_label: account_label }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_account_label parent: parent, account_label: account_label do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_account_label({ parent: parent, account_label: account_label }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_account_label_client_stub.call_rpc_count + end + end + + def test_update_account_label + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_label = {} + + update_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_account_label({ account_label: account_label }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_account_label account_label: account_label do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_account_label({ account_label: account_label }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_label_client_stub.call_rpc_count + end + end + + def test_delete_account_label + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account_label, name + assert_kind_of ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_label_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_account_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_account_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_account_label({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(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_account_label_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::AccountLabelsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb new file mode 100644 index 000000000000..5958f212e0cf --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_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/shopping/css/v1/accounts_service" + +class ::Google::Shopping::Css::V1::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb new file mode 100644 index 000000000000..292ecc543790 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb @@ -0,0 +1,268 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service/rest" + + +class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + label_id = 42 + full_name = "hello world" + page_size = 42 + page_token = "hello world" + + list_child_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_child_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_child_accounts_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_count + end + end + end + + def test_get_account + # Create test objects. + client_result = ::Google::Shopping::Css::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + + get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_account({ name: name, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_account name: name, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_account({ name: name, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_update_labels + # Create test objects. + client_result = ::Google::Shopping::Css::V1::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + label_ids = [42] + parent = "hello world" + + update_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_labels_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_labels name: name, label_ids: label_ids, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_labels({ name: name, label_ids: label_ids, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb new file mode 100644 index 000000000000..6abde8ec7b17 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb @@ -0,0 +1,301 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/accounts_pb" +require "google/shopping/css/v1/accounts_service" + +class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + label_id = 42 + full_name = "hello world" + page_size = 42 + page_token = "hello world" + + list_child_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_child_accounts, name + assert_kind_of ::Google::Shopping::Css::V1::ListChildAccountsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["label_id"] + assert request.has_label_id? + assert_equal "hello world", request["full_name"] + assert request.has_full_name? + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_child_accounts_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_rpc_count + end + end + + def test_get_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parent = "hello world" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Css::V1::GetAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["parent"] + assert request.has_parent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_account({ name: name, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_account name: name, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_account({ name: name, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_rpc_count + end + end + + def test_update_labels + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + label_ids = [42] + parent = "hello world" + + update_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_labels, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, request + assert_equal "hello world", request["name"] + assert_equal [42], request["label_ids"] + assert_equal "hello world", request["parent"] + assert request.has_parent? + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_labels_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_labels name: name, label_ids: label_ids, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_labels({ name: name, label_ids: label_ids, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_labels_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::AccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb new file mode 100644 index 000000000000..6f08e5fdf404 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_service" + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_css_product_input_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.css_product_input_path account: "value0", css_product_input: "value1" + assert_equal "accounts/value0/cssProductInputs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb new file mode 100644 index 000000000000..2e9aedae5c1b --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service/rest" + + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + css_product_input = {} + feed_id = 42 + + insert_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_insert_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_css_product_input_client_stub.call_count + end + end + end + + def test_update_css_product_input + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + css_product_input = {} + update_mask = {} + + update_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_update_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_css_product_input_client_stub.call_count + end + end + end + + def test_delete_css_product_input + # 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" + supplemental_feed_id = 42 + + delete_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_delete_css_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb new file mode 100644 index 000000000000..cae9bfab46aa --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb @@ -0,0 +1,287 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/css_product_inputs_pb" +require "google/shopping/css/v1/css_product_inputs_service" + +class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + css_product_input = {} + feed_id = 42 + + insert_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::InsertCssProductInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] + assert_equal 42, request["feed_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_css_product_input_client_stub.call_rpc_count + end + end + + def test_update_css_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + css_product_input = {} + update_mask = {} + + update_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input_client_stub.call_rpc_count + end + end + + def test_delete_css_product_input + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + supplemental_feed_id = 42 + + delete_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_css_product_input, name + assert_kind_of ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["supplemental_feed_id"] + assert request.has_supplemental_feed_id? + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_css_product_input_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_css_product_input_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::CssProductInputsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb new file mode 100644 index 000000000000..7e9ac41a013e --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_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/shopping/css/v1/css_products_service" + +class ::Google::Shopping::Css::V1::CssProductsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_css_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.css_product_path account: "value0", css_product: "value1" + assert_equal "accounts/value0/cssProducts/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb new file mode 100644 index 000000000000..8482e96080f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb @@ -0,0 +1,209 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service/rest" + + +class ::Google::Shopping::Css::V1::CssProductsService::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_css_product + # Create test objects. + client_result = ::Google::Shopping::Css::V1::CssProduct.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_css_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_get_css_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_css_product_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_css_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_css_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_css_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_css_product_client_stub.call_count + end + end + end + + def test_list_css_products + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListCssProductsResponse.new + http_response = OpenStruct.new 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_css_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_list_css_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_css_products_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb new file mode 100644 index 000000000000..693ba1506589 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/css_products_pb" +require "google/shopping/css/v1/css_products_service" + +class ::Google::Shopping::Css::V1::CssProductsService::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_css_product + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::CssProduct.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_css_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_css_product, name + assert_kind_of ::Google::Shopping::Css::V1::GetCssProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_css_product_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_css_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_css_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_css_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_css_product_client_stub.call_rpc_count + end + end + + def test_list_css_products + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListCssProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_css_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_css_products, name + assert_kind_of ::Google::Shopping::Css::V1::ListCssProductsRequest, 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_css_products_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::CssProductsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb new file mode 100644 index 000000000000..ebdbed9d44c1 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_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/shopping/css/v1/quota_service" + +class ::Google::Shopping::Css::V1::QuotaService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb new file mode 100644 index 000000000000..a8c80cc10365 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service/rest" + + +class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups + # Create test objects. + client_result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new + http_response = OpenStruct.new 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_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb new file mode 100644 index 000000000000..5454c9c25375 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/css/v1/quota_pb" +require "google/shopping/css/v1/quota_service" + +class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups + # Create GRPC objects. + grpc_response = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_quota_groups, name + assert_kind_of ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, 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_quota_groups_client_stub do + # Create client + c = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Css::V1::QuotaService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-css-v1/test/helper.rb b/owl-bot-staging/google-shopping-css-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-css-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..788a554a5593 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta", + "distribution_name": "google-shopping-merchant-accounts-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml new file mode 100644 index 000000000000..5fa9eb10ddf1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-accounts-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..456fb36054bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts/v1beta" + +::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md new file mode 100644 index 000000000000..be41cd32e2eb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-accounts-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/accounts/v1beta" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new +request = ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new # (request fields as keyword arguments...) +response = client.get_account_tax request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/accounts/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-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-shopping-merchant-accounts`. +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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile new file mode 100644 index 000000000000..dc4519177094 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta/account_tax_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts-v1beta" + header "google-shopping-merchant-accounts-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..c3348ff56d9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json @@ -0,0 +1,504 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.accounts.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1beta", + "services": { + "AccountTaxService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client", + "rpcs": { + "GetAccountTax": { + "methods": [ + "get_account_tax" + ] + }, + "ListAccountTax": { + "methods": [ + "list_account_tax" + ] + }, + "UpdateAccountTax": { + "methods": [ + "update_account_tax" + ] + } + } + } + } + }, + "AccountIssueService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client", + "rpcs": { + "ListAccountIssues": { + "methods": [ + "list_account_issues" + ] + } + } + } + } + }, + "UserService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client", + "rpcs": { + "GetUser": { + "methods": [ + "get_user" + ] + }, + "CreateUser": { + "methods": [ + "create_user" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "UpdateUser": { + "methods": [ + "update_user" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + } + } + } + } + }, + "AccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client", + "rpcs": { + "GetAccount": { + "methods": [ + "get_account" + ] + }, + "CreateAndConfigureAccount": { + "methods": [ + "create_and_configure_account" + ] + }, + "DeleteAccount": { + "methods": [ + "delete_account" + ] + }, + "UpdateAccount": { + "methods": [ + "update_account" + ] + }, + "ListAccounts": { + "methods": [ + "list_accounts" + ] + }, + "ListSubAccounts": { + "methods": [ + "list_sub_accounts" + ] + } + } + } + } + }, + "AutofeedSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client", + "rpcs": { + "GetAutofeedSettings": { + "methods": [ + "get_autofeed_settings" + ] + }, + "UpdateAutofeedSettings": { + "methods": [ + "update_autofeed_settings" + ] + } + } + } + } + }, + "AutomaticImprovementsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "get_automatic_improvements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "update_automatic_improvements" + ] + } + } + } + } + }, + "BusinessIdentityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client", + "rpcs": { + "GetBusinessIdentity": { + "methods": [ + "get_business_identity" + ] + }, + "UpdateBusinessIdentity": { + "methods": [ + "update_business_identity" + ] + } + } + } + } + }, + "BusinessInfoService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client", + "rpcs": { + "GetBusinessInfo": { + "methods": [ + "get_business_info" + ] + }, + "UpdateBusinessInfo": { + "methods": [ + "update_business_info" + ] + } + } + } + } + }, + "CheckoutSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", + "rpcs": { + "GetCheckoutSettings": { + "methods": [ + "get_checkout_settings" + ] + }, + "CreateCheckoutSettings": { + "methods": [ + "create_checkout_settings" + ] + }, + "UpdateCheckoutSettings": { + "methods": [ + "update_checkout_settings" + ] + }, + "DeleteCheckoutSettings": { + "methods": [ + "delete_checkout_settings" + ] + } + } + } + } + }, + "EmailPreferencesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client", + "rpcs": { + "GetEmailPreferences": { + "methods": [ + "get_email_preferences" + ] + }, + "UpdateEmailPreferences": { + "methods": [ + "update_email_preferences" + ] + } + } + } + } + }, + "GbpAccountsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client", + "rpcs": { + "ListGbpAccounts": { + "methods": [ + "list_gbp_accounts" + ] + }, + "LinkGbpAccount": { + "methods": [ + "link_gbp_account" + ] + } + } + } + } + }, + "HomepageService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client", + "rpcs": { + "GetHomepage": { + "methods": [ + "get_homepage" + ] + }, + "UpdateHomepage": { + "methods": [ + "update_homepage" + ] + }, + "ClaimHomepage": { + "methods": [ + "claim_homepage" + ] + }, + "UnclaimHomepage": { + "methods": [ + "unclaim_homepage" + ] + } + } + } + } + }, + "LfpProvidersService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client", + "rpcs": { + "FindLfpProviders": { + "methods": [ + "find_lfp_providers" + ] + }, + "LinkLfpProvider": { + "methods": [ + "link_lfp_provider" + ] + } + } + } + } + }, + "OmnichannelSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client", + "rpcs": { + "GetOmnichannelSetting": { + "methods": [ + "get_omnichannel_setting" + ] + }, + "ListOmnichannelSettings": { + "methods": [ + "list_omnichannel_settings" + ] + }, + "CreateOmnichannelSetting": { + "methods": [ + "create_omnichannel_setting" + ] + }, + "UpdateOmnichannelSetting": { + "methods": [ + "update_omnichannel_setting" + ] + }, + "RequestInventoryVerification": { + "methods": [ + "request_inventory_verification" + ] + } + } + } + } + }, + "OnlineReturnPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client", + "rpcs": { + "GetOnlineReturnPolicy": { + "methods": [ + "get_online_return_policy" + ] + }, + "ListOnlineReturnPolicies": { + "methods": [ + "list_online_return_policies" + ] + }, + "CreateOnlineReturnPolicy": { + "methods": [ + "create_online_return_policy" + ] + }, + "UpdateOnlineReturnPolicy": { + "methods": [ + "update_online_return_policy" + ] + }, + "DeleteOnlineReturnPolicy": { + "methods": [ + "delete_online_return_policy" + ] + } + } + } + } + }, + "ProgramsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client", + "rpcs": { + "GetProgram": { + "methods": [ + "get_program" + ] + }, + "ListPrograms": { + "methods": [ + "list_programs" + ] + }, + "EnableProgram": { + "methods": [ + "enable_program" + ] + }, + "DisableProgram": { + "methods": [ + "disable_program" + ] + } + } + } + } + }, + "RegionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client", + "rpcs": { + "GetRegion": { + "methods": [ + "get_region" + ] + }, + "CreateRegion": { + "methods": [ + "create_region" + ] + }, + "UpdateRegion": { + "methods": [ + "update_region" + ] + }, + "DeleteRegion": { + "methods": [ + "delete_region" + ] + }, + "ListRegions": { + "methods": [ + "list_regions" + ] + } + } + } + } + }, + "ShippingSettingsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client", + "rpcs": { + "GetShippingSettings": { + "methods": [ + "get_shipping_settings" + ] + }, + "InsertShippingSettings": { + "methods": [ + "insert_shipping_settings" + ] + } + } + } + } + }, + "TermsOfServiceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client", + "rpcs": { + "GetTermsOfService": { + "methods": [ + "get_terms_of_service" + ] + }, + "RetrieveLatestTermsOfService": { + "methods": [ + "retrieve_latest_terms_of_service" + ] + }, + "AcceptTermsOfService": { + "methods": [ + "accept_terms_of_service" + ] + } + } + } + } + }, + "TermsOfServiceAgreementStateService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client", + "rpcs": { + "GetTermsOfServiceAgreementState": { + "methods": [ + "get_terms_of_service_agreement_state" + ] + }, + "RetrieveForApplicationTermsOfServiceAgreementState": { + "methods": [ + "retrieve_for_application_terms_of_service_agreement_state" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec new file mode 100644 index 000000000000..b151765b5d27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts-v1beta" + gem.version = Google::Shopping::Merchant::Accounts::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center 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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb new file mode 100644 index 000000000000..c0b2d7879e0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb new file mode 100644 index 000000000000..e10eb5ebc89c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/account_tax_service" +require "google/shopping/merchant/accounts/v1beta/account_issue_service" +require "google/shopping/merchant/accounts/v1beta/user_service" +require "google/shopping/merchant/accounts/v1beta/accounts_service" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" +require "google/shopping/merchant/accounts/v1beta/business_identity_service" +require "google/shopping/merchant/accounts/v1beta/business_info_service" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" +require "google/shopping/merchant/accounts/v1beta/homepage_service" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" +require "google/shopping/merchant/accounts/v1beta/programs_service" +require "google/shopping/merchant/accounts/v1beta/regions_service" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" +require "google/shopping/merchant/accounts/v1beta/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/accounts/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb new file mode 100644 index 000000000000..49903c0040db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accessright.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/accessright.proto\x12(google.shopping.merchant.accounts.v1beta*_\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x42\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10\x41\x63\x63\x65ssRightProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccessRight").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb new file mode 100644 index 000000000000..b613248a4cd9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/client" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `AccountIssueService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + module AccountIssueService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb new file mode 100644 index 000000000000..43a790ecc274 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb @@ -0,0 +1,509 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + ## + # Client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1beta/accountissue_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 + + @account_issue_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountIssueService API. + # + # This class represents the configuration for AccountIssueService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb new file mode 100644 index 000000000000..bec671601e38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Credentials for the AccountIssueService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb new file mode 100644 index 000000000000..71d24f829fad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Path helper methods for the AccountIssueService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb new file mode 100644 index 000000000000..3b76683c97dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `AccountIssueService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + module AccountIssueService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb new file mode 100644 index 000000000000..83ae8b227f30 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + module Rest + ## + # REST client for the AccountIssueService service. + # + # Service to support `AccountIssueService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_issue_service_stub + + ## + # Configure the AccountIssueService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountIssueService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountIssueService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 + @account_issue_service_stub.universe_domain + end + + ## + # Create a new AccountIssueService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountIssueService 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 + + @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_issue_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 + @account_issue_service_stub.logger + end + + # Service calls + + ## + # Lists all account issues of a Merchant Center account. + # + # @overload list_account_issues(request, options = nil) + # Pass arguments to `list_account_issues` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) + # Pass arguments to `list_account_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @param language_code [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @param time_zone [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + # + # # Call the list_account_issues method. + # result = client.list_account_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + # p item + # end + # + def list_account_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_issue_service_stub.list_account_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountIssueService REST API. + # + # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_account_issues.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountIssueService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_account_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_issues + + # @private + def initialize parent_rpcs = nil + list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues + @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb new file mode 100644 index 000000000000..625c0f5e9a9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + module Rest + ## + # REST service stub for the AccountIssueService 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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] + # A result object deserialized from the server's reply + def list_account_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.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_account_issues REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/issues", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb new file mode 100644 index 000000000000..45fafd29eba8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/account_tax.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/tax_rule_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/account_tax.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x37google/shopping/merchant/accounts/v1beta/tax_rule.proto\"\xe6\x01\n\nAccountTax\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\ttax_rules\x18\x03 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.TaxRule:i\xea\x41\x66\n%merchantapi.googleapis.com/AccountTax\x12#accounts/{account}/accounttax/{tax}*\x0c\x61\x63\x63ountTaxes2\naccountTax\"S\n\x14GetAccountTaxRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/AccountTax\"\x9a\x01\n\x17UpdateAccountTaxRequest\x12N\n\x0b\x61\x63\x63ount_tax\x18\x01 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTaxB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"}\n\x15ListAccountTaxRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/AccountTax\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x16ListAccountTaxResponse\x12K\n\raccount_taxes\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTax\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x84\x06\n\x11\x41\x63\x63ountTaxService\x12\xc5\x01\n\rGetAccountTax\x12>.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/accounttax/*}\x12\xd5\x01\n\x0eListAccountTax\x12?.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest\x1a@.google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{parent=accounts/*}/accounttax\x12\x85\x02\n\x10UpdateAccountTax\x12\x41.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\"x\xda\x41\x17\x61\x63\x63ount_tax,update_mask\xda\x41\x0b\x61\x63\x63ount_tax\x82\xd3\xe4\x93\x02J2;/accounts/v1beta/{account_tax.name=accounts/*/accounttax/*}:\x0b\x61\x63\x63ount_tax\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x91\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0f\x41\x63\x63ountTaxProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountTax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountTax").msgclass + GetAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest").msgclass + UpdateAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest").msgclass + ListAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest").msgclass + ListAccountTaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb new file mode 100644 index 000000000000..fe883ee6aa6c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/client" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module AccountTaxService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_tax_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb new file mode 100644 index 000000000000..e854d0f8fc83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb @@ -0,0 +1,688 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + ## + # Client for the AccountTaxService service. + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_tax_service_stub + + ## + # Configure the AccountTaxService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountTaxService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountTaxService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @account_tax_service_stub.universe_domain + end + + ## + # Create a new AccountTaxService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountTaxService 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/shopping/merchant/accounts/v1beta/account_tax_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 + + @account_tax_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @account_tax_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 + @account_tax_service_stub.logger + end + + # Service calls + + ## + # Returns the tax rules that match the conditions of GetAccountTaxRequest + # + # @overload get_account_tax(request, options = nil) + # Pass arguments to `get_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_tax(name: nil) + # Pass arguments to `get_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name from which tax settings will be retrieved + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + # + # # Call the get_account_tax method. + # result = client.get_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def get_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :get_account_tax, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # + # @overload list_account_tax(request, options = nil) + # Pass arguments to `list_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @param page_token [::String] + # The token returned by the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + # + # # Call the list_account_tax method. + # result = client.list_account_tax request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p item + # end + # + def list_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :list_account_tax, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the tax settings of the account. + # + # @overload update_account_tax(request, options = nil) + # Pass arguments to `update_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_tax(account_tax: nil, update_mask: nil) + # Pass arguments to `update_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] + # Required. The tax setting that will be updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + # + # # Call the update_account_tax method. + # result = client.update_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def update_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.account_tax&.name + header_params["account_tax.name"] = request.account_tax.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_account_tax.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.call_rpc :update_account_tax, request, 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 AccountTaxService API. + # + # This class represents the configuration for AccountTaxService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account_tax to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountTaxService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_tax + ## + # RPC-specific configuration for `list_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_tax + ## + # RPC-specific configuration for `update_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_tax + + # @private + def initialize parent_rpcs = nil + get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax + @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config + list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax + @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config + update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax + @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb new file mode 100644 index 000000000000..fdecfb93cd56 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Credentials for the AccountTaxService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb new file mode 100644 index 000000000000..327a514a749b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Path helper methods for the AccountTaxService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified AccountTax resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/accounttax/{tax}` + # + # @param account [String] + # @param tax [String] + # + # @return [::String] + def account_tax_path account:, tax: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/accounttax/#{tax}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb new file mode 100644 index 000000000000..539c364b6e47 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module AccountTaxService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb new file mode 100644 index 000000000000..82f756ae1010 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb @@ -0,0 +1,624 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + module Rest + ## + # REST client for the AccountTaxService service. + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_tax_service_stub + + ## + # Configure the AccountTaxService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountTaxService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountTaxService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 + @account_tax_service_stub.universe_domain + end + + ## + # Create a new AccountTaxService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountTaxService 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 + + @account_tax_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_tax_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 + @account_tax_service_stub.logger + end + + # Service calls + + ## + # Returns the tax rules that match the conditions of GetAccountTaxRequest + # + # @overload get_account_tax(request, options = nil) + # Pass arguments to `get_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_tax(name: nil) + # Pass arguments to `get_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name from which tax settings will be retrieved + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + # + # # Call the get_account_tax method. + # result = client.get_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def get_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.get_account_tax request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # + # @overload list_account_tax(request, options = nil) + # Pass arguments to `list_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @param page_token [::String] + # The token returned by the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + # + # # Call the list_account_tax method. + # result = client.list_account_tax request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p item + # end + # + def list_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.list_account_tax request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, "account_taxes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the tax settings of the account. + # + # @overload update_account_tax(request, options = nil) + # Pass arguments to `update_account_tax` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_tax(account_tax: nil, update_mask: nil) + # Pass arguments to `update_account_tax` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] + # Required. The tax setting that will be updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + # + # # Call the update_account_tax method. + # result = client.update_account_tax request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + # p result + # + def update_account_tax request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_account_tax.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_tax.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_tax_service_stub.update_account_tax request, 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 AccountTaxService REST API. + # + # This class represents the configuration for AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_tax.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountTaxService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_tax + ## + # RPC-specific configuration for `list_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_tax + ## + # RPC-specific configuration for `update_account_tax` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_tax + + # @private + def initialize parent_rpcs = nil + get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax + @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config + list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax + @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config + update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax + @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb new file mode 100644 index 000000000000..1793880416fc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + module Rest + ## + # REST service stub for the AccountTaxService 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_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # A result object deserialized from the server's reply + def get_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] + # A result object deserialized from the server's reply + def list_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # A result object deserialized from the server's reply + def update_account_tax request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_tax_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_account_tax", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.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_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/accounttax", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_tax REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_tax_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{account_tax.name}", + body: "account_tax", + matches: [ + ["account_tax.name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb new file mode 100644 index 000000000000..91544da451e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/account_tax_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountTaxService + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountTaxService' + + # Returns the tax rules that match the conditions of GetAccountTaxRequest + rpc :GetAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax + # Lists the tax settings of the sub-accounts only in your + # Merchant Center account. + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + rpc :ListAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse + # Updates the tax settings of the account. + rpc :UpdateAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb new file mode 100644 index 000000000000..1221df9fb2c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accountissue.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/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/accountissue.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12Q\n\x08severity\x18\x03 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.Severity\x12i\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32J.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xde\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x62\n\x07impacts\x18\x02 \x03(\x0b\x32Q.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact\x1ap\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12Q\n\x08severity\x18\x02 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x19ListAccountIssuesResponse\x12N\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbb\x02\n\x13\x41\x63\x63ountIssueService\x12\xda\x01\n\x11ListAccountIssues\x12\x42.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest\x1a\x43.google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x41\x63\x63ountIssueProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue").msgclass + AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination").msgclass + AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact").msgclass + AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.Severity").enummodule + ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest").msgclass + ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb new file mode 100644 index 000000000000..c925c068fe0e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accountissue_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountIssueService + # Service to support `AccountIssueService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountIssueService' + + # Lists all account issues of a Merchant Center account. + rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb new file mode 100644 index 000000000000..ea1e691e4169 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/accountservices_pb' +require 'google/shopping/merchant/accounts/v1beta/user_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/accounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/accountservices.proto\x1a\x33google/shopping/merchant/accounts/v1beta/user.proto\x1a\x1agoogle/type/datetime.proto\"\x8a\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\radult_content\x18\x04 \x01(\x08\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:;\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\x9f\x06\n CreateAndConfigureAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12O\n\x05users\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.accounts.v1beta.CreateUserRequestB\x03\xe0\x41\x01\x12\x8a\x01\n\x17\x61\x63\x63\x65pt_terms_of_service\x18\x03 \x01(\x0b\x32_.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfServiceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12r\n\x07service\x18\x04 \x03(\x0b\x32\\.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1aq\n\x14\x41\x63\x63\x65ptTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xd0\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12[\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.AccountAggregationH\x00\x12\x41\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"merchantapi.googleapis.com/AccountH\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_providerB\x1a\n\x18_accept_terms_of_service\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x14UpdateAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"w\n\x17ListSubAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\t\n\x0f\x41\x63\x63ountsService\x12\xaf\x01\n\nGetAccount\x12;.google.shopping.merchant.accounts.v1beta.GetAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/accounts/v1beta/{name=accounts/*}\x12\xd3\x01\n\x19\x43reateAndConfigureAccount\x12J.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"7\x82\xd3\xe4\x93\x02\x31\",/accounts/v1beta/accounts:createAndConfigure:\x01*\x12\x9a\x01\n\rDeleteAccount\x12>.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$*\"/accounts/v1beta/{name=accounts/*}\x12\xd5\x01\n\rUpdateAccount\x12>.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"Q\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x35\x32*/accounts/v1beta/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xb0\x01\n\x0cListAccounts\x12=.google.shopping.merchant.accounts.v1beta.ListAccountsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListAccountsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/accounts/v1beta/accounts\x12\xe1\x01\n\x0fListSubAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse\"I\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x38\x12\x36/accounts/v1beta/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Account").msgclass + GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountRequest").msgclass + CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest").msgclass + CreateAndConfigureAccountRequest::AcceptTermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfService").msgclass + CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountService").msgclass + DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteAccountRequest").msgclass + UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountRequest").msgclass + ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsRequest").msgclass + ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsResponse").msgclass + ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest").msgclass + ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb new file mode 100644 index 000000000000..1db2def8535c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/accounts_service/client" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support Accounts API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + module AccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb new file mode 100644 index 000000000000..cfa723ef8c94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb @@ -0,0 +1,1000 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + ## + # Client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1beta/accounts_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 + + @accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The account to be created. + # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] + # Optional. Users to be added to the account. + # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.create_and_configure_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :create_and_configure_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.account&.name + header_params["account.name"] = request.account.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.list_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.provider + header_params["provider"] = request.provider + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountsService API. + # + # This class represents the configuration for AccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb new file mode 100644 index 000000000000..d2510c2f46bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Credentials for the AccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb new file mode 100644 index 000000000000..2be49373540a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Path helper methods for the AccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb new file mode 100644 index 000000000000..0d514d6bb48c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support Accounts API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + module AccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb new file mode 100644 index 000000000000..cdf36e4c6b04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb @@ -0,0 +1,931 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + module Rest + ## + # REST client for the AccountsService service. + # + # Service to support Accounts API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :accounts_service_stub + + ## + # Configure the AccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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 + @accounts_service_stub.universe_domain + end + + ## + # Create a new AccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountsService 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 + + @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @accounts_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 + @accounts_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + # + # @overload get_account(request, options = nil) + # Pass arguments to `get_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account(name: nil) + # Pass arguments to `get_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + # + # # Call the get_account method. + # result = client.get_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def get_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.get_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + # + # @overload create_and_configure_account(request, options = nil) + # Pass arguments to `create_and_configure_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) + # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The account to be created. + # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] + # Optional. Users to be added to the account. + # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + # + # # Call the create_and_configure_account method. + # result = client.create_and_configure_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def create_and_configure_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest + + # Converts hash and nil to an 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_and_configure_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_and_configure_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_and_configure_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.create_and_configure_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + # + # @overload delete_account(request, options = nil) + # Pass arguments to `delete_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account(name: nil, force: nil) + # Pass arguments to `delete_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @param force [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + # + # # Call the delete_account method. + # result = client.delete_account request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.delete_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + # + # @overload update_account(request, options = nil) + # Pass arguments to `update_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account(account: nil, update_mask: nil) + # Pass arguments to `update_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] + # Required. The new version of the account. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + # + # # Call the update_account method. + # result = client.update_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + # p result + # + def update_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.update_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + # + # @overload list_accounts(request, options = nil) + # Pass arguments to `list_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + # + # # Call the list_accounts method. + # result = client.list_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + # + # @overload list_sub_accounts(request, options = nil) + # Pass arguments to `list_sub_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provider [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + # + # # Call the list_sub_accounts method. + # result = client.list_sub_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + # p item + # end + # + def list_sub_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_sub_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sub_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @accounts_service_stub.list_sub_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AccountsService REST API. + # + # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account + ## + # RPC-specific configuration for `create_and_configure_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_and_configure_account + ## + # RPC-specific configuration for `delete_account` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account + ## + # RPC-specific configuration for `update_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account + ## + # RPC-specific configuration for `list_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accounts + ## + # RPC-specific configuration for `list_sub_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sub_accounts + + # @private + def initialize parent_rpcs = nil + get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account + @get_account = ::Gapic::Config::Method.new get_account_config + create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account + @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config + delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account + @delete_account = ::Gapic::Config::Method.new delete_account_config + update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account + @update_account = ::Gapic::Config::Method.new update_account_config + list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts + @list_accounts = ::Gapic::Config::Method.new list_accounts_config + list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts + @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..d62c09e78506 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/accounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + module Rest + ## + # REST service stub for the AccountsService 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_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def get_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def create_and_configure_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_and_configure_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # A result object deserialized from the server's reply + def update_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] + # A result object deserialized from the server's reply + def list_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] + # A result object deserialized from the server's reply + def list_sub_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sub_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.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_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_and_configure_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] + # 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_and_configure_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/accounts:createAndConfigure", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{account.name}", + body: "account", + matches: [ + ["account.name", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/accounts", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sub_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sub_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{provider}:listSubaccounts", + matches: [ + ["provider", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb new file mode 100644 index 000000000000..df57e5bd28dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb @@ -0,0 +1,75 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AccountsService + # Service to support Accounts API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountsService' + + # Retrieves an account from your Merchant Center account. + # After inserting, updating, or deleting an account, it may take several + # minutes before changes take effect. + rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Creates a standalone Merchant Center account with additional configuration. + # Adds the user that makes the request as an admin for the new account. + rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Deletes the specified account regardless of its type: standalone, MCA or + # sub-account. Deleting an MCA leads to the deletion of all of its + # sub-accounts. Executing this method requires admin access. + # The deletion succeeds only if the account does not provide services + # to any other account and has no processed offers. You can use the `force` + # parameter to override this. + rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Google::Protobuf::Empty + # Updates an account regardless of its type: standalone, MCA or sub-account. + # Executing this method requires admin access. + rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account + # Lists accounts accessible to the calling user and matching the + # constraints of the request such as page size or filters. + # This is not just listing the sub-accounts of an MCA, but all accounts the + # calling user has access to including other MCAs, linked accounts, + # standalone accounts and so on. If no filter is provided, then it returns + # accounts the user is directly added to. + rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse + # List all sub-accounts for a given multi client account. This is a + # convenience wrapper for the more powerful `ListAccounts` method. This + # method will produce the same results as calling `ListsAccounts` with the + # following filter: + # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` + rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb new file mode 100644 index 000000000000..cf8e6a5da5cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/accountservices.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/accountservices.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x14\n\x12\x41\x63\x63ountAggregationB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x41\x63\x63ountServicesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountAggregation").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb new file mode 100644 index 000000000000..2d2bb35eeb25 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb new file mode 100644 index 000000000000..6b3c5f535190 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb @@ -0,0 +1,579 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + ## + # Client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1beta/autofeedsettings_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 + + @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.autofeed_settings&.name + header_params["autofeed_settings.name"] = request.autofeed_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_autofeed_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutofeedSettingsService API. + # + # This class represents the configuration for AutofeedSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb new file mode 100644 index 000000000000..2ebbb8b964ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Credentials for the AutofeedSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb new file mode 100644 index 000000000000..4e13a4e879c1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Path helper methods for the AutofeedSettingsService API. + module Paths + ## + # Create a fully-qualified AutofeedSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/autofeedSettings` + # + # @param account [String] + # + # @return [::String] + def autofeed_settings_path account: + "accounts/#{account}/autofeedSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb new file mode 100644 index 000000000000..089d4e01e4f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + module AutofeedSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb new file mode 100644 index 000000000000..21ef0349a01e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb @@ -0,0 +1,522 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + module Rest + ## + # REST client for the AutofeedSettingsService service. + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :autofeed_settings_service_stub + + ## + # Configure the AutofeedSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutofeedSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutofeedSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 + @autofeed_settings_service_stub.universe_domain + end + + ## + # Create a new AutofeedSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutofeedSettingsService 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 + + @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @autofeed_settings_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 + @autofeed_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieves the autofeed settings of an account. + # + # @overload get_autofeed_settings(request, options = nil) + # Pass arguments to `get_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_autofeed_settings(name: nil) + # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + # + # # Call the get_autofeed_settings method. + # result = client.get_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def get_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.get_autofeed_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the autofeed settings of an account. + # + # @overload update_autofeed_settings(request, options = nil) + # Pass arguments to `update_autofeed_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) + # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] + # Required. The new version of the autofeed setting. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + # + # # Call the update_autofeed_settings method. + # result = client.update_autofeed_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + # p result + # + def update_autofeed_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_autofeed_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_autofeed_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @autofeed_settings_service_stub.update_autofeed_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutofeedSettingsService REST API. + # + # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_autofeed_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutofeedSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_autofeed_settings + ## + # RPC-specific configuration for `update_autofeed_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_autofeed_settings + + # @private + def initialize parent_rpcs = nil + get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings + @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config + update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings + @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..31c104de3eab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + module Rest + ## + # REST service stub for the AutofeedSettingsService 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_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # A result object deserialized from the server's reply + def get_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # A result object deserialized from the server's reply + def update_autofeed_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_autofeed_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.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_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_autofeed_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_autofeed_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{autofeed_settings.name}", + body: "autofeed_settings", + matches: [ + ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb new file mode 100644 index 000000000000..d9f92c16c605 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/autofeedsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xb1\x01\n\x1dUpdateAutofeedSettingsRequest\x12Z\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x41utofeedSettingsService\x12\xdb\x01\n\x13GetAutofeedSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/autofeedSettings}\x12\xa0\x02\n\x16UpdateAutofeedSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"\x80\x01\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x41utofeedSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutofeedSettings").msgclass + GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest").msgclass + UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb new file mode 100644 index 000000000000..700b9a9139ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/autofeedsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutofeedSettingsService + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AutofeedSettingsService' + + # Retrieves the autofeed settings of an account. + rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings + # Updates the autofeed settings of an account. + rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb new file mode 100644 index 000000000000..f49e147087f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb new file mode 100644 index 000000000000..954914055c6e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + ## + # Client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1beta/automaticimprovements_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 + + @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.automatic_improvements&.name + header_params["automatic_improvements.name"] = request.automatic_improvements.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_automatic_improvements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. + # + # This class represents the configuration for AutomaticImprovementsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb new file mode 100644 index 000000000000..f8387a866b10 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Credentials for the AutomaticImprovementsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb new file mode 100644 index 000000000000..9450fc09a397 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Path helper methods for the AutomaticImprovementsService API. + module Paths + ## + # Create a fully-qualified AutomaticImprovements resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/automaticImprovements` + # + # @param account [String] + # + # @return [::String] + def automatic_improvements_path account: + "accounts/#{account}/automaticImprovements" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb new file mode 100644 index 000000000000..351bcf6d3b94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + module AutomaticImprovementsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb new file mode 100644 index 000000000000..771dbbb7ade0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb @@ -0,0 +1,532 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + module Rest + ## + # REST client for the AutomaticImprovementsService service. + # + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :automatic_improvements_service_stub + + ## + # Configure the AutomaticImprovementsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticImprovementsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticImprovementsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 + @automatic_improvements_service_stub.universe_domain + end + + ## + # Create a new AutomaticImprovementsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticImprovementsService 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 + + @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @automatic_improvements_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 + @automatic_improvements_service_stub.logger + end + + # Service calls + + ## + # Retrieves the automatic improvements of an account. + # + # @overload get_automatic_improvements(request, options = nil) + # Pass arguments to `get_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_automatic_improvements(name: nil) + # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + # + # # Call the get_automatic_improvements method. + # result = client.get_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def get_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.get_automatic_improvements request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the automatic improvements of an account. + # + # @overload update_automatic_improvements(request, options = nil) + # Pass arguments to `update_automatic_improvements` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) + # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] + # Required. The new version of the automatic imrovements. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + # + # # Call the update_automatic_improvements method. + # result = client.update_automatic_improvements request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + # p result + # + def update_automatic_improvements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_automatic_improvements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_automatic_improvements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. + # + # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_automatic_improvements.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :get_automatic_improvements + ## + # RPC-specific configuration for `update_automatic_improvements` + # @return [::Gapic::Config::Method] + # + attr_reader :update_automatic_improvements + + # @private + def initialize parent_rpcs = nil + get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements + @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config + update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements + @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb new file mode 100644 index 000000000000..3b8079dd1fa9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + module Rest + ## + # REST service stub for the AutomaticImprovementsService 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_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # A result object deserialized from the server's reply + def get_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # A result object deserialized from the server's reply + def update_automatic_improvements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_automatic_improvements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.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_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_automatic_improvements REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_automatic_improvements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{automatic_improvements.name}", + body: "automatic_improvements", + matches: [ + ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb new file mode 100644 index 000000000000..d9465d26faaa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/shopping/merchant/accounts/v1beta/automaticimprovements.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Y\n\x0citem_updates\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x65\n\x12image_improvements\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovementsH\x01\x88\x01\x01\x12k\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xaa\x05\n\x14\x41utomaticItemUpdates\x12\x8a\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32^.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa4\x03\n\x1a\x41utomaticImageImprovements\x12\xa1\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32j.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xc0\x01\n\"UpdateAutomaticImprovementsRequest\x12\x64\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x9f\x05\n\x1c\x41utomaticImprovementsService\x12\xef\x01\n\x18GetAutomaticImprovements\x12I.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/accounts/v1beta/{name=accounts/*/automaticImprovements}\x12\xc3\x02\n\x1bUpdateAutomaticImprovements\x12L.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"\x94\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02i2O/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1a\x41utomaticImprovementsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImprovements").msgclass + AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates").msgclass + AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass + AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements").msgclass + AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass + AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements").msgclass + GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest").msgclass + UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb new file mode 100644 index 000000000000..50bbf1aa06a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/automaticimprovements_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module AutomaticImprovementsService + # Service to manage the automatic improvements of an account. The automatic + # improvements of the account can be used to automatically update products, + # improve images and shipping. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' + + # Retrieves the automatic improvements of an account. + rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements + # Updates the automatic improvements of an account. + rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb new file mode 100644 index 000000000000..d43f48202612 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/client" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb new file mode 100644 index 000000000000..6cd2a1560400 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb @@ -0,0 +1,580 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + ## + # Client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1beta/businessidentity_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 + + @business_identity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :get_business_identity, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_identity&.name + header_params["business_identity.name"] = request.business_identity.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_business_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. + # + # This class represents the configuration for BusinessIdentityService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb new file mode 100644 index 000000000000..411d0a8452ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Credentials for the BusinessIdentityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb new file mode 100644 index 000000000000..684dbc65841c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Path helper methods for the BusinessIdentityService API. + module Paths + ## + # Create a fully-qualified BusinessIdentity resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessIdentity` + # + # @param account [String] + # + # @return [::String] + def business_identity_path account: + "accounts/#{account}/businessIdentity" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb new file mode 100644 index 000000000000..d1f0814edc5c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + module BusinessIdentityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb new file mode 100644 index 000000000000..c3efad2cf64d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + module Rest + ## + # REST client for the BusinessIdentityService service. + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_identity_service_stub + + ## + # Configure the BusinessIdentityService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessIdentityService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessIdentityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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 + @business_identity_service_stub.universe_domain + end + + ## + # Create a new BusinessIdentityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessIdentityService 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 + + @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_identity_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 + @business_identity_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business identity of an account. + # + # @overload get_business_identity(request, options = nil) + # Pass arguments to `get_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_identity(name: nil) + # Pass arguments to `get_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + # + # # Call the get_business_identity method. + # result = client.get_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def get_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.get_business_identity request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the business identity of an account. Executing this method requires + # admin access. + # + # @overload update_business_identity(request, options = nil) + # Pass arguments to `update_business_identity` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_identity(business_identity: nil, update_mask: nil) + # Pass arguments to `update_business_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] + # Required. The new version of the business identity. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + # + # # Call the update_business_identity method. + # result = client.update_business_identity request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + # p result + # + def update_business_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_business_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. + # + # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_identity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessIdentityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_identity + ## + # RPC-specific configuration for `update_business_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_identity + + # @private + def initialize parent_rpcs = nil + get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity + @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config + update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity + @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb new file mode 100644 index 000000000000..650d5181843f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + module Rest + ## + # REST service stub for the BusinessIdentityService 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_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # A result object deserialized from the server's reply + def get_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # A result object deserialized from the server's reply + def update_business_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_business_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.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_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_identity REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_business_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{business_identity.name}", + body: "business_identity", + matches: [ + ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb new file mode 100644 index 000000000000..6bc1a26ad17a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_info_service/client" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support business info API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb new file mode 100644 index 000000000000..a58943d63128 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb @@ -0,0 +1,579 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + ## + # Client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1beta/businessinfo_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 + + @business_info_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :get_business_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_info&.name + header_params["business_info.name"] = request.business_info.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_business_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.call_rpc :update_business_info, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BusinessInfoService API. + # + # This class represents the configuration for BusinessInfoService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb new file mode 100644 index 000000000000..0308f8a5ad24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Credentials for the BusinessInfoService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb new file mode 100644 index 000000000000..0a2e4aaaee0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Path helper methods for the BusinessInfoService API. + module Paths + ## + # Create a fully-qualified BusinessInfo resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/businessInfo` + # + # @param account [String] + # + # @return [::String] + def business_info_path account: + "accounts/#{account}/businessInfo" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb new file mode 100644 index 000000000000..1a834ba1e2c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" +require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support business info API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + module BusinessInfoService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb new file mode 100644 index 000000000000..04bf182d6111 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb @@ -0,0 +1,522 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + module Rest + ## + # REST client for the BusinessInfoService service. + # + # Service to support business info API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_info_service_stub + + ## + # Configure the BusinessInfoService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessInfoService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessInfoService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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 + @business_info_service_stub.universe_domain + end + + ## + # Create a new BusinessInfoService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessInfoService 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 + + @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_info_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 + @business_info_service_stub.logger + end + + # Service calls + + ## + # Retrieves the business info of an account. + # + # @overload get_business_info(request, options = nil) + # Pass arguments to `get_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_business_info(name: nil) + # Pass arguments to `get_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + # + # # Call the get_business_info method. + # result = client.get_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def get_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.get_business_info request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the business info of an account. Executing this method requires + # admin access. + # + # @overload update_business_info(request, options = nil) + # Pass arguments to `update_business_info` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_business_info(business_info: nil, update_mask: nil) + # Pass arguments to `update_business_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] + # Required. The new version of the business info. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + # + # # Call the update_business_info method. + # result = client.update_business_info request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + # p result + # + def update_business_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_business_info.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_business_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_info_service_stub.update_business_info request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BusinessInfoService REST API. + # + # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_business_info.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 BusinessInfoService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_business_info + ## + # RPC-specific configuration for `update_business_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_business_info + + # @private + def initialize parent_rpcs = nil + get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info + @get_business_info = ::Gapic::Config::Method.new get_business_info_config + update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info + @update_business_info = ::Gapic::Config::Method.new update_business_info_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb new file mode 100644 index 000000000000..b7cc0315c746 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + module Rest + ## + # REST service stub for the BusinessInfoService 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_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # A result object deserialized from the server's reply + def get_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # A result object deserialized from the server's reply + def update_business_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_business_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.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_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_business_info REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_business_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{business_info.name}", + body: "business_info", + matches: [ + ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb new file mode 100644 index 000000000000..9dc1403d6850 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass + BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass + BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule + BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule + GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass + UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb new file mode 100644 index 000000000000..91a6e86252b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessidentity_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessIdentityService + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService' + + # Retrieves the business identity of an account. + rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity + # Updates the business identity of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb new file mode 100644 index 000000000000..254aa9f643ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/customerservice_pb' +require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb' +require 'google/type/phone_number_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xeb\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass + GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass + UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb new file mode 100644 index 000000000000..b69a18296f1e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessinfo_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module BusinessInfoService + # Service to support business info API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService' + + # Retrieves the business info of an account. + rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo + # Updates the business info of an account. Executing this method requires + # admin access. + rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb new file mode 100644 index 000000000000..6510004f596a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb new file mode 100644 index 000000000000..16ed9683aad9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb @@ -0,0 +1,776 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + ## + # Client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 + + @checkout_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.checkout_settings&.name + header_params["checkout_settings.name"] = request.checkout_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CheckoutSettingsService API. + # + # This class represents the configuration for CheckoutSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb new file mode 100644 index 000000000000..59b479846819 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Credentials for the CheckoutSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb new file mode 100644 index 000000000000..c2ce599e591d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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 Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Path helper methods for the CheckoutSettingsService API. + module Paths + ## + # Create a fully-qualified CheckoutSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}/checkoutSettings` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def checkout_settings_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}/checkoutSettings" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb new file mode 100644 index 000000000000..88121fed97ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + module CheckoutSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb new file mode 100644 index 000000000000..ea68b31ea7d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb @@ -0,0 +1,705 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST client for the CheckoutSettingsService service. + # + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :checkout_settings_service_stub + + ## + # Configure the CheckoutSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CheckoutSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CheckoutSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 + @checkout_settings_service_stub.universe_domain + end + + ## + # Create a new CheckoutSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CheckoutSettingsService 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 + + @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @checkout_settings_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 + @checkout_settings_service_stub.logger + end + + # Service calls + + ## + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + # + # @overload get_checkout_settings(request, options = nil) + # Pass arguments to `get_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_checkout_settings(name: nil) + # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + # + # # Call the get_checkout_settings method. + # result = client.get_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def get_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.get_checkout_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates `CheckoutSettings` for the given merchant. + # + # @overload create_checkout_settings(request, options = nil) + # Pass arguments to `create_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_checkout_settings(parent: nil, checkout_settings: nil) + # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The `CheckoutSettings` object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + # + # # Call the create_checkout_settings method. + # result = client.create_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def create_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest + + # Converts hash and nil to an 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_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.create_checkout_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates `CheckoutSettings` for the given merchant. + # + # @overload update_checkout_settings(request, options = nil) + # Pass arguments to `update_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) + # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + # + # # Call the update_checkout_settings method. + # result = client.update_checkout_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + # p result + # + def update_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.update_checkout_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + # + # @overload delete_checkout_settings(request, options = nil) + # Pass arguments to `delete_checkout_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_checkout_settings(name: nil) + # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + # + # # Call the delete_checkout_settings method. + # result = client.delete_checkout_settings request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_checkout_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_checkout_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @checkout_settings_service_stub.delete_checkout_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CheckoutSettingsService REST API. + # + # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_checkout_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 CheckoutSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_checkout_settings + ## + # RPC-specific configuration for `create_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :create_checkout_settings + ## + # RPC-specific configuration for `update_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_checkout_settings + ## + # RPC-specific configuration for `delete_checkout_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_checkout_settings + + # @private + def initialize parent_rpcs = nil + get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings + @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config + create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings + @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config + update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings + @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config + delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings + @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..ab727cfeab6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + module Rest + ## + # REST service stub for the CheckoutSettingsService 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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def get_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def create_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # A result object deserialized from the server's reply + def update_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_checkout_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_checkout_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] + # 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_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/checkoutSettings", + body: "checkout_settings", + matches: [ + ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{checkout_settings.name}", + body: "checkout_settings", + matches: [ + ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_checkout_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_checkout_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb new file mode 100644 index 000000000000..6d4141e47877 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass + CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass + UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass + DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass + CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass + CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule + CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule + UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb new file mode 100644 index 000000000000..bd81b765e3d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module CheckoutSettingsService + # Service for supporting [checkout + # settings](https://support.google.com/merchants/answer/13945960). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' + + # Gets `CheckoutSettings` for the given merchant. This includes + # information about review state, enrollment state and URL settings. + rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Creates `CheckoutSettings` for the given merchant. + rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Updates `CheckoutSettings` for the given merchant. + rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings + # Deletes `CheckoutSettings` and unenrolls merchant from + # `Checkout` program. + rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb new file mode 100644 index 000000000000..c17c763ded0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/customerservice.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/type/phone_number_pb' + + +descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb new file mode 100644 index 000000000000..d06d098a05ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/client" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb new file mode 100644 index 000000000000..6bb8c12c7625 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb @@ -0,0 +1,594 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + ## + # Client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1beta/emailpreferences_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 + + @email_preferences_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :get_email_preferences, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.email_preferences&.name + header_params["email_preferences.name"] = request.email_preferences.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_email_preferences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. + # + # This class represents the configuration for EmailPreferencesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb new file mode 100644 index 000000000000..720eb9a879d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Credentials for the EmailPreferencesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb new file mode 100644 index 000000000000..fd9c9497e227 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Path helper methods for the EmailPreferencesService API. + module Paths + ## + # Create a fully-qualified EmailPreferences resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}/emailPreferences` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def email_preferences_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}/emailPreferences" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb new file mode 100644 index 000000000000..b2676240e767 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + module EmailPreferencesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb new file mode 100644 index 000000000000..9e62fc5d7d5c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb @@ -0,0 +1,537 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + module Rest + ## + # REST client for the EmailPreferencesService service. + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :email_preferences_service_stub + + ## + # Configure the EmailPreferencesService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EmailPreferencesService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EmailPreferencesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 + @email_preferences_service_stub.universe_domain + end + + ## + # Create a new EmailPreferencesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EmailPreferencesService 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 + + @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @email_preferences_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 + @email_preferences_service_stub.logger + end + + # Service calls + + ## + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + # + # @overload get_email_preferences(request, options = nil) + # Pass arguments to `get_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_email_preferences(name: nil) + # Pass arguments to `get_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + # + # # Call the get_email_preferences method. + # result = client.get_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def get_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.get_email_preferences request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + # + # @overload update_email_preferences(request, options = nil) + # Pass arguments to `update_email_preferences` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_email_preferences(email_preferences: nil, update_mask: nil) + # Pass arguments to `update_email_preferences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] + # Required. Email Preferences to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + # + # # Call the update_email_preferences method. + # result = client.update_email_preferences request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + # p result + # + def update_email_preferences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_email_preferences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_email_preferences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. + # + # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_email_preferences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 EmailPreferencesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :get_email_preferences + ## + # RPC-specific configuration for `update_email_preferences` + # @return [::Gapic::Config::Method] + # + attr_reader :update_email_preferences + + # @private + def initialize parent_rpcs = nil + get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences + @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config + update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences + @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb new file mode 100644 index 000000000000..9193d3947fc0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + module Rest + ## + # REST service stub for the EmailPreferencesService 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_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # A result object deserialized from the server's reply + def get_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # A result object deserialized from the server's reply + def update_email_preferences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_email_preferences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.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_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_email_preferences REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_email_preferences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{email_preferences.name}", + body: "email_preferences", + matches: [ + ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb new file mode 100644 index 000000000000..37d52395e2bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/emailpreferences.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xed\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x61\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xb1\x01\n\x1dUpdateEmailPreferencesRequest\x12Z\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf3\x04\n\x17\x45mailPreferencesService\x12\xe3\x01\n\x13GetEmailPreferences\x12\x44.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/accounts/v1beta/{name=accounts/*/users/*/emailPreferences}\x12\xa8\x02\n\x16UpdateEmailPreferences\x12G.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"\x88\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02\x62\x32M/accounts/v1beta/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x45mailPreferencesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences").msgclass + EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState").enummodule + GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest").msgclass + UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb new file mode 100644 index 000000000000..4d4ab5d746e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/emailpreferences_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module EmailPreferencesService + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.EmailPreferencesService' + + # Returns the email preferences for a Merchant Center account user. + # + # Use the name=accounts/*/users/me/emailPreferences alias to get preferences + # for the authenticated user. + rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences + # Updates the email preferences for a Merchant Center account user. MCA users + # should specify the MCA account rather than a sub-account of the MCA. + # + # Preferences which are not explicitly selected in the update mask will not + # be updated. + # + # It is invalid for updates to specify an UNCONFIRMED opt-in status value. + # + # Use the name=accounts/*/users/me/emailPreferences alias to update + # preferences + # for the authenticated user. + rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb new file mode 100644 index 000000000000..cdcf6b1c5dfd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb new file mode 100644 index 000000000000..e66a0c58044a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb @@ -0,0 +1,600 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + ## + # Client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1beta/gbpaccounts_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 + + @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a GBP account for all countries. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the GbpAccountsService API. + # + # This class represents the configuration for GbpAccountsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb new file mode 100644 index 000000000000..293bf2160f68 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # Credentials for the GbpAccountsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb new file mode 100644 index 000000000000..a10be9d7033a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # Path helper methods for the GbpAccountsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb new file mode 100644 index 000000000000..e9b645d1dcbe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + module GbpAccountsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb new file mode 100644 index 000000000000..e50f06e555cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb @@ -0,0 +1,543 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + module Rest + ## + # REST client for the GbpAccountsService service. + # + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gbp_accounts_service_stub + + ## + # Configure the GbpAccountsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GbpAccountsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GbpAccountsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 + @gbp_accounts_service_stub.universe_domain + end + + ## + # Create a new GbpAccountsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GbpAccountsService 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 + + @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gbp_accounts_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 + @gbp_accounts_service_stub.logger + end + + # Service calls + + ## + # List the GBP accounts for a given merchant. + # + # @overload list_gbp_accounts(request, options = nil) + # Pass arguments to `list_gbp_accounts` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @param page_size [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + # + # # Call the list_gbp_accounts method. + # result = client.list_gbp_accounts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + # p item + # end + # + def list_gbp_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gbp_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a GBP account for all countries. + # + # @overload link_gbp_account(request, options = nil) + # Pass arguments to `link_gbp_account` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_gbp_account(parent: nil, gbp_email: nil) + # Pass arguments to `link_gbp_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @param gbp_email [::String] + # Required. The email address of the Business Profile account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + # + # # Call the link_gbp_account method. + # result = client.link_gbp_account request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + # p result + # + def link_gbp_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_gbp_account.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_gbp_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gbp_accounts_service_stub.link_gbp_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the GbpAccountsService REST API. + # + # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_gbp_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 GbpAccountsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_gbp_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gbp_accounts + ## + # RPC-specific configuration for `link_gbp_account` + # @return [::Gapic::Config::Method] + # + attr_reader :link_gbp_account + + # @private + def initialize parent_rpcs = nil + list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts + @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config + link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account + @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb new file mode 100644 index 000000000000..d969d96d14e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + module Rest + ## + # REST service stub for the GbpAccountsService 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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] + # A result object deserialized from the server's reply + def list_gbp_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_gbp_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] + # A result object deserialized from the server's reply + def link_gbp_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_gbp_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.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_gbp_accounts REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_gbp_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/gbpAccounts", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_gbp_account REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_gbp_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/gbpAccounts:linkGbpAccount", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb new file mode 100644 index 000000000000..ccccc7e7699e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/gbpaccounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12G\n\x04type\x18\x03 \x01(\x0e\x32\x39.google.shopping.merchant.accounts.v1beta.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListGbpAccountsResponse\x12J\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xa4\x04\n\x12GbpAccountsService\x12\xd9\x01\n\x0fListGbpAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/accounts/v1beta/{parent=accounts/*}/gbpAccounts\x12\xe8\x01\n\x0eLinkGbpAccount\x12?.google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest\x1a@.google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\"?/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10GbpAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount").msgclass + GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount.Type").enummodule + ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest").msgclass + ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse").msgclass + LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest").msgclass + LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb new file mode 100644 index 000000000000..2e204bc48d59 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/gbpaccounts_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module GbpAccountsService + # The service facilitates the management of a merchant's Google Business + # Profile (GBP) account settings. This API defines the following resource + # model: + # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.GbpAccountsService' + + # List the GBP accounts for a given merchant. + rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse + # Link the specified merchant to a GBP account for all countries. + rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb new file mode 100644 index 000000000000..9c3fea67be84 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/homepage.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/homepage.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x98\x01\n\x15UpdateHomepageRequest\x12I\n\x08homepage\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Q\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\x8d\x07\n\x0fHomepageService\x12\xbb\x01\n\x0bGetHomepage\x12<.google.shopping.merchant.accounts.v1beta.GetHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{name=accounts/*/homepage}\x12\xe4\x01\n\x0eUpdateHomepage\x12?.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"]\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02@24/accounts/v1beta/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xc1\x01\n\rClaimHomepage\x12>.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"<\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1beta/{name=accounts/*/homepage}:claim:\x01*\x12\xc7\x01\n\x0fUnclaimHomepage\x12@.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\">\x82\xd3\xe4\x93\x02\x38\"3/accounts/v1beta/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rHomepageProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Homepage").msgclass + GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetHomepageRequest").msgclass + UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest").msgclass + ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest").msgclass + UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb new file mode 100644 index 000000000000..d3c47366408e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" +require "google/shopping/merchant/accounts/v1beta/homepage_service/client" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support an API for a store's homepage. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + module HomepageService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb new file mode 100644 index 000000000000..79e2601a3950 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb @@ -0,0 +1,777 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + ## + # Client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1beta/homepage_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 + + @homepage_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :get_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.homepage&.name + header_params["homepage.name"] = request.homepage.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload claim_homepage(name: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. + # + # This class represents the configuration for HomepageService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb new file mode 100644 index 000000000000..cd945b510c57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Credentials for the HomepageService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb new file mode 100644 index 000000000000..58d7b7105437 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Path helper methods for the HomepageService API. + module Paths + ## + # Create a fully-qualified Homepage resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/homepage` + # + # @param account [String] + # + # @return [::String] + def homepage_path account: + "accounts/#{account}/homepage" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb new file mode 100644 index 000000000000..87039ee3847c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" +require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support an API for a store's homepage. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + module HomepageService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb new file mode 100644 index 000000000000..5c6975a7e0d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb @@ -0,0 +1,706 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + module Rest + ## + # REST client for the HomepageService service. + # + # Service to support an API for a store's homepage. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :homepage_service_stub + + ## + # Configure the HomepageService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all HomepageService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the HomepageService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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 + @homepage_service_stub.universe_domain + end + + ## + # Create a new HomepageService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the HomepageService 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 + + @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @homepage_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 + @homepage_service_stub.logger + end + + # Service calls + + ## + # Retrieves a store's homepage. + # + # @overload get_homepage(request, options = nil) + # Pass arguments to `get_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_homepage(name: nil) + # Pass arguments to `get_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + # + # # Call the get_homepage method. + # result = client.get_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def get_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.get_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a store's homepage. Executing this method requires admin access. + # + # @overload update_homepage(request, options = nil) + # Pass arguments to `update_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_homepage(homepage: nil, update_mask: nil) + # Pass arguments to `update_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] + # Required. The new version of the homepage. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + # + # # Call the update_homepage method. + # result = client.update_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def update_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.update_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + # + # @overload claim_homepage(request, options = nil) + # Pass arguments to `claim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload claim_homepage(name: nil) + # Pass arguments to `claim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + # + # # Call the claim_homepage method. + # result = client.claim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def claim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.claim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.claim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.claim_homepage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unclaims a store's homepage. Executing this method requires admin access. + # + # @overload unclaim_homepage(request, options = nil) + # Pass arguments to `unclaim_homepage` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unclaim_homepage(name: nil) + # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + # + # # Call the unclaim_homepage method. + # result = client.unclaim_homepage request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + # p result + # + def unclaim_homepage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unclaim_homepage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. + # + # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_homepage.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 HomepageService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :get_homepage + ## + # RPC-specific configuration for `update_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :update_homepage + ## + # RPC-specific configuration for `claim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :claim_homepage + ## + # RPC-specific configuration for `unclaim_homepage` + # @return [::Gapic::Config::Method] + # + attr_reader :unclaim_homepage + + # @private + def initialize parent_rpcs = nil + get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage + @get_homepage = ::Gapic::Config::Method.new get_homepage_config + update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage + @update_homepage = ::Gapic::Config::Method.new update_homepage_config + claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage + @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config + unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage + @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb new file mode 100644 index 000000000000..9c3d3c797d7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/homepage_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + module Rest + ## + # REST service stub for the HomepageService 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_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def get_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def update_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def claim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "claim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # A result object deserialized from the server's reply + def unclaim_homepage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unclaim_homepage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.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_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{homepage.name}", + body: "homepage", + matches: [ + ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the claim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_claim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:claim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unclaim_homepage REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unclaim_homepage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:unclaim", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/homepage/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb new file mode 100644 index 000000000000..9767309ba008 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/homepage_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module HomepageService + # Service to support an API for a store's homepage. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.HomepageService' + + # Retrieves a store's homepage. + rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Updates a store's homepage. Executing this method requires admin access. + rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Claims a store's homepage. Executing this method requires admin access. + # + # If the homepage is already claimed, this will recheck the + # verification (unless the merchant is exempted from claiming, which also + # exempts from verification) and return a successful response. If ownership + # can no longer be verified, it will return an error, but it won't clear the + # claim. In case of failure, a canonical error message will be returned: + # * PERMISSION_DENIED: user doesn't have the necessary permissions on this + # MC account; + # * FAILED_PRECONDITION: + # - The account is not a Merchant Center account; + # - MC account doesn't have a homepage; + # - claiming failed (in this case the error message will contain more + # details). + rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + # Unclaims a store's homepage. Executing this method requires admin access. + rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb new file mode 100644 index 000000000000..058cc57bb288 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/client" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb new file mode 100644 index 000000000000..5b337c8254dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb @@ -0,0 +1,603 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + ## + # Client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1beta/lfpproviders_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 + + @lfp_providers_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, + metadata: metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, 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 LfpProvidersService API. + # + # This class represents the configuration for LfpProvidersService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb new file mode 100644 index 000000000000..4e45d13facbf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # Credentials for the LfpProvidersService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb new file mode 100644 index 000000000000..668327ff63dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # Path helper methods for the LfpProvidersService API. + module Paths + ## + # Create a fully-qualified LfpProvider resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # + # @param account [String] + # @param omnichannel_setting [String] + # @param lfp_provider [String] + # + # @return [::String] + def lfp_provider_path account:, omnichannel_setting:, lfp_provider: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb new file mode 100644 index 000000000000..501c902dee0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + module LfpProvidersService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb new file mode 100644 index 000000000000..6a4e33bf15c3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb @@ -0,0 +1,546 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + module Rest + ## + # REST client for the LfpProvidersService service. + # + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_providers_service_stub + + ## + # Configure the LfpProvidersService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpProvidersService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpProvidersService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + @lfp_providers_service_stub.universe_domain + end + + ## + # Create a new LfpProvidersService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpProvidersService 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 + + @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lfp_providers_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 + @lfp_providers_service_stub.logger + end + + # Service calls + + ## + # Find the LFP provider candidates in a given country. + # + # @overload find_lfp_providers(request, options = nil) + # Pass arguments to `find_lfp_providers` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + # + # # Call the find_lfp_providers method. + # result = client.find_lfp_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + # p item + # end + # + def find_lfp_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.find_lfp_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Link the specified merchant to a LFP provider for the specified country. + # + # @overload link_lfp_provider(request, options = nil) + # Pass arguments to `link_lfp_provider` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload link_lfp_provider(name: nil, external_account_id: nil) + # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @param external_account_id [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + # + # # Call the link_lfp_provider method. + # result = client.link_lfp_provider request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + # p result + # + def link_lfp_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.link_lfp_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_providers_service_stub.link_lfp_provider request, 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 LfpProvidersService REST API. + # + # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 + # # find_lfp_providers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.find_lfp_providers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 LfpProvidersService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `find_lfp_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :find_lfp_providers + ## + # RPC-specific configuration for `link_lfp_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :link_lfp_provider + + # @private + def initialize parent_rpcs = nil + find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers + @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config + link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider + @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb new file mode 100644 index 000000000000..490af09ca942 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + module Rest + ## + # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] + # A result object deserialized from the server's reply + def find_lfp_providers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "find_lfp_providers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] + # A result object deserialized from the server's reply + def link_lfp_provider request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "link_lfp_provider", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.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 find_lfp_providers REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_find_lfp_providers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/lfpProviders:find", + matches: [ + ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the link_lfp_provider REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_link_lfp_provider_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:linkLfpProvider", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb new file mode 100644 index 000000000000..672686b1abaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/lfpproviders.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\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\"\x81\x01\n\x18\x46indLfpProvidersResponse\x12L\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xdd\x04\n\x13LfpProvidersService\x12\xf8\x01\n\x10\x46indLfpProviders\x12\x41.google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest\x1a\x42.google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\x81\x02\n\x0fLinkLfpProvider\x12@.google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\"W/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11LfpProvidersProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LfpProvider").msgclass + FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest").msgclass + FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse").msgclass + LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest").msgclass + LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb new file mode 100644 index 000000000000..f8deaf08100e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/lfpproviders_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module LfpProvidersService + # The service facilitates the management of a merchant's LFP provider settings. + # This API defines the following resource model: + # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.LfpProvidersService' + + # Find the LFP provider candidates in a given country. + rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse + # Link the specified merchant to a LFP provider for the specified country. + rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb new file mode 100644 index 000000000000..a05a5462fd00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb new file mode 100644 index 000000000000..50ace30f1702 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb @@ -0,0 +1,894 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + ## + # Client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1beta/omnichannelsettings_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 + + @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.omnichannel_setting&.name + header_params["omnichannel_setting.name"] = request.omnichannel_setting.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_omnichannel_setting.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. + # + # This class represents the configuration for OmnichannelSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb new file mode 100644 index 000000000000..b68c12fb3003 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + # Credentials for the OmnichannelSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb new file mode 100644 index 000000000000..e50d1ca4f146 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + # Path helper methods for the OmnichannelSettingsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OmnichannelSetting resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # + # @param account [String] + # @param omnichannel_setting [String] + # + # @return [::String] + def omnichannel_setting_path account:, omnichannel_setting: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb new file mode 100644 index 000000000000..263f2eb40bce --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + module OmnichannelSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb new file mode 100644 index 000000000000..072ffc5c5e3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb @@ -0,0 +1,816 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + module Rest + ## + # REST client for the OmnichannelSettingsService service. + # + # The service facilitates the management of a merchant's omnichannel settings. + # ## This API defines the following resource model: + # + # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :omnichannel_settings_service_stub + + ## + # Configure the OmnichannelSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OmnichannelSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OmnichannelSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 + @omnichannel_settings_service_stub.universe_domain + end + + ## + # Create a new OmnichannelSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OmnichannelSettingsService 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 + + @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @omnichannel_settings_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 + @omnichannel_settings_service_stub.logger + end + + # Service calls + + ## + # Get the omnichannel settings for a given merchant. + # + # @overload get_omnichannel_setting(request, options = nil) + # Pass arguments to `get_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_omnichannel_setting(name: nil) + # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + # + # # Call the get_omnichannel_setting method. + # result = client.get_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def get_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all the omnichannel settings for a given merchant. + # + # @overload list_omnichannel_settings(request, options = nil) + # Pass arguments to `list_omnichannel_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + # + # # Call the list_omnichannel_settings method. + # result = client.list_omnichannel_settings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p item + # end + # + def list_omnichannel_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create the omnichannel settings for a given merchant. + # + # @overload create_omnichannel_setting(request, options = nil) + # Pass arguments to `create_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) + # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + # + # # Call the create_omnichannel_setting method. + # result = client.create_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def create_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest + + # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the omnichannel setting for a given merchant in a given country. + # + # @overload update_omnichannel_setting(request, options = nil) + # Pass arguments to `update_omnichannel_setting` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) + # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + # + # # Call the update_omnichannel_setting method. + # result = client.update_omnichannel_setting request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + # p result + # + def update_omnichannel_setting request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Requests inventory verification for a given merchant in a given country. + # + # @overload request_inventory_verification(request, options = nil) + # Pass arguments to `request_inventory_verification` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload request_inventory_verification(name: nil) + # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + # + # # Call the request_inventory_verification method. + # result = client.request_inventory_verification request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + # p result + # + def request_inventory_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_inventory_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. + # + # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_omnichannel_setting.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :get_omnichannel_setting + ## + # RPC-specific configuration for `list_omnichannel_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_omnichannel_settings + ## + # RPC-specific configuration for `create_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :create_omnichannel_setting + ## + # RPC-specific configuration for `update_omnichannel_setting` + # @return [::Gapic::Config::Method] + # + attr_reader :update_omnichannel_setting + ## + # RPC-specific configuration for `request_inventory_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :request_inventory_verification + + # @private + def initialize parent_rpcs = nil + get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting + @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config + list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings + @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config + create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting + @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config + update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting + @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config + request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification + @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..6ceefbcd5ee9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb @@ -0,0 +1,391 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OmnichannelSettingsService + module Rest + ## + # REST service stub for the OmnichannelSettingsService 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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def get_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] + # A result object deserialized from the server's reply + def list_omnichannel_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_omnichannel_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def create_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # A result object deserialized from the server's reply + def update_omnichannel_setting request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_omnichannel_setting", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] + # A result object deserialized from the server's reply + def request_inventory_verification request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "request_inventory_verification", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.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_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_omnichannel_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_omnichannel_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] + # 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_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", + body: "omnichannel_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_omnichannel_setting REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_omnichannel_setting_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{omnichannel_setting.name}", + body: "omnichannel_setting", + matches: [ + ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the request_inventory_verification REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_inventory_verification_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:requestInventoryVerification", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb new file mode 100644 index 000000000000..7c74b858526a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/omnichannelsettings.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nBgoogle/shopping/merchant/accounts/v1beta/omnichannelsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe3\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x08lsf_type\x18\x0c \x01(\x0e\x32\x44.google.shopping.merchant.accounts.v1beta.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12H\n\x08in_stock\x18\r \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.InStockB\x03\xe0\x41\x01\x12\x45\n\x06pickup\x18\x0e \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.PickupB\x03\xe0\x41\x01\x12H\n\x08lfp_link\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.LfpLinkB\x03\xe0\x41\x03\x12L\n\x03odo\x18\x06 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.OnDisplayToOrderB\x03\xe0\x41\x01\x12\x43\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.AboutB\x03\xe0\x41\x01\x12\x64\n\x16inventory_verification\x18\x08 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all existing return policies for a given merchant. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given merchant. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :create_online_return_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing return policy for a given merchant. + # + # @overload update_online_return_policy(request, options = nil) + # Pass arguments to `update_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) + # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + # + # # Call the update_online_return_policy method. + # result = client.update_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def update_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.online_return_policy&.name + header_params["online_return_policy.name"] = request.online_return_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :update_online_return_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.call_rpc :delete_online_return_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the OnlineReturnPolicyService API. + # + # This class represents the configuration for OnlineReturnPolicyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `update_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy + @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb new file mode 100644 index 000000000000..65cce8eedd0a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # Credentials for the OnlineReturnPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb new file mode 100644 index 000000000000..99da2a7379d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # Path helper methods for the OnlineReturnPolicyService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified OnlineReturnPolicy resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/onlineReturnPolicies/{return_policy}` + # + # @param account [String] + # @param return_policy [String] + # + # @return [::String] + def online_return_policy_path account:, return_policy: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/onlineReturnPolicies/#{return_policy}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb new file mode 100644 index 000000000000..aae7187d3bc3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + module OnlineReturnPolicyService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb new file mode 100644 index 000000000000..444f346f95aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb @@ -0,0 +1,821 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + module Rest + ## + # REST client for the OnlineReturnPolicyService service. + # + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :online_return_policy_service_stub + + ## + # Configure the OnlineReturnPolicyService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OnlineReturnPolicyService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OnlineReturnPolicyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 + @online_return_policy_service_stub.universe_domain + end + + ## + # Create a new OnlineReturnPolicyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OnlineReturnPolicyService 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 + + @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @online_return_policy_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @online_return_policy_service_stub.logger + end + + # Service calls + + ## + # Gets an existing return policy for a given merchant. + # + # @overload get_online_return_policy(request, options = nil) + # Pass arguments to `get_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_online_return_policy(name: nil) + # Pass arguments to `get_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new + # + # # Call the get_online_return_policy method. + # result = client.get_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def get_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.get_online_return_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all existing return policies for a given merchant. + # + # @overload list_online_return_policies(request, options = nil) + # Pass arguments to `list_online_return_policies` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + # + # # Call the list_online_return_policies method. + # result = client.list_online_return_policies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p item + # end + # + def list_online_return_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_online_return_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new return policy for a given merchant. + # + # @overload create_online_return_policy(request, options = nil) + # Pass arguments to `create_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_online_return_policy(parent: nil, online_return_policy: nil) + # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The return policy object to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + # + # # Call the create_online_return_policy method. + # result = client.create_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def create_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest + + # Converts hash and nil to an 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_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.create_online_return_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing return policy for a given merchant. + # + # @overload update_online_return_policy(request, options = nil) + # Pass arguments to `update_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) + # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + # + # # Call the update_online_return_policy method. + # result = client.update_online_return_policy request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + # p result + # + def update_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.update_online_return_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing return policy. + # + # @overload delete_online_return_policy(request, options = nil) + # Pass arguments to `delete_online_return_policy` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_online_return_policy(name: nil) + # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + # + # # Call the delete_online_return_policy method. + # result = client.delete_online_return_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_online_return_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_online_return_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_online_return_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @online_return_policy_service_stub.delete_online_return_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the OnlineReturnPolicyService REST API. + # + # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_online_return_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_online_return_policy + ## + # RPC-specific configuration for `list_online_return_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_online_return_policies + ## + # RPC-specific configuration for `create_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_online_return_policy + ## + # RPC-specific configuration for `update_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_online_return_policy + ## + # RPC-specific configuration for `delete_online_return_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_online_return_policy + + # @private + def initialize parent_rpcs = nil + get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy + @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config + list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies + @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config + create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy + @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config + update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy + @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config + delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy + @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb new file mode 100644 index 000000000000..dedd98287a41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + module Rest + ## + # REST service stub for the OnlineReturnPolicyService 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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def get_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] + # A result object deserialized from the server's reply + def list_online_return_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_online_return_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def create_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # A result object deserialized from the server's reply + def update_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_online_return_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_online_return_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_online_return_policies REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_online_return_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] + # 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_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", + body: "online_return_policy", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{online_return_policy.name}", + body: "online_return_policy", + matches: [ + ["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_online_return_policy REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_online_return_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb new file mode 100644 index 000000000000..0fe2ffb749d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/online_return_policy_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module OnlineReturnPolicyService + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService' + + # Gets an existing return policy for a given merchant. + rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Lists all existing return policies for a given merchant. + rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse + # Creates a new return policy for a given merchant. + rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Updates an existing return policy for a given merchant. + rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy + # Deletes an existing return policy. + rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb new file mode 100644 index 000000000000..54a151690147 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto + +require 'google/protobuf' + + +descriptor_data = "\nEgoogle/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x12(google.shopping.merchant.accounts.v1beta*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x9d\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1bPhoneVerificationStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.PhoneVerificationState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb new file mode 100644 index 000000000000..b4a19137e869 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/programs.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/programs.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12K\n\x05state\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12^\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\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\"t\n\x14ListProgramsResponse\x12\x43\n\x08programs\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\x84\x07\n\x0fProgramsService\x12\xba\x01\n\nGetProgram\x12;.google.shopping.merchant.accounts.v1beta.GetProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{name=accounts/*/programs/*}\x12\xcd\x01\n\x0cListPrograms\x12=.google.shopping.merchant.accounts.v1beta.ListProgramsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListProgramsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{parent=accounts/*}/programs\x12\xca\x01\n\rEnableProgram\x12>.google.shopping.merchant.accounts.v1beta.EnableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1beta/{name=accounts/*/programs/*}:enable:\x01*\x12\xcd\x01\n\x0e\x44isableProgram\x12?.google.shopping.merchant.accounts.v1beta.DisableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/accounts/v1beta/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rProgramsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program").msgclass + Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.Requirement").msgclass + Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.State").enummodule + GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetProgramRequest").msgclass + ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsRequest").msgclass + ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsResponse").msgclass + EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EnableProgramRequest").msgclass + DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DisableProgramRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb new file mode 100644 index 000000000000..5c31844c5c2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" +require "google/shopping/merchant/accounts/v1beta/programs_service/paths" +require "google/shopping/merchant/accounts/v1beta/programs_service/client" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/programs_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + module ProgramsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "programs_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb new file mode 100644 index 000000000000..361868712e90 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb @@ -0,0 +1,788 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + ## + # Client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1beta/programs_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 + + @programs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :get_program, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. + # + # This class represents the configuration for ProgramsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb new file mode 100644 index 000000000000..2935731c5fc6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Credentials for the ProgramsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb new file mode 100644 index 000000000000..3b9b815133bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Path helper methods for the ProgramsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Program resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/programs/{program}` + # + # @param account [String] + # @param program [String] + # + # @return [::String] + def program_path account:, program: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/programs/#{program}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb new file mode 100644 index 000000000000..ffbd61628a98 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.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" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" +require "google/shopping/merchant/accounts/v1beta/programs_service/paths" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + module ProgramsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb new file mode 100644 index 000000000000..13115347e581 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb @@ -0,0 +1,717 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + module Rest + ## + # REST client for the ProgramsService service. + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :programs_service_stub + + ## + # Configure the ProgramsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProgramsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProgramsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 + @programs_service_stub.universe_domain + end + + ## + # Create a new ProgramsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProgramsService 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 + + @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @programs_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 + @programs_service_stub.logger + end + + # Service calls + + ## + # Retrieves the specified program for the account. + # + # @overload get_program(request, options = nil) + # Pass arguments to `get_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_program(name: nil) + # Pass arguments to `get_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + # + # # Call the get_program method. + # result = client.get_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def get_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.get_program request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves all programs for the account. + # + # @overload list_programs(request, options = nil) + # Pass arguments to `list_programs` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_programs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_programs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + # + # # Call the list_programs method. + # result = client.list_programs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + # p item + # end + # + def list_programs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_programs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_programs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.list_programs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload enable_program(request, options = nil) + # Pass arguments to `enable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_program(name: nil) + # Pass arguments to `enable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + # + # # Call the enable_program method. + # result = client.enable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def enable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.enable_program request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + # + # @overload disable_program(request, options = nil) + # Pass arguments to `disable_program` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_program(name: nil) + # Pass arguments to `disable_program` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + # + # # Call the disable_program method. + # result = client.disable_program request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + # p result + # + def disable_program request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_program.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_program.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @programs_service_stub.disable_program request, 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 ProgramsService REST API. + # + # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_program.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ProgramsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_program` + # @return [::Gapic::Config::Method] + # + attr_reader :get_program + ## + # RPC-specific configuration for `list_programs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_programs + ## + # RPC-specific configuration for `enable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_program + ## + # RPC-specific configuration for `disable_program` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_program + + # @private + def initialize parent_rpcs = nil + get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program + @get_program = ::Gapic::Config::Method.new get_program_config + list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs + @list_programs = ::Gapic::Config::Method.new list_programs_config + enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program + @enable_program = ::Gapic::Config::Method.new enable_program_config + disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program + @disable_program = ::Gapic::Config::Method.new disable_program_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb new file mode 100644 index 000000000000..bb7144364d14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/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/shopping/merchant/accounts/v1beta/programs_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + module Rest + ## + # REST service stub for the ProgramsService 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_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def get_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] + # A result object deserialized from the server's reply + def list_programs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_programs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def enable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] + # A result object deserialized from the server's reply + def disable_program request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_program", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.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_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_programs REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_programs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/programs", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:enable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_program REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_program_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{name}:disable", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb new file mode 100644 index 000000000000..8282a0f080fc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/programs_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ProgramsService + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService' + + # Retrieves the specified program for the account. + rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + # Retrieves all programs for the account. + rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse + # Enable participation in the specified program for the account. Executing + # this method requires admin access. + rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + # Disable participation in the specified program for the account. Executing + # this method requires admin access. + rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb new file mode 100644 index 000000000000..012299b8a9d6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/regions.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"q\n\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass + CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass + UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass + DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass + ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass + ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass + Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass + Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass + Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass + Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb new file mode 100644 index 000000000000..a6f7d439e86b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" +require "google/shopping/merchant/accounts/v1beta/regions_service/paths" +require "google/shopping/merchant/accounts/v1beta/regions_service/client" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/regions_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + module RegionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regions_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb new file mode 100644 index 000000000000..a240185dfa7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb @@ -0,0 +1,888 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + ## + # Client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1beta/regions_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 + + @regions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The region to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :create_region, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.region&.name + header_params["region.name"] = request.region.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :update_region, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :delete_region, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, request, response, 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 RegionsService API. + # + # This class represents the configuration for RegionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb new file mode 100644 index 000000000000..536fce1bdfaf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Credentials for the RegionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb new file mode 100644 index 000000000000..b6f5e812e70d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Path helper methods for the RegionsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified Region resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/regions/{region}` + # + # @param account [String] + # @param region [String] + # + # @return [::String] + def region_path account:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/regions/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb new file mode 100644 index 000000000000..f359bf4bc293 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" +require "google/shopping/merchant/accounts/v1beta/regions_service/paths" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + module RegionsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb new file mode 100644 index 000000000000..2068a53a1b70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb @@ -0,0 +1,810 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + module Rest + ## + # REST client for the RegionsService service. + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regions_service_stub + + ## + # Configure the RegionsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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 + @regions_service_stub.universe_domain + end + + ## + # Create a new RegionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionsService 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 + + @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @regions_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 + @regions_service_stub.logger + end + + # Service calls + + ## + # Retrieves a region defined in your Merchant Center account. + # + # @overload get_region(request, options = nil) + # Pass arguments to `get_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_region(name: nil) + # Pass arguments to `get_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + # + # # Call the get_region method. + # result = client.get_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def get_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload create_region(request, options = nil) + # Pass arguments to `create_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_region(parent: nil, region_id: nil, region: nil) + # Pass arguments to `create_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @param region_id [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The region to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + # + # # Call the create_region method. + # result = client.create_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def create_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest + + # Converts hash and nil to an 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_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.create_region request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a region definition in your Merchant Center account. Executing this + # method requires admin access. + # + # @overload update_region(request, options = nil) + # Pass arguments to `update_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_region(region: nil, update_mask: nil) + # Pass arguments to `update_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] + # Required. The updated region. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + # + # # Call the update_region method. + # result = client.update_region request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + # p result + # + def update_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.update_region request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + # + # @overload delete_region(request, options = nil) + # Pass arguments to `delete_region` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_region(name: nil) + # Pass arguments to `delete_region` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + # + # # Call the delete_region method. + # result = client.delete_region request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_region request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_region.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_region.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.delete_region request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the regions in your Merchant Center account. + # + # @overload list_regions(request, options = nil) + # Pass arguments to `list_regions` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + # + # # Call the list_regions method. + # result = client.list_regions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + # p item + # end + # + def list_regions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regions_service_stub.list_regions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. + # + # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_region.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 RegionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_region` + # @return [::Gapic::Config::Method] + # + attr_reader :get_region + ## + # RPC-specific configuration for `create_region` + # @return [::Gapic::Config::Method] + # + attr_reader :create_region + ## + # RPC-specific configuration for `update_region` + # @return [::Gapic::Config::Method] + # + attr_reader :update_region + ## + # RPC-specific configuration for `delete_region` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_region + ## + # RPC-specific configuration for `list_regions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regions + + # @private + def initialize parent_rpcs = nil + get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region + @get_region = ::Gapic::Config::Method.new get_region_config + create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region + @create_region = ::Gapic::Config::Method.new create_region_config + update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region + @update_region = ::Gapic::Config::Method.new update_region_config + delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region + @delete_region = ::Gapic::Config::Method.new delete_region_config + list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions + @list_regions = ::Gapic::Config::Method.new list_regions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb new file mode 100644 index 000000000000..2705002746ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/regions_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + module Rest + ## + # REST service stub for the RegionsService 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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def get_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def create_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # A result object deserialized from the server's reply + def update_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_region request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_region", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] + # A result object deserialized from the server's reply + def list_regions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_regions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.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_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] + # 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_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/regions", + body: "region", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{region.name}", + body: "region", + matches: [ + ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_region REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_region_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_regions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/regions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb new file mode 100644 index 000000000000..dcb5e918d1ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/regions_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module RegionsService + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.RegionsService' + + # Retrieves a region defined in your Merchant Center account. + rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Creates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Updates a region definition in your Merchant Center account. Executing this + # method requires admin access. + rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region + # Deletes a region definition from your Merchant Center account. Executing + # this method requires admin access. + rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Google::Protobuf::Empty + # Lists the regions in your Merchant Center account. + rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb new file mode 100644 index 000000000000..7a948b075dea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" +require "google/shopping/merchant/accounts/v1beta/version" + +module Google + module Shopping + module Merchant + module Accounts + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/accounts/v1beta/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb new file mode 100644 index 000000000000..883a132363a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/client" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb new file mode 100644 index 000000000000..98d6c89c513f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb @@ -0,0 +1,576 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + ## + # Client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1beta/shippingsettings_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 + + @shipping_settings_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a merchant with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] + # Required. The new version of the account. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ShippingSettingsService API. + # + # This class represents the configuration for ShippingSettingsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb new file mode 100644 index 000000000000..b3b8b543ed1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + # Credentials for the ShippingSettingsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb new file mode 100644 index 000000000000..29bb68e960e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + # Path helper methods for the ShippingSettingsService API. + module Paths + ## + # Create a fully-qualified ShippingSettings resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/shippingSettings` + # + # @param account [String] + # + # @return [::String] + def shipping_settings_path account: + "accounts/#{account}/shippingSettings" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb new file mode 100644 index 000000000000..0d14c8f4c394 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to get method call shipping setting information per Merchant API + # method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + module ShippingSettingsService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb new file mode 100644 index 000000000000..cbb1cb183061 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb @@ -0,0 +1,519 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + module Rest + ## + # REST client for the ShippingSettingsService service. + # + # Service to get method call shipping setting information per Merchant API + # method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shipping_settings_service_stub + + ## + # Configure the ShippingSettingsService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShippingSettingsService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 + @shipping_settings_service_stub.universe_domain + end + + ## + # Create a new ShippingSettingsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShippingSettingsService 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 + + @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @shipping_settings_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 + @shipping_settings_service_stub.logger + end + + # Service calls + + ## + # Retrieve shipping setting information. + # + # @overload get_shipping_settings(request, options = nil) + # Pass arguments to `get_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_shipping_settings(name: nil) + # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + # + # # Call the get_shipping_settings method. + # result = client.get_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def get_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replace the shipping setting of a merchant with the request shipping + # setting. Executing this method requires admin access. + # + # @overload insert_shipping_settings(request, options = nil) + # Pass arguments to `insert_shipping_settings` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) + # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] + # Required. The new version of the account. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + # + # # Call the insert_shipping_settings method. + # result = client.insert_shipping_settings request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + # p result + # + def insert_shipping_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_shipping_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shipping_settings_service_stub.insert_shipping_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ShippingSettingsService REST API. + # + # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_shipping_settings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ShippingSettingsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shipping_settings + ## + # RPC-specific configuration for `insert_shipping_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_shipping_settings + + # @private + def initialize parent_rpcs = nil + get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings + @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config + insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings + @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb new file mode 100644 index 000000000000..40faa8e51671 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module ShippingSettingsService + module Rest + ## + # REST service stub for the ShippingSettingsService 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_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # A result object deserialized from the server's reply + def get_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # A result object deserialized from the server's reply + def insert_shipping_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "insert_shipping_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.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_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_shipping_settings REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_shipping_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/shippingSettings:insert", + body: "shipping_setting", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb new file mode 100644 index 000000000000..c3a11939d0fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/shippingsettings.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/shopping/type/types_pb' + + +descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/shippingsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xcb\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x08services\x18\x02 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.ServiceB\x03\xe0\x41\x01\x12L\n\nwarehouses\x18\x03 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xc7\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12W\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12M\n\x0brate_groups\x18\x06 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.RateGroupB\x03\xe0\x41\x01\x12Z\n\rshipment_type\x18\x07 \x01(\x0e\x32>.google.shopping.merchant.accounts.v1beta.Service.ShipmentTypeH\x04\x88\x01\x01\x12=\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x05\x88\x01\x01\x12h\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32@.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTableH\x06\x88\x01\x01\x12X\n\x0cstore_config\x18\n \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Service.StoreConfigH\x07\x88\x01\x01\x12_\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32@.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xe2\x06\n\x0bStoreConfig\x12o\n\x12store_service_type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\rcutoff_config\x18\x03 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12O\n\x0eservice_radius\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.DistanceH\x02\x88\x01\x01\x1a\xf5\x02\n\x0c\x43utoffConfig\x12z\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf7\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb6\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12J\n\x04unit\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xb0\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12U\n\x10shipping_address\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\\\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12]\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xb5\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12N\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12W\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.TransitTableH\x05\x88\x01\x01\x12\x66\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x06\x88\x01\x01\x12\x65\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x07\x88\x01\x01\x12q\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf4\x01\n\x11\x42usinessDayConfig\x12_\n\rbusiness_days\x18\x01 \x03(\x0e\x32\x43.google.shopping.merchant.accounts.v1beta.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\xa7\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12J\n\x0csingle_value\x18\x02 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueH\x00\x88\x01\x01\x12H\n\nmain_table\x18\x03 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableH\x01\x88\x01\x01\x12G\n\tsubtables\x18\x04 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableB\x03\xe0\x41\x01\x12Q\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\xaa\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12P\n\x0brow_headers\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12N\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersH\x02\x88\x01\x01\x12@\n\x04rows\x18\x04 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1beta.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xac\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12X\n\x04rows\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf9\x01\n\x0eTransitTimeRow\x12k\n\x06values\x18\x01 \x03(\x0b\x32V.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\x81\x02\n\x16MinimumOrderValueTable\x12{\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x84\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12O\n\tlocations\x18\x05 \x03(\x0b\x32\x37.google.shopping.merchant.accounts.v1beta.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"J\n\x03Row\x12\x43\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\x8f\x01\n\x1dInsertShippingSettingsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10shipping_setting\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.ShippingSettingsB\x03\xe0\x41\x02\x32\xb8\x04\n\x17ShippingSettingsService\x12\xdb\x01\n\x13GetShippingSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/shippingSettings}\x12\xf5\x01\n\x16InsertShippingSettings\x12G.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"V\x82\xd3\xe4\x93\x02P\" e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the state of the agreement for the application terms of service. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceAgreementStateService API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb new file mode 100644 index 000000000000..08f405184324 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Credentials for the TermsOfServiceAgreementStateService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb new file mode 100644 index 000000000000..8f1f50a9834f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Path helper methods for the TermsOfServiceAgreementStateService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfServiceAgreementState resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` + # + # @param account [String] + # @param identifier [String] + # + # @return [::String] + def terms_of_service_agreement_state_path account:, identifier: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb new file mode 100644 index 000000000000..33c9185e4e0a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfServiceAgreementState` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + module TermsOfServiceAgreementStateService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb new file mode 100644 index 000000000000..f99ed2289e41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb @@ -0,0 +1,521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + module Rest + ## + # REST client for the TermsOfServiceAgreementStateService service. + # + # Service to support `TermsOfServiceAgreementState` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_agreement_state_service_stub + + ## + # Configure the TermsOfServiceAgreementStateService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceAgreementStateService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceAgreementStateService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 + @terms_of_service_agreement_state_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceAgreementStateService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceAgreementStateService 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 + + @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_agreement_state_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 + @terms_of_service_agreement_state_service_stub.logger + end + + # Service calls + + ## + # Returns the state of a terms of service agreement. + # + # @overload get_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service_agreement_state(name: nil) + # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new + # + # # Call the get_terms_of_service_agreement_state method. + # result = client.get_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def get_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the state of the agreement for the application terms of service. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) + # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + # + # # Call the retrieve_for_application_terms_of_service_agreement_state method. + # result = client.retrieve_for_application_terms_of_service_agreement_state request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + # p result + # + def retrieve_for_application_terms_of_service_agreement_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceAgreementStateService REST API. + # + # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service_agreement_state + ## + # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_for_application_terms_of_service_agreement_state + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state + @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config + retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state + @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb new file mode 100644 index 000000000000..c0a226adbfbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + module Rest + ## + # REST service stub for the TermsOfServiceAgreementStateService 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_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def get_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] + # A result object deserialized from the server's reply + def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_for_application_terms_of_service_agreement_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.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_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/termsOfServiceAgreementStates:retrieveForApplication", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb new file mode 100644 index 000000000000..7147a2323140 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/client" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfService` API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb new file mode 100644 index 000000000000..8ab3d9adf00f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb @@ -0,0 +1,672 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + ## + # Client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1beta/termsofservice_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 + + @terms_of_service_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceService API. + # + # This class represents the configuration for TermsOfServiceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb new file mode 100644 index 000000000000..46f3c20085d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Credentials for the TermsOfServiceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb new file mode 100644 index 000000000000..cbc86885e96c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Path helper methods for the TermsOfServiceService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified TermsOfService resource string. + # + # The resource will be in the following format: + # + # `termsOfService/{version}` + # + # @param version [String] + # + # @return [::String] + def terms_of_service_path version: + "termsOfService/#{version}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb new file mode 100644 index 000000000000..45348f1253e5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support `TermsOfService` API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + module TermsOfServiceService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb new file mode 100644 index 000000000000..4a0c6f76ea19 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb @@ -0,0 +1,616 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + module Rest + ## + # REST client for the TermsOfServiceService service. + # + # Service to support `TermsOfService` API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :terms_of_service_service_stub + + ## + # Configure the TermsOfServiceService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TermsOfServiceService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TermsOfServiceService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 + @terms_of_service_service_stub.universe_domain + end + + ## + # Create a new TermsOfServiceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TermsOfServiceService 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 + + @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @terms_of_service_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 + @terms_of_service_service_stub.logger + end + + # Service calls + + ## + # Retrieves the `TermsOfService` associated with the provided version. + # + # @overload get_terms_of_service(request, options = nil) + # Pass arguments to `get_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_terms_of_service(name: nil) + # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + # + # # Call the get_terms_of_service method. + # result = client.get_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def get_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.get_terms_of_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + # + # @overload retrieve_latest_terms_of_service(request, options = nil) + # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) + # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + # + # # Call the retrieve_latest_terms_of_service method. + # result = client.retrieve_latest_terms_of_service request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + # p result + # + def retrieve_latest_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accepts a `TermsOfService`. Executing this method requires admin access. + # + # @overload accept_terms_of_service(request, options = nil) + # Pass arguments to `accept_terms_of_service` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) + # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @param account [::String] + # Required. The account for which to accept the ToS. + # @param region_code [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + # + # # Call the accept_terms_of_service method. + # result = client.accept_terms_of_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def accept_terms_of_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.accept_terms_of_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @terms_of_service_service_stub.accept_terms_of_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TermsOfServiceService REST API. + # + # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_terms_of_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 TermsOfServiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_terms_of_service + ## + # RPC-specific configuration for `retrieve_latest_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_latest_terms_of_service + ## + # RPC-specific configuration for `accept_terms_of_service` + # @return [::Gapic::Config::Method] + # + attr_reader :accept_terms_of_service + + # @private + def initialize parent_rpcs = nil + get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service + @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config + retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service + @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config + accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service + @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb new file mode 100644 index 000000000000..e44a62b60c86 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + module Rest + ## + # REST service stub for the TermsOfServiceService 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_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # A result object deserialized from the server's reply + def get_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] + # A result object deserialized from the server's reply + def retrieve_latest_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_latest_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def accept_terms_of_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "accept_terms_of_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_latest_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/termsOfService:retrieveLatest", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the accept_terms_of_service REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_accept_terms_of_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}:accept", + matches: [ + ["name", %r{^termsOfService/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb new file mode 100644 index 000000000000..e47173662cd5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofservice.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/merchant/accounts/v1beta/termsofservicekind_pb' + + +descriptor_data = "\n=google/shopping/merchant/accounts/v1beta/termsofservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\"\xb2\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12J\n\x04kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x90\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x04kind\x18\x02 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x32\xc7\x05\n\x15TermsOfServiceService\x12\xca\x01\n\x11GetTermsOfService\x12\x42.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1beta/{name=termsOfService/*}\x12\xdf\x01\n\x1cRetrieveLatestTermsOfService\x12M.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"6\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1beta/termsOfService:retrieveLatest\x12\xb5\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x45.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x95\x01\n,com.google.shopping.merchant.accounts.v1betaB\x13TermsOfServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfService").msgclass + GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest").msgclass + RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest").msgclass + AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb new file mode 100644 index 000000000000..f300591e6416 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofservice_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceService + # Service to support `TermsOfService` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceService' + + # Retrieves the `TermsOfService` associated with the provided version. + rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService + # Retrieves the latest version of the `TermsOfService` for a given `kind` and + # `region_code`. + rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService + # Accepts a `TermsOfService`. Executing this method requires admin access. + rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb new file mode 100644 index 000000000000..1be87bcf62c8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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/shopping/merchant/accounts/v1beta/termsofservicekind_pb' +require 'google/type/date_pb' + + +descriptor_data = "\nKgoogle/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12[\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12I\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.AcceptedH\x00\x88\x01\x01\x12I\n\x08required\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.RequiredH\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xcf\x01\n\x08\x41\x63\x63\x65pted\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12<\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB\'\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12+\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"j\n\x08Required\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x14\n\x0ctos_file_uri\x18\x02 \x01(\t\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xcf\x05\n#TermsOfServiceAgreementStateService\x12\x8e\x02\n\x1fGetTermsOfServiceAgreementState\x12P.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/accounts/v1beta/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xcd\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12\x63.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"j\xda\x41\x06parent\x82\xd3\xe4\x93\x02[\x12Y/accounts/v1beta/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x01\n,com.google.shopping.merchant.accounts.v1betaB!TermsOfServiceAgreementStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState").msgclass + Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Accepted").msgclass + Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Required").msgclass + GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest").msgclass + RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb new file mode 100644 index 000000000000..edbccf383c55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module TermsOfServiceAgreementStateService + # Service to support `TermsOfServiceAgreementState` API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService' + + # Returns the state of a terms of service agreement. + rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState + # Retrieves the state of the agreement for the application terms of service. + rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb new file mode 100644 index 000000000000..35ab44903852 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x12(google.shopping.merchant.accounts.v1beta*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17TermsOfServiceKindProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceKind").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb new file mode 100644 index 000000000000..a4ae3c613309 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/user.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/merchant/accounts/v1beta/accessright_pb' + + +descriptor_data = "\n3google/shopping/merchant/accounts/v1beta/user.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1beta/accessright.proto\"\xc6\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.shopping.merchant.accounts.v1beta.User.StateB\x03\xe0\x41\x03\x12Q\n\raccess_rights\x18\x04 \x03(\x0e\x32\x35.google.shopping.merchant.accounts.v1beta.AccessRightB\x03\xe0\x41\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa8\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x04user\x18\x03 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x8c\x01\n\x11UpdateUserRequest\x12\x41\n\x04user\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"k\n\x11ListUsersResponse\x12=\n\x05users\x18\x01 \x03(\x0b\x32..google.shopping.merchant.accounts.v1beta.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xfc\x07\n\x0bUserService\x12\xae\x01\n\x07GetUser\x12\x38.google.shopping.merchant.accounts.v1beta.GetUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{name=accounts/*/users/*}\x12\xc1\x01\n\nCreateUser\x12;.google.shopping.merchant.accounts.v1beta.CreateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"F\xda\x41\x0bparent,user\x82\xd3\xe4\x93\x02\x32\"*/accounts/v1beta/{parent=accounts/*}/users:\x04user\x12\x9c\x01\n\nDeleteUser\x12;.google.shopping.merchant.accounts.v1beta.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/accounts/v1beta/{name=accounts/*/users/*}\x12\xcb\x01\n\nUpdateUser\x12;.google.shopping.merchant.accounts.v1beta.UpdateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"P\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x37\x32//accounts/v1beta/{user.name=accounts/*/users/*}:\x04user\x12\xc1\x01\n\tListUsers\x12:.google.shopping.merchant.accounts.v1beta.ListUsersRequest\x1a;.google.shopping.merchant.accounts.v1beta.ListUsersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8b\x01\n,com.google.shopping.merchant.accounts.v1betaB\tUserProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User").msgclass + User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User.State").enummodule + GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetUserRequest").msgclass + CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateUserRequest").msgclass + DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteUserRequest").msgclass + UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateUserRequest").msgclass + ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersRequest").msgclass + ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb new file mode 100644 index 000000000000..64065f29308c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/user_service/credentials" +require "google/shopping/merchant/accounts/v1beta/user_service/paths" +require "google/shopping/merchant/accounts/v1beta/user_service/client" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support user API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/accounts/v1beta/user_service" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/accounts/v1beta/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + module UserService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_service", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb new file mode 100644 index 000000000000..bd71f6b81cea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb @@ -0,0 +1,891 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + ## + # Client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @user_service_stub.universe_domain + end + + ## + # Create a new UserService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1beta/user_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 + + @user_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The user to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :create_user, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :delete_user, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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.user&.name + header_params["user.name"] = request.user.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :update_user, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, request, response, 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 UserService API. + # + # This class represents the configuration for UserService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb new file mode 100644 index 000000000000..b280d41b5a54 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Credentials for the UserService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb new file mode 100644 index 000000000000..e0b82b1f8295 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Path helper methods for the UserService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/users/{email}` + # + # @param account [String] + # @param email [String] + # + # @return [::String] + def user_path account:, email: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/users/#{email}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb new file mode 100644 index 000000000000..485719a9a0b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" + +require "google/shopping/merchant/accounts/v1beta/user_service/credentials" +require "google/shopping/merchant/accounts/v1beta/user_service/paths" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/client" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + ## + # Service to support user API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/accounts/v1beta/user_service/rest" + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + module UserService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb new file mode 100644 index 000000000000..5c14f5af0f01 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb @@ -0,0 +1,813 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + module Rest + ## + # REST client for the UserService service. + # + # Service to support user API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_service_stub + + ## + # Configure the UserService Client class. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserService clients + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::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 + @user_service_stub.universe_domain + end + + ## + # Create a new UserService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserService 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 + + @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @user_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 + @user_service_stub.logger + end + + # Service calls + + ## + # Retrieves a Merchant Center account user. + # + # @overload get_user(request, options = nil) + # Pass arguments to `get_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_user(name: nil) + # Pass arguments to `get_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + # + # # Call the get_user method. + # result = client.get_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def get_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires + # admin access. + # + # @overload create_user(request, options = nil) + # Pass arguments to `create_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_user(parent: nil, user_id: nil, user: nil) + # Pass arguments to `create_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @param user_id [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The user to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + # + # # Call the create_user method. + # result = client.create_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def create_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest + + # Converts hash and nil to an 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_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.create_user request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_user(name: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.delete_user request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Merchant Center account user. Executing this method requires + # admin access. + # + # @overload update_user(request, options = nil) + # Pass arguments to `update_user` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_user(user: nil, update_mask: nil) + # Pass arguments to `update_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + # + # # Call the update_user method. + # result = client.update_user request + # + # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + # p result + # + def update_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.update_user request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all users of a Merchant Center account. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @param page_token [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/accounts/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_service_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 UserService REST API. + # + # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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_user to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_user.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 UserService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_user` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user + ## + # RPC-specific configuration for `create_user` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `update_user` + # @return [::Gapic::Config::Method] + # + attr_reader :update_user + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + + # @private + def initialize parent_rpcs = nil + get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user + @get_user = ::Gapic::Config::Method.new get_user_config + create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user + @create_user = ::Gapic::Config::Method.new create_user_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user + @update_user = ::Gapic::Config::Method.new update_user_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb new file mode 100644 index 000000000000..c297a2b417f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts/v1beta/user_pb" + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + module Rest + ## + # REST service stub for the UserService 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_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def get_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.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_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def create_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # A result object deserialized from the server's reply + def update_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.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_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] + # 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_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/accounts/v1beta/{parent}/users", + body: "user", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/accounts/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_user REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/accounts/v1beta/{user.name}", + body: "user", + matches: [ + ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1beta/{parent}/users", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb new file mode 100644 index 000000000000..54dabf37a72e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/user_pb' + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + module UserService + # Service to support user API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.accounts.v1beta.UserService' + + # Retrieves a Merchant Center account user. + rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Creates a Merchant Center account user. Executing this method requires + # admin access. + rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Deletes a Merchant Center account user. Executing this method requires + # admin access. + rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Google::Protobuf::Empty + # Updates a Merchant Center account user. Executing this method requires + # admin access. + rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User + # Lists all users of a Merchant Center account. + rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb new file mode 100644 index 000000000000..9d433caf1711 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/accounts/v1beta/verificationmailsettings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1beta/verificationmailsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x02\n\x18VerificationMailSettings\x12|\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\xa4\x02\n,com.google.shopping.merchant.accounts.v1betaB\x1dVerificationMailSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb\xaa\x02(Google.Shopping.Merchant.Accounts.V1Beta\xca\x02(Google\\Shopping\\Merchant\\Accounts\\V1beta\xea\x02,Google::Shopping::Merchant::Accounts::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings").msgclass + VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb new file mode 100644 index 000000000000..b50ef86acc14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb new file mode 100644 index 000000000000..d51673a9fd9a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The access right. + module AccessRight + # Default value. This value is unused. + ACCESS_RIGHT_UNSPECIFIED = 0 + + # Standard access rights. + STANDARD = 1 + + # Admin access rights. + ADMIN = 2 + + # Users with this right have access to performance and insights. + PERFORMANCE_REPORTING = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb new file mode 100644 index 000000000000..fb5a0c3c1f9b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The tax settings of a merchant account. All methods require the admin role. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the tax setting. + # Format: + # "\\{account_tax.name=accounts/\\{account}}" + # @!attribute [r] account + # @return [::Integer] + # Output only. The ID of the account to which these account tax settings + # belong. + # @!attribute [rw] tax_rules + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TaxRule>] + # Tax rules. "Define the tax rules in each region. + # No tax will be presented if a region has no rule." + class AccountTax + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get tax settings + # @!attribute [rw] name + # @return [::String] + # Required. The name from which tax settings will be retrieved + class GetAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update the tax settings + # @!attribute [rw] account_tax + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] + # Required. The tax setting that will be updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated + class UpdateAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list all sub-account tax settings only for the requesting merchant + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of account tax. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tax settings to return in the response, used for + # paging. + # @!attribute [rw] page_token + # @return [::String] + # The token returned by the previous request. + class ListAccountTaxRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to account tax list request + # This method can only be called on a multi-client account, otherwise it'll + # return an error. + # @!attribute [rw] account_taxes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] + # Page of accounttax settings + # @!attribute [rw] next_page_token + # @return [::String] + # The token for the retrieval of the next page of account tax settings. + class ListAccountTaxResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb new file mode 100644 index 000000000000..5cce1309c12e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # An + # [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account issue. + # Format: `accounts/{account}/issues/{id}` + # @!attribute [rw] title + # @return [::String] + # The localized title of the issue. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] + # The overall severity of the issue. + # @!attribute [rw] impacted_destinations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination>] + # The impact this issue has on various destinations. + # @!attribute [rw] detail + # @return [::String] + # Further localized details about the issue. + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to Merchant Center Help Center providing further information about the + # issue and how to fix it. + class AccountIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a destination. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The impacted reporting context. + # @!attribute [rw] impacts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination::Impact>] + # The (negative) impact for various regions on the given destination. + class ImpactedDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The impact of the issue on a region. + # @!attribute [rw] region_code + # @return [::String] + # The [CLDR region code](https://cldr.unicode.org/) where this issue + # applies. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] + # The severity of the issue on the destination and region. + class Impact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All possible issue severities. + module Severity + # The severity is unknown. + SEVERITY_UNSPECIFIED = 0 + + # The issue causes offers to not serve. + CRITICAL = 1 + + # The issue might affect offers (in the future) or might be an + # indicator of issues with offers. + ERROR = 2 + + # The issue is a suggestion for improvement. + SUGGESTION = 3 + end + end + + # Request message for the `ListAccountIssues` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of issues. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of issues to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccountIssues` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountIssues` must + # match the call that provided the page token. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The issues in the response will have human-readable fields in the + # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), + # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be + # used. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to + # localize times in human-readable fields. For example 'America/Los_Angeles'. + # If not set, 'America/Los_Angeles' will be used. + class ListAccountIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountIssues` method. + # @!attribute [rw] account_issues + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] + # The issues from the specified account. + # @!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 ListAccountIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb new file mode 100644 index 000000000000..573b329cfd2a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # An account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the account. + # Format: `accounts/{account}` + # @!attribute [r] account_id + # @return [::Integer] + # Output only. The ID of the account. + # @!attribute [rw] account_name + # @return [::String] + # Required. A human-readable name of the account. See + # [store name](https://support.google.com/merchants/answer/160556) and + # [business name](https://support.google.com/merchants/answer/12159159) for + # more information. + # @!attribute [rw] adult_content + # @return [::Boolean] + # Whether this account contains adult content. + # @!attribute [r] test_account + # @return [::Boolean] + # Output only. Whether this is a test account. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Required. The time zone of the account. + # + # On writes, `time_zone` sets both the `reporting_time_zone` and the + # `display_time_zone`. + # + # For reads, `time_zone` always returns the `display_time_zone`. If + # `display_time_zone` doesn't exist for your account, `time_zone` is empty. + # @!attribute [rw] language_code + # @return [::String] + # Required. The account's [BCP-47 language + # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. + class Account + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to retrieve. + # Format: `accounts/{account}` + class GetAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateAndConfigureAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # Required. The account to be created. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest>] + # Optional. Users to be added to the account. + # @!attribute [rw] accept_terms_of_service + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService] + # Optional. The Terms of Service (ToS) to be accepted immediately upon + # account creation. + # @!attribute [rw] service + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService>] + # Required. An account service between the account to be created and the + # provider account is initialized as part of the creation. At least one such + # service needs to be provided. Currently exactly one of these needs to be + # `account_aggregation`, which means you can only create sub accounts, not + # standalone account through this method. Additional `account_management` or + # `product_management` services may be provided. + class CreateAndConfigureAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reference to a Terms of Service resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version in the format + # `termsOfService/{version}`. To retrieve the latest version, use the + # [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) + # method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). + # This is either a country when the ToS applies specifically to that + # country or `001` when it applies globally. + class AcceptTermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instructions to add account services during creation of the + # account. + # @!attribute [rw] account_aggregation + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountAggregation] + # The provider is an + # [aggregator](https://support.google.com/merchants/answer/188487) for + # the account. Payload for service type Account Aggregation. + # @!attribute [rw] provider + # @return [::String] + # Optional. The provider of the service. + # Format: `accounts/{account}` + class AddAccountService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for the `DeleteAccount` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the account to delete. + # Format: `accounts/{account}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to `true`, the account is deleted even if it provides + # services to other accounts or has processed offers. + class DeleteAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAccount` method. + # @!attribute [rw] account + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] + # Required. The new version of the account. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListAccounts` method. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Returns only accounts that match the + # [filter](/merchant/api/guides/accounts/filter). + # For more details, see the + # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). + class ListAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # The accounts matching the `ListAccountsRequest`. + # @!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 ListAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListSubAccounts` method. + # @!attribute [rw] provider + # @return [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service may return + # fewer than this value. If unspecified, at most 250 accounts are returned. + # The maximum value is 500; values above 500 are coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccounts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccounts` must match + # the call that provided the page token. + class ListSubAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListSubAccounts` method. + # @!attribute [rw] accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] + # The accounts for which the given parent account is an aggregator. + # @!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 ListSubAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb new file mode 100644 index 000000000000..19cff87b2479 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.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 Shopping + module Merchant + module Accounts + module V1beta + # `AccountAggregation` payload. + class AccountAggregation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb new file mode 100644 index 000000000000..e321368804c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the + # [autofeed](https://support.google.com/merchants/answer/7538732) settings. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings`. + # @!attribute [rw] enable_products + # @return [::Boolean] + # Required. Enables or disables product crawling through the autofeed for the + # given account. Autofeed accounts must meet [certain + # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), + # which can be checked through the `eligible` field. + # The account must **not** be a marketplace. + # When the autofeed is enabled for the first time, the products usually + # appear instantly. When re-enabling, it might take up to 24 hours for + # products to appear. + # @!attribute [r] eligible + # @return [::Boolean] + # Output only. Determines whether merchant is eligible for being enrolled + # into an autofeed. + class AutofeedSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutofeedSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the autofeed settings. + # Format: `accounts/{account}/autofeedSettings` + class GetAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutofeedSettings` method. + # @!attribute [rw] autofeed_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] + # Required. The new version of the autofeed setting. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateAutofeedSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb new file mode 100644 index 000000000000..08941d3f76aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the [automatic + # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) + # of an account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements`. + # @!attribute [rw] item_updates + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates] + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] image_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements] + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # This field is only updated (cleared) if provided in the update mask. + # @!attribute [rw] shipping_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticShippingImprovements] + # Not available for MCAs + # [accounts](https://support.google.com/merchants/answer/188487). By turning + # on [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times + # shown to shoppers using Google. More accurate delivery times, especially + # when faster, typically lead to better conversion rates. Google will improve + # your estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # This field is only updated (cleared) if provided in the update mask. + class AutomaticImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Turning on [item + # updates](https://support.google.com/merchants/answer/3246284) allows + # Google to automatically update items for you. When item updates are on, + # Google uses the structured data markup on the website and advanced data + # extractors to update the price and availability of the items. When the item + # updates are off, items with mismatched data aren't shown. + # @!attribute [rw] account_item_updates_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] + # Optional. Determines which attributes of the items should be automatically + # updated. If this field is not present and provided in the update mask, then + # the settings will be deleted. If there are no settings for subaccount, they + # are inherited from aggregator. + # @!attribute [r] effective_allow_price_updates + # @return [::Boolean] + # Output only. The effective value of allow_price_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_availability_updates + # @return [::Boolean] + # Output only. The effective value of allow_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_strict_availability_updates + # @return [::Boolean] + # Output only. The effective value of + # allow_strict_availability_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + # @!attribute [r] effective_allow_condition_updates + # @return [::Boolean] + # Output only. The effective value of allow_condition_updates. + # If account_item_updates_settings is present, then this value is the same. + # Otherwise, it represents the inherited value of the parent account. + # The default value is true if no settings are present. + # Read-only. + class AutomaticItemUpdates + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Item Updates. + # @!attribute [rw] allow_price_updates + # @return [::Boolean] + # If price updates are enabled, Google always updates the active price with + # the crawled information. + # @!attribute [rw] allow_availability_updates + # @return [::Boolean] + # If availability updates are enabled, any previous availability values + # get overwritten if Google finds an out-of-stock annotation on the offer's + # page. + # If additionally `allow_strict_availability_updates` field is set to + # true, values get overwritten if Google finds an in-stock annotation on + # the offer’s page. + # @!attribute [rw] allow_strict_availability_updates + # @return [::Boolean] + # If `allow_availability_updates` is enabled, items are automatically + # updated in all your Shopping target countries. By default, availability + # updates will only be applied to items that are 'out of stock' on your + # website but 'in stock' on Shopping. Set this to true to also update items + # that are 'in stock' on your website, but 'out of stock' on Google + # Shopping. In order for this field to have an effect, you must also set + # `allow_availability_updates`. + # @!attribute [rw] allow_condition_updates + # @return [::Boolean] + # If condition updates are enabled, Google always updates item condition + # with the condition detected from the details of your product. + class ItemUpdatesAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This improvement will attempt to automatically correct submitted images if + # they don't meet the [image + # requirements](https://support.google.com/merchants/answer/6324350), for + # example, removing overlays. If successful, the image will be replaced and + # approved. This improvement is only applied to images of disapproved offers. + # For more information see: [Automatic image + # improvements](https://support.google.com/merchants/answer/9242973) + # @!attribute [rw] account_image_improvements_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] + # Optional. Determines how the images should be automatically updated. + # If this field is not present and provided in the update mask, then the + # settings will be deleted. If there are no settings for subaccount, they are + # inherited from aggregator. + # @!attribute [r] effective_allow_automatic_image_improvements + # @return [::Boolean] + # Output only. The effective value of allow_automatic_image_improvements. + # If account_image_improvements_settings is present, then this value is the + # same. Otherwise, it represents the inherited value of the parent account. + # Read-only. + class AutomaticImageImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for the Automatic Image Improvements. + # @!attribute [rw] allow_automatic_image_improvements + # @return [::Boolean] + # Enables automatic image improvements. + class ImageImprovementsAccountLevelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Not available for MCAs + # [accounts](https://support.google.com/merchants/answer/188487). By turning on + # [automatic shipping + # improvements](https://support.google.com/merchants/answer/10027038), + # you are allowing Google to improve the accuracy of your delivery times shown + # to shoppers using Google. More accurate delivery times, especially when + # faster, typically lead to better conversion rates. Google will improve your + # estimated delivery times based on various factors: + # * Delivery address of an order + # * Current handling time and shipping time settings + # * Estimated weekdays or business days + # * Parcel tracking data + # @!attribute [rw] allow_shipping_improvements + # @return [::Boolean] + # Enables automatic shipping improvements. + class AutomaticShippingImprovements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAutomaticImprovements` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the automatic improvements. + # Format: `accounts/{account}/automaticImprovements` + class GetAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateAutomaticImprovements` method. + # @!attribute [rw] automatic_improvements + # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] + # Required. The new version of the automatic imrovements. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `item_updates` + # - `item_updates.account_level_settings` + # - `image_improvements` + # - `image_improvements.account_level_settings` + # - `shipping_improvements` + # - `shipping_improvements.allow_shipping_improvements` + class UpdateAutomaticImprovementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb new file mode 100644 index 000000000000..0e7e0a4c0677 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the [identity of a + # business](https://support.google.com/merchants/answer/12564247). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + # @!attribute [rw] promotions_consent + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::PromotionsConsent] + # Optional. Whether the identity attributes may be used for promotions. + # @!attribute [rw] black_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # black-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] women_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # women-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] veteran_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # veteran-owned. This optional field will only be available for merchants + # with a business country set to `US`. It is also not applicable for + # marketplaces or marketplace sellers. + # @!attribute [rw] latino_owned + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as being + # latino-owned. This optional field will only be available for merchants with + # a business country set to `US`. It is also not applicable for marketplaces + # or marketplace sellers. + # @!attribute [rw] small_business + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] + # Optional. Specifies whether the business identifies itself as a small + # business. This optional field will only be available for merchants with a + # business country set to `US`. It is also not applicable for marketplaces. + class BusinessIdentity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All information related to an identity attribute. + # @!attribute [rw] identity_declaration + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute::IdentityDeclaration] + # Required. The declaration of identity for this attribute. + class IdentityAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All possible settings regarding the declaration of an identity. + module IdentityDeclaration + # Default value indicating that no selection was made. + IDENTITY_DECLARATION_UNSPECIFIED = 0 + + # Indicates that the account identifies with the attribute. + SELF_IDENTIFIES_AS = 1 + + # Indicates that the account does not identify with the attribute. + DOES_NOT_SELF_IDENTIFY_AS = 2 + end + end + + # All possible settings regarding promotions related to the business + # identity. + module PromotionsConsent + # Default value indicating that no selection was made. + PROMOTIONS_CONSENT_UNSPECIFIED = 0 + + # Indicates that the account consented to having their business identity + # used for promotions. + PROMOTIONS_CONSENT_GIVEN = 1 + + # Indicates that the account did not consent to having their business + # identity used for promotions. + PROMOTIONS_CONSENT_DENIED = 2 + end + end + + # Request message for the `GetBusinessIdentity` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business identity. + # Format: `accounts/{account}/businessIdentity` + class GetBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessIdentity` method. + # @!attribute [rw] business_identity + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] + # Required. The new version of the business identity. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateBusinessIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb new file mode 100644 index 000000000000..3546fd5ee3a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.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 Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a business. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + # @!attribute [rw] address + # @return [::Google::Type::PostalAddress] + # Optional. The address of the business. + # @!attribute [r] phone + # @return [::Google::Type::PhoneNumber] + # Output only. The phone number of the business. + # @!attribute [r] phone_verification_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::PhoneVerificationState] + # Output only. The phone verification state of the business. + # @!attribute [rw] customer_service + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CustomerService] + # Optional. The customer service of the business. + # @!attribute [rw] korean_business_registration_number + # @return [::String] + # Optional. The 10-digit [Korean business registration + # number](https://support.google.com/merchants/answer/9037766) separated with + # dashes in the format: XXX-XX-XXXXX. + class BusinessInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetBusinessInfo` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the business info. + # Format: `accounts/{account}/businessInfo` + class GetBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateBusinessInfo` method. + # @!attribute [rw] business_info + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] + # Required. The new version of the business info. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateBusinessInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb new file mode 100644 index 000000000000..1acb59925679 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.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 Shopping + module Merchant + module Accounts + module V1beta + # Request message for `GetCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class GetCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateCheckoutSettings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the `CheckoutSettings` will be + # created. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The `CheckoutSettings` object to create. + class CreateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateCheckoutSettings` method. + # @!attribute [rw] checkout_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] + # Required. The updated version of the `CheckoutSettings`. + # The `name` field is used to identify the `CheckoutSettings`. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `eligible_destinations` + # - `uri_settings` + class UpdateCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteCheckoutSettings` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name/identifier of the merchant account. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + class DeleteCheckoutSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for + # a specific merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program configuration settings. + # Format: `accounts/{account}/programs/{program}/checkoutSettings` + # @!attribute [rw] uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # URI settings for cart or checkout URL. + # @!attribute [rw] eligible_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Optional. The destinations to which the checkout program applies, valid + # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` + # @!attribute [r] enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. Reflects the merchant enrollment state in `Checkout` program. + # @!attribute [r] review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. Reflects the merchant review state in `Checkout` program. + # This is set based on the data quality reviews of the URL provided by + # the merchant. + # A merchant with enrollment state + # as `ENROLLED` can be in the following review states: `IN_REVIEW`, + # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of + # `ENROLLED` before a review can begin for the merchant.For more details, + # check the help center doc. + # @!attribute [r] effective_uri_settings + # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] + # Output only. The effective value of `uri_settings` for a given merchant. If + # account level settings are present then this value will be a copy of url + # settings. Otherwise, it will have the value of the parent account (for only + # marketplace sellers). + # @!attribute [r] effective_enrollment_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] + # Output only. The effective value of enrollment_state for a given merchant + # ID. If account level settings are present then this value will be a copy of + # the account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + # @!attribute [r] effective_review_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] + # Output only. The effective value of `review_state` for a given merchant ID. + # If account level settings are present then this value will be a copy of the + # account level settings. Otherwise, it will have the value of the parent + # account (for only marketplace sellers). + class CheckoutSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum indicating the enrollment state of merchant in `Checkout` + # program. + module CheckoutEnrollmentState + # Default enrollment state when enrollment state is not specified. + CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Merchant has not enrolled into the program. + INACTIVE = 1 + + # Merchant has enrolled into the program by providing either an + # account level URL or checkout URLs as part of their feed. + ENROLLED = 2 + + # Merchant has previously enrolled but opted out of the program. + OPTED_OUT = 3 + end + + # Enum indicating the review state of merchant in `Checkout` + # program. + module CheckoutReviewState + # Default review state when review state is not specified. + CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 + + # Merchant provided URLs are being reviewed for data quality issues. + IN_REVIEW = 1 + + # Merchant account has been approved. Indicates the data quality checks + # have passed. + APPROVED = 2 + + # Merchant account has been disapproved due to data quality issues. + DISAPPROVED = 3 + end + end + + # URL settings for cart or checkout URL. + # @!attribute [rw] checkout_uri_template + # @return [::String] + # Checkout URL template. When the placeholders are expanded will redirect + # the buyer to the merchant checkout page with the item in the cart. For + # more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cart_uri_template + # @return [::String] + # Cart URL template. When the placeholders are expanded will redirect the + # buyer to the cart page on the merchant website with the selected + # item in cart. For more details, check the [help center + # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) + # + # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UriSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb new file mode 100644 index 000000000000..5a79025d60ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Customer service information. + # @!attribute [rw] uri + # @return [::String] + # Optional. The URI where customer service may be found. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address where customer service may be reached. + # @!attribute [rw] phone + # @return [::Google::Type::PhoneNumber] + # Optional. The phone number where customer service may be called. + class CustomerService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb new file mode 100644 index 000000000000..540f0e3bee48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The categories of notifications the user opted into / opted out of. The email + # preferences do not include mandatory announcements as users can't opt out of + # them. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the EmailPreferences. The endpoint is only + # supported for the authenticated user. + # @!attribute [rw] news_and_tips + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences::OptInState] + # Optional. Updates on new features, tips and best practices. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Opt in state of the email preference. + module OptInState + # Opt-in status is not specified. + OPT_IN_STATE_UNSPECIFIED = 0 + + # User has opted out of receiving this type of email. + OPTED_OUT = 1 + + # User has opted in to receiving this type of email. + OPTED_IN = 2 + + # User has opted in to receiving this type of email and the confirmation + # email has been sent, but user has not yet confirmed the opt in (applies + # only to certain countries). + UNCONFIRMED = 3 + end + end + + # Request message for GetEmailPreferences method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `EmailPreferences` resource. + # Format: `accounts/{account}/users/{email}/emailPreferences` + class GetEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateEmailPreferences method. + # @!attribute [rw] email_preferences + # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] + # Required. Email Preferences to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateEmailPreferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb new file mode 100644 index 000000000000..b8c64f5452ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a Google Business Profile (GBP) account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the GBP account. Format: + # `accounts/{account}/gbpAccount/{gbp_account}` + # @!attribute [rw] gbp_account_id + # @return [::String] + # The id of the GBP account. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount::Type] + # The type of the Business Profile. + # @!attribute [rw] gbp_account_name + # @return [::String] + # The name of the Business Profile. + # For personal accounts: Email id of the owner. + # For Business accounts: Name of the Business Account. + # @!attribute [rw] listing_count + # @return [::Integer] + # Number of listings under this account. + class GbpAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the GBP account. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The GBP account is a user account. + USER = 1 + + # The GBP account is a business account. + BUSINESS_ACCOUNT = 2 + end + end + + # Request message for the ListGbpAccounts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the GBP accounts are + # listed. Format: `accounts/{account}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `GbpAccount` resources to return. The + # service returns fewer than this value if the number of gbp accounts is less + # that than the `pageSize`. The default value is 50. The maximum value is + # 1000; If a value higher than the maximum is specified, then the `pageSize` + # will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListGbpAccounts` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListGbpAccounts` must + # match the call that provided the page token. + class ListGbpAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListGbpAccounts method. + # @!attribute [rw] gbp_accounts + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] + # The GBP accounts from the specified merchant in the specified country. + # @!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 ListGbpAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkGbpAccount method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource to which the GBP account is + # linked. Format: `accounts/{account}`. + # @!attribute [rw] gbp_email + # @return [::String] + # Required. The email address of the Business Profile account. + class LinkGbpAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkGbpAccount method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkGbpAccountResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb new file mode 100644 index 000000000000..24696e1e3b3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # A store's homepage. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the store's homepage. + # Format: `accounts/{account}/homepage` + # @!attribute [rw] uri + # @return [::String] + # Required. The URI (typically a URL) of the store's homepage. + # @!attribute [r] claimed + # @return [::Boolean] + # Output only. Whether the homepage is claimed. See + # https://support.google.com/merchants/answer/176793. + class Homepage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to retrieve. + # Format: `accounts/{account}/homepage` + class GetHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateHomepage` method. + # @!attribute [rw] homepage + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] + # Required. The new version of the homepage. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ClaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to claim. + # Format: `accounts/{account}/homepage` + class ClaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UnclaimHomepage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the homepage to unclaim. + # Format: `accounts/{account}/homepage` + class UnclaimHomepageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb new file mode 100644 index 000000000000..f4a962b34c31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to a Local Feed Partnership (LFP) provider. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LFP provider. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` + # @!attribute [r] region_code + # @return [::String] + # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). + # @!attribute [rw] display_name + # @return [::String] + # The display name of the LFP provider. + class LfpProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the FindLfpProviders method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource under which the LFP providers are + # found. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpProvider` resources to return. The + # service returns fewer than this value if the number of lfp providers is + # less that than the `pageSize`. The default value is 50. The maximum value + # is 1000; If a value higher than the maximum is specified, then the + # `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `FindLfpProviders` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `FindLfpProviders` must + # match the call that provided the page token. + class FindLfpProvidersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the FindLfpProviders method. + # @!attribute [rw] lfp_providers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] + # The LFP providers from the specified merchant in the specified country. + # @!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 FindLfpProvidersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the LinkLfpProvider method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LFP provider resource to link. + # Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. + # The `lfp_provider` is the LFP provider ID. + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The external account ID by which this merchant is known to the + # LFP provider. + class LinkLfpProviderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the LinkLfpProvider method. + # @!attribute [rw] response + # @return [::Google::Protobuf::Empty] + # Empty response. + class LinkLfpProviderResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb new file mode 100644 index 000000000000..17d29142b0ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Collection of information related to the omnichannel settings of a merchant. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the omnichannel setting. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + # @!attribute [rw] region_code + # @return [::String] + # Required. Immutable. Region code defined by + # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, + # and is immutable. + # @!attribute [rw] lsf_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting::LsfType] + # Required. The Local Store Front type for this country. + # @!attribute [rw] in_stock + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InStock] + # Optional. The InStock URI and state for this country. + # @!attribute [rw] pickup + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Pickup] + # Optional. The Pickup URI and state for this country. + # @!attribute [r] lfp_link + # @return [::Google::Shopping::Merchant::Accounts::V1beta::LfpLink] + # Output only. The established link to a LFP provider. + # @!attribute [rw] odo + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnDisplayToOrder] + # Optional. The On Display to Order (ODO) policy URI and state for this + # country. + # @!attribute [rw] about + # @return [::Google::Shopping::Merchant::Accounts::V1beta::About] + # Optional. The about page URI and state for this country. + # @!attribute [rw] inventory_verification + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification] + # Optional. The inventory verification contact and state for this country. + class OmnichannelSetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The product page experience type, which is also called the Local Store + # Front (LSF) type. Check the [HC + # article](https://support.google.com/merchants/answer/7178526) for more + # details. + module LsfType + # Default value. This value is unused. + LSF_TYPE_UNSPECIFIED = 0 + + # Google-Hosted Local Store Front. Check the [HC + # article](https://support.google.com/merchants/answer/14869424) for more + # details. + GHLSF = 1 + + # Merchant-Hosted Local Store Front Basic. Check the [HC + # article](https://support.google.com/merchants/answer/14615867) for more + # details. + MHLSF_BASIC = 2 + + # Merchant-Hosted Local Store Front Full. Check the [HC + # article](https://support.google.com/merchants/answer/14617076) for more + # details. + MHLSF_FULL = 3 + end + end + + # The state of a omnichannel setting related review process. + class ReviewState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the review process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The review process has concluded successfully. The reviewed item is + # active. + ACTIVE = 1 + + # The review process failed. + FAILED = 2 + + # The review process is running. + RUNNING = 3 + + # The review process is waiting for the merchant to take action. + ACTION_REQUIRED = 4 + end + end + + # Collection of information related to InStock. + # @!attribute [rw] uri + # @return [::String] + # Optional. Product landing page URI. It is only used for the review of MHLSF + # in-stock serving. This URI domain should match with the business's + # homepage. Required to be empty if the lsf_type is GHLSF, and required when + # the lsf_type is MHLSF_FULL or MHLSF_BASIC. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the in-stock serving. + class InStock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to Pickup. + # @!attribute [rw] uri + # @return [::String] + # Required. Pickup product page URI. It is only used for the review of pickup + # serving. This URI domain should match with the business's homepage. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the pickup serving. + class Pickup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the LFP link. + # @!attribute [rw] lfp_provider + # @return [::String] + # Required. The resource name of the LFP provider. + # Format: `lfpProviders/{lfp_provider}` + # @!attribute [rw] external_account_id + # @return [::String] + # Required. The account ID by which this merchant is known to the LFP + # provider. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the LFP link. + class LfpLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the on display to order + # ([ODO](https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The on display to order (ODO) policy URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the URI. + class OnDisplayToOrder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to the about page + # ([impressum](https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). + # @!attribute [rw] uri + # @return [::String] + # Required. The about page URI. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the URI. + class About + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Collection of information related to [inventory + # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification::State] + # Output only. The state of the inventory verification process. + # @!attribute [rw] contact + # @return [::String] + # Required. The name of the contact for the inventory verification process. + # @!attribute [rw] contact_email + # @return [::String] + # Required. The email address of the contact for the inventory verification + # process. + # @!attribute [r] contact_state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] + # Output only. The state of the contact verification. + class InventoryVerification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the [inventory + # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC) + # process. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # When the merchant needs to initiate the inventory + # verification process. The next state is INACTIVE. + ACTION_REQUIRED = 1 + + # When the merchant is ready to request inventory verification. + INACTIVE = 5 + + # The inventory verification process is running. If the merchant is + # rejected, the next state is INACTIVE. + RUNNING = 2 + + # The inventory verification process succeeded. + SUCCEEDED = 3 + + # When merchant fails the inventory verification process and all attempts + # are exhausted. + SUSPENDED = 4 + end + end + + # Request message for the GetOmnichannelSettings method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to retrieve. + # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class GetOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListOmnichannelSettings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of omnichannel settings. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of omnichannel settings to return. The service + # may return fewer than this value. If unspecified, at most 50 omnichannel + # settings will be returned. The maximum value is 1000; values above 1000 + # will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOmnichannelSettings` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListOmnichannelSettings` + # must match the call that provided the page token. + class ListOmnichannelSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListOmnichannelSettings method. + # @!attribute [rw] omnichannel_settings + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] + # The omnichannel settings from the specified merchant. + # @!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 ListOmnichannelSettingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateOmnichannelSetting method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this omnichannel setting will be + # created. Format: `accounts/{account}` + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # Required. The omnichannel setting to create. + class CreateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateOmnichannelSetting method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # Required. The omnichannel setting to update. + # + # The omnichannel setting's `name` field is used to identify the + # omnichannel setting to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + # + # The following fields are supported in snake_case only: + # - `lsf_type` + # - `in_stock` + # - `pickup` + # - `odo` + # - `about` + # - `inventory_verification` + # + # Full replacement with wildcard `*`is supported, while empty/implied update + # mask is not. + class UpdateOmnichannelSettingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RequestInventoryVerification method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the omnichannel setting to request inventory + # verification. Format: + # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` + class RequestInventoryVerificationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the RequestInventoryVerification method. + # @!attribute [rw] omnichannel_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] + # The omnichannel setting that was updated. + class RequestInventoryVerificationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb new file mode 100644 index 000000000000..7e1e51be1a93 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb @@ -0,0 +1,345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Request message for the `GetOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to retrieve. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class GetOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateOnlineReturnPolicy` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which the return policy will be created. + # Format: `accounts/{account}` + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # Required. The return policy object to create. + class CreateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateOnlineReturnPolicy` method. The method + # supports field masks and when the mask is provided, only the fields specified + # in the mask are updated. + # @!attribute [rw] online_return_policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] + # Required. The online return policy to update. + # The online return policy's `name` field is used to identify the + # online return policy to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + # + # The following fields are supported (in both `snake_case` and + # `lowerCamelCase`): + # + # - `accept_defective_only` + # - `accept_exchange` + # - `item_conditions` + # - `policy` + # - `process_refund_days` + # - `restocking_fee` + # - `return_methods` + # - `return_policy_uri` + # - `return_shipping_fee` + class UpdateOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteOnlineReturnPolicy` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the return policy to delete. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + class DeleteOnlineReturnPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account for which to list return policies. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `OnlineReturnPolicy` resources to return. + # The service returns fewer than this value if the number of return policies + # for the given merchant is less that than the `pageSize`. The default value + # is 10. The maximum value is 100; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListOnlineReturnPolicies` + # call. Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListOnlineReturnPolicies` must match the call that provided the page + # token. The token returned as + # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListOnlineReturnPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListOnlineReturnPolicies` method. + # @!attribute [rw] online_return_policies + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] + # The retrieved return policies. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListOnlineReturnPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # [Online return policy](https://support.google.com/merchants/answer/10220642) + # object. This is currently used to represent return policies for ads and free + # listings programs. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the `OnlineReturnPolicy` resource. + # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` + # @!attribute [r] return_policy_id + # @return [::String] + # Output only. Return policy ID generated by Google. + # @!attribute [rw] label + # @return [::String] + # Required. Immutable. This field represents the unique user-defined label of + # the return policy. It is important to note that the same label cannot be + # used in different return policies for the same country. Unless a product + # specifies a specific label attribute, policies will be automatically + # labeled as 'default'. To assign a custom return policy to certain product + # groups, follow the instructions provided in the [Return policy label] + # (https://support.google.com/merchants/answer/9445425). + # The label can contain up to 50 characters. + # @!attribute [rw] countries + # @return [::Array<::String>] + # Required. Immutable. The countries of sale where the return policy applies. + # The values must be a valid 2 letter ISO 3166 code. + # @!attribute [rw] policy + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy] + # Optional. The return policy. + # @!attribute [rw] seasonal_overrides + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::SeasonalOverride>] + # Optional. Overrides to the general policy for orders placed during a + # specific set of time intervals. + # @!attribute [rw] restocking_fee + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::RestockingFee] + # Optional. The restocking fee that applies to all return reason categories. + # This would be treated as a free restocking fee if the value is not set. + # @!attribute [rw] return_methods + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnMethod>] + # Optional. The return methods of how customers can return an item. This + # value is required to not be empty unless the type of return policy is + # noReturns. + # @!attribute [rw] item_conditions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ItemCondition>] + # Optional. The item conditions accepted for returns must not be empty unless + # the type of return policy is 'noReturns'. + # @!attribute [rw] return_shipping_fee + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee] + # Optional. The return shipping fee. Should be set only when customer need to + # download and print the return label. + # @!attribute [rw] return_policy_uri + # @return [::String] + # Required. The return policy uri. This can used by Google to do a sanity + # check for the policy. It must be a valid URL. + # @!attribute [rw] accept_defective_only + # @return [::Boolean] + # Optional. This field specifies if merchant + # only accepts defective products for returns. + # @!attribute [rw] process_refund_days + # @return [::Integer] + # Optional. The field specifies the number of + # days it takes for merchants to process refunds. + # @!attribute [rw] accept_exchange + # @return [::Boolean] + # Optional. This field specifies if merchant + # allows customers to exchange products. + # @!attribute [rw] return_label_source + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] + # Optional. The field specifies the return + # label source. + class OnlineReturnPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The return shipping fee. This can either be a fixed fee or a boolean to + # indicate that the customer pays the actual shipping cost. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee::Type] + # Required. Type of return shipping fee. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed return shipping fee amount. This value is only applicable when type + # is `FIXED`. We will treat the return shipping fee as free if type is + # `FIXED` and this value is not set. + class ReturnShippingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return shipping fee types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The return shipping fee is a fixed value. + FIXED = 1 + + # Customers will pay the actual return shipping fee. + CUSTOMER_PAYING_ACTUAL_FEE = 2 + end + end + + # The restocking fee. This can be a flat fee or a micro percent. + # @!attribute [rw] fixed_fee + # @return [::Google::Shopping::Type::Price] + # Fixed restocking fee. + # + # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] micro_percent + # @return [::Integer] + # Percent of total price in micros. 15,000,000 means 15% of the total + # price would be charged. + # + # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RestockingFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available policies. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy::Type] + # Policy type. + # @!attribute [rw] days + # @return [::Integer] + # The number of days items can be returned after delivery, where one day + # is defined as 24 hours after the delivery timestamp. Required for + # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Return policy types. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # The number of days within which a return is valid after delivery. + NUMBER_OF_DAYS_AFTER_DELIVERY = 1 + + # No returns. + NO_RETURNS = 2 + + # Life time returns. + LIFETIME_RETURNS = 3 + end + end + + # @!attribute [rw] return_days + # @return [::Integer] + # Number of days (from the delivery date) that the product can be + # returned. + # + # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_until_date + # @return [::Google::Type::Date] + # Fixed end date until which the product can be returned. + # + # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] label + # @return [::String] + # Required. Display name of this seasonal override in Merchant Center. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. Defines the date range when this seasonal override applies. + # Both start_date and end_date are inclusive. + # The dates of the seasonal overrides should not overlap. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Required. seasonal override end date (inclusive). + class SeasonalOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The available return methods. + module ReturnMethod + # Default value. This value is unused. + RETURN_METHOD_UNSPECIFIED = 0 + + # Return by mail. + BY_MAIL = 1 + + # Return in store. + IN_STORE = 2 + + # Return at a kiosk. + AT_A_KIOSK = 3 + end + + # The available item conditions. + module ItemCondition + # Default value. This value is unused. + ITEM_CONDITION_UNSPECIFIED = 0 + + # New. + NEW = 1 + + # Used. + USED = 2 + end + + # The available return label sources. + module ReturnLabelSource + # Default value. This value is unused. + RETURN_LABEL_SOURCE_UNSPECIFIED = 0 + + # Download and print. + DOWNLOAD_AND_PRINT = 1 + + # Label include in the package. + IN_THE_PACKAGE = 2 + + # Customer to provide. + CUSTOMER_RESPONSIBILITY = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb new file mode 100644 index 000000000000..8dd1d729cfe1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The phone verification state. + module PhoneVerificationState + # Default value. This value is unused. + PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 + + # The phone is verified. + PHONE_VERIFICATION_STATE_VERIFIED = 1 + + # The phone is unverified + PHONE_VERIFICATION_STATE_UNVERIFIED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb new file mode 100644 index 000000000000..7a16e89b6c29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Defines participation in a given program for the specified account. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the program. + # Format: `accounts/{account}/programs/{program}` + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a Merchant Center help page describing the program. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program::State] + # Output only. The participation state of the account in the program. + # @!attribute [r] active_region_codes + # @return [::Array<::String>] + # Output only. The regions in which the account is actively participating in + # the program. Active regions are defined as those where all program + # requirements affecting the regions have been met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country or + # `001` when the program applies globally. + # @!attribute [r] unmet_requirements + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program::Requirement>] + # Output only. The requirements that the account has not yet satisfied that + # are affecting participation in the program. + class Program + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a requirement specified for participation in the program. + # @!attribute [r] title + # @return [::String] + # Output only. Name of the requirement. + # @!attribute [r] documentation_uri + # @return [::String] + # Output only. The URL of a help page describing the requirement. + # @!attribute [r] affected_region_codes + # @return [::Array<::String>] + # Output only. The regions that are currently affected by this requirement + # not being met. + # + # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is + # either a country where the program applies specifically to that country + # or `001` when the program applies globally. + class Requirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible program participation states for the account. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The account is not eligible to participate in the program. + NOT_ELIGIBLE = 1 + + # The account is eligible to participate in the program. + ELIGIBLE = 2 + + # The program is enabled for the account. + ENABLED = 3 + end + end + + # Request message for the GetProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program to retrieve. + # Format: `accounts/{account}/programs/{program}` + class GetProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListPrograms method. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the account for which to retrieve all programs. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of programs to return in a single response. If + # unspecified (or 0), a default size of 1000 is used. The maximum value is + # 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A continuation token, received from a previous `ListPrograms` + # call. Provide this to retrieve the next page. + class ListProgramsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListPrograms method. + # @!attribute [rw] programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program>] + # The programs for the given account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + class ListProgramsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the EnableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to enable participation for the + # given account. Format: `accounts/{account}/programs/{program}` + class EnableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DisableProgram method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the program for which to disable participation for + # the given account. Format: `accounts/{account}/programs/{program}` + class DisableProgramRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb new file mode 100644 index 000000000000..6757ee510eca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Request message for the `GetRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to retrieve. + # Format: `accounts/{account}/regions/{region}` + class GetRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateRegion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to create a region for. + # Format: `accounts/{account}` + # @!attribute [rw] region_id + # @return [::String] + # Required. The identifier for the region, unique over all regions of the + # same account. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # Required. The region to create. + class CreateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateRegion` method. + # @!attribute [rw] region + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] + # Required. The updated region. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The comma-separated field mask indicating the fields to update. + # Example: + # `"displayName,postalCodeArea.regionCode"`. + class UpdateRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the region to delete. + # Format: `accounts/{account}/regions/{region}` + class DeleteRegionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list regions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of regions to return. The service may return + # fewer than this value. + # If unspecified, at most 50 regions will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListRegions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegions` must + # match the call that provided the page token. + class ListRegionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegions` method. + # @!attribute [rw] regions + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region>] + # The regions from the specified merchant. + # @!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 ListRegionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographic region that you can use as a target with both the + # `RegionalInventory` and `ShippingSettings` services. You can define regions + # as collections of either postal codes or, in some countries, using predefined + # geotargets. For more information, see [Set up regions + # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) + # for more information. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the region. + # Format: `accounts/{account}/regions/{region}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the region. + # @!attribute [rw] postal_code_area + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea] + # Optional. A list of postal codes that defines the region area. + # @!attribute [rw] geotarget_area + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::GeoTargetArea] + # Optional. A list of geotargets that defines the region area. + # @!attribute [r] regional_inventory_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Regional + # Inventory configuration. + # @!attribute [r] shipping_eligible + # @return [::Google::Protobuf::BoolValue] + # Output only. Indicates if the region is eligible for use in the Shipping + # Services configuration. + class Region + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of postal codes that defines the region area. + # Note: All regions defined using postal codes are accessible through the + # account's `ShippingSettings.postalCodeGroups` resource. + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # or the country the postal code group applies to. + # @!attribute [rw] postal_codes + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea::PostalCodeRange>] + # Required. A range of postal codes. + class PostalCodeArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the region area. + # @!attribute [rw] begin + # @return [::String] + # Required. A postal code or a pattern of the form prefix* denoting the + # inclusive lower bound of the range defining the area. Examples values: + # `94108`, `9410*`, `9*`. + # @!attribute [rw] end + # @return [::String] + # Optional. A postal code or a pattern of the form `prefix*` denoting the + # inclusive upper bound of the range defining the area. It must have the + # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a + # postal code then postalCodeRangeEnd must be a postal code too; if + # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a + # pattern with the same prefix length. Optional: if not set, then the + # area is defined as being all the postal codes matching + # postalCodeRangeBegin. + class PostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A list of geotargets that defines the region area. + # @!attribute [rw] geotarget_criteria_ids + # @return [::Array<::Integer>] + # Required. A non-empty list of [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (for example, state). + class GeoTargetArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb new file mode 100644 index 000000000000..e5456e04275e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb @@ -0,0 +1,747 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The merchant account's [shipping + # setting](https://support.google.com/merchants/answer/6069284). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the shipping setting. + # Format: `accounts/{account}/shippingSetting` + # @!attribute [rw] services + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service>] + # Optional. The target account's list of services. + # @!attribute [rw] warehouses + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Warehouse>] + # Optional. A list of warehouses which can be referred to in `services`. + # @!attribute [rw] etag + # @return [::String] + # Required. This field is used for avoid async issue. Make sure shipping + # setting data + # didn't change between get call and insert call. The user should do + # following steps: + # + # 1. Set etag field as empty string for initial shipping setting creation. + # + # 2. After initial creation, call get method to obtain an etag and current + # shipping setting data before call insert. + # + # 3. Modify to wanted shipping setting information. + # + # 4. Call insert method with the wanted shipping setting information with + # the etag obtained from step 2. + # + # 5. If shipping setting data changed between step 2 and step 4. Insert + # request will fail because the etag changes every time the shipping setting + # data changes. User should repeate step 2-4 with the new etag. + class ShippingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping service. + # @!attribute [rw] service_name + # @return [::String] + # Required. Free-form name of the service. Must be unique within target + # account. + # @!attribute [rw] active + # @return [::Boolean] + # Required. A boolean exposing the active status of the shipping service. + # @!attribute [rw] delivery_countries + # @return [::Array<::String>] + # Required. The CLDR territory code of the countries to which the service + # applies. + # @!attribute [rw] currency_code + # @return [::String] + # The CLDR code of the currency to which this service applies. Must match + # that of the prices in rate groups. + # @!attribute [rw] delivery_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::DeliveryTime] + # Required. Time spent in various aspects from order to the delivery of the + # product. + # @!attribute [rw] rate_groups + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::RateGroup>] + # Optional. Shipping rate group definitions. Only the last one is allowed to + # have an empty `applicable_shipping_labels`, which means "everything else". + # The other `applicable_shipping_labels` must not overlap. + # @!attribute [rw] shipment_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::ShipmentType] + # Type of locations this service ships orders to. + # @!attribute [rw] minimum_order_value + # @return [::Google::Shopping::Type::Price] + # Minimum order value for this service. If set, indicates that customers + # will have to spend at least this amount. + # All prices within a service must have the same currency. + # Cannot be set together with minimum_order_value_table. + # @!attribute [rw] minimum_order_value_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable] + # Table of per store minimum order values for the pickup fulfillment type. + # Cannot be set together with minimum_order_value. + # @!attribute [rw] store_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig] + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram>] + # Optional. Loyalty programs that this shipping service is limited to. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of stores your products are delivered from. + # This is only valid for the local delivery shipment type. + # @!attribute [rw] store_service_type + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::StoreServiceType] + # Indicates whether all stores, or selected stores, listed by this + # merchant provide local delivery. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of store codes that provide local delivery. + # If empty, then `all_stores` must be true. + # @!attribute [rw] cutoff_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig] + # Configs related to local delivery ends for the day. + # @!attribute [rw] service_radius + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance] + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + class StoreConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configs related to local delivery ends for the day. + # @!attribute [rw] local_cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig::LocalCutoffTime] + # Time that local delivery ends for the day. + # @!attribute [rw] store_close_offset_hours + # @return [::Integer] + # Only valid with local delivery fulfillment. Represents cutoff time + # as the number of hours before store closing. Mutually exclusive + # with `local_cutoff_time`. + # @!attribute [rw] no_delivery_post_cutoff + # @return [::Boolean] + # Merchants can opt-out of showing n+1 day local delivery when they have + # a shipping service configured to n day local delivery. For example, if + # the shipping service defines same-day delivery, and it's past the + # cut-off, setting this field to `true` results in the calculated + # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + # same example, setting this field to `false` results in the calculated + # shipping time being one day. This is only for local delivery. + class CutoffConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Time that local delivery ends for the day. + # @!attribute [rw] hour + # @return [::Integer] + # Hour local delivery orders must be placed by to process the same + # day. + # @!attribute [rw] minute + # @return [::Integer] + # Minute local delivery orders must be placed by to process the same + # day. + class LocalCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Indicates whether all stores, or selected stores, listed by the + # merchant provide local delivery. + module StoreServiceType + # Did not specify store service type. + STORE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Indicates whether all stores, current and future, listed by this + # merchant provide local delivery. + ALL_STORES = 1 + + # Indicates that only the stores listed in `store_codes` are eligible + # for local delivery. + SELECTED_STORES = 2 + end + end + + # [Loyalty program](https://support.google.com/merchants/answer/12922446) + # provided by a merchant. + # @!attribute [rw] program_label + # @return [::String] + # This is the loyalty program label set in your loyalty program settings in + # Merchant Center. This sub-attribute allows Google to map your loyalty + # program to eligible offers. + # @!attribute [rw] loyalty_program_tiers + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram::LoyaltyProgramTiers>] + # Optional. Loyalty program tier of this shipping service. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Subset of a merchants loyalty program. + # @!attribute [rw] tier_label + # @return [::String] + # The tier label [tier_label] sub-attribute differentiates offer level + # benefits between each tier. This value is also set in your program + # settings in Merchant Center, and is required for data source changes + # even if your loyalty program only has 1 tier. + class LoyaltyProgramTiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Shipment type of shipping service. + module ShipmentType + # This service did not specify shipment type. + SHIPMENT_TYPE_UNSPECIFIED = 0 + + # This service ships orders to an address chosen by the customer. + DELIVERY = 1 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a local store near by. + LOCAL_DELIVERY = 2 + + # This service ships orders to an address chosen by the customer. + # The order is shipped from a collection point. + COLLECTION_POINT = 3 + end + end + + # Maximum delivery radius. + # This is only required for the local delivery shipment type. + # @!attribute [rw] value + # @return [::Integer] + # Integer value of distance. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance::Unit] + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + class Distance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit can differ based on country, it is parameterized to include miles + # and kilometers. + module Unit + # Unit unspecified + UNIT_UNSPECIFIED = 0 + + # Unit in miles + MILES = 1 + + # Unit in kilometers + KILOMETERS = 2 + end + end + + # A fulfillment warehouse, which stores and handles inventory. + # Next tag: 7 + # @!attribute [rw] name + # @return [::String] + # Required. The name of the warehouse. Must be unique within account. + # @!attribute [rw] shipping_address + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Address] + # Required. Shipping address of the warehouse. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::WarehouseCutoffTime] + # Required. The latest time of day that an order can be accepted and begin + # processing. Later orders will be processed in the next day. The time is + # based on the warehouse postal code. + # @!attribute [rw] handling_days + # @return [::Integer] + # Required. The number of days it takes for this warehouse to pack up and + # ship an item. This is on the warehouse level, but can be overridden on the + # offer level based on the attributes of an item. + # @!attribute [rw] business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # Business days of the warehouse. + # If not set, will be Monday to Friday by default. + class Warehouse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The latest time of day that an order can be accepted and begin processing. + # Later orders will be processed in the next day. The time is based on the + # warehouse postal code. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day by the warehouse. Hour is based on the + # timezone of warehouse. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day by the warehouse. Minute is based on the + # timezone of warehouse. + class WarehouseCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping address of the warehouse. + # @!attribute [rw] street_address + # @return [::String] + # Street-level part of the address. For example: `111w 31st Street`. + # @!attribute [rw] city + # @return [::String] + # Required. City, town or commune. May also include dependent localities or + # sublocalities (For example neighborhoods or suburbs). + # @!attribute [rw] administrative_area + # @return [::String] + # Required. Top-level administrative subdivision of the country. For example, + # a state like California ("CA") or a province like Quebec ("QC"). + # @!attribute [rw] postal_code + # @return [::String] + # Required. Postal code or ZIP (For example "94043"). + # @!attribute [rw] region_code + # @return [::String] + # Required. [CLDR country + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # (For example "US"). + class Address + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Time spent in various aspects from order to the delivery of the product. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. + # Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` must be set, but not both. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Maximum number of business days that is spent in transit. 0 means same + # day delivery, 1 means next day delivery. Must be greater than or equal + # to `min_transit_days`. + # @!attribute [rw] cutoff_time + # @return [::Google::Shopping::Merchant::Accounts::V1beta::CutoffTime] + # Business days cutoff time definition. + # If not configured the cutoff time will be defaulted to 8AM PST. + # @!attribute [rw] min_handling_days + # @return [::Integer] + # Minimum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] max_handling_days + # @return [::Integer] + # Maximum number of business days spent before an order is shipped. + # 0 means same day shipped, 1 means next day shipped. + # Must be greater than or equal to `min_handling_days`. + # 'min_handling_days' and 'max_handling_days' should be either set or not set + # at the same time. + # @!attribute [rw] transit_time_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TransitTable] + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] handling_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # The business days during which orders can be handled. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] transit_business_day_config + # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] + # The business days during which orders can be in-transit. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] warehouse_based_delivery_times + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::WarehouseBasedDeliveryTime>] + # Optional. Indicates that the delivery time should be calculated per + # warehouse (shipping origin location) based on the settings of the selected + # carrier. When set, no other transit time related field in [delivery + # time][[google.shopping.content.bundles.ShippingSetting.DeliveryTime] should + # be set. + class DeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days cutoff time definition. + # @!attribute [rw] hour + # @return [::Integer] + # Required. Hour of the cutoff time until which an order has to be placed to + # be processed in the same day. + # @!attribute [rw] minute + # @return [::Integer] + # Required. Minute of the cutoff time until which an order has to be placed + # to be processed in the same day. + # @!attribute [rw] time_zone + # @return [::String] + # Required. [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example "Europe/Zurich". + class CutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Business days of the warehouse. + # @!attribute [rw] business_days + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig::Weekday>] + # Required. Regular business days. + # May not be empty. + class BusinessDayConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Weekday + WEEKDAY_UNSPECIFIED = 0 + + MONDAY = 1 + + TUESDAY = 2 + + WEDNESDAY = 3 + + THURSDAY = 4 + + FRIDAY = 5 + + SATURDAY = 6 + + SUNDAY = 7 + end + end + + # Indicates that the delivery time should be calculated per warehouse + # (shipping origin location) based on the settings of the selected carrier. + # When set, no other transit time related field in `delivery_time` should be + # set. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of + # the service must be in the eddSupportedServices list. + # @!attribute [rw] warehouse + # @return [::String] + # Required. Warehouse name. This should match + # [warehouse][ShippingSetting.warehouses.name] + class WarehouseBasedDeliveryTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shipping rate group definitions. Only the last one is allowed to have an + # empty `applicable_shipping_labels`, which means + # "everything else". The other `applicable_shipping_labels` must + # not overlap. + # @!attribute [rw] applicable_shipping_labels + # @return [::Array<::String>] + # Required. A list of [shipping + # labels](https://support.google.com/merchants/answer/6324504) defining the + # products to which this rate group applies to. This is a disjunction: only + # one of the labels has to match for the rate group to apply. May only be + # empty for the last rate group of a service. + # @!attribute [rw] single_value + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Value] + # The value of the rate group (For example flat rate $10). Can only be set + # if `main_table` and `subtables` are not set. + # @!attribute [rw] main_table + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Table] + # A table defining the rate group, when `single_value` is not + # expressive enough. Can only be set if `single_value` is not + # set. + # @!attribute [rw] subtables + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Table>] + # Optional. A list of subtables referred to by `main_table`. Can only + # be set if `main_table` is set. + # @!attribute [rw] carrier_rates + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CarrierRate>] + # Optional. A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the rate group. + # If set has to be unique within shipping service. + class RateGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A table defining the rate group, when `single_value` is not + # expressive enough. + # @!attribute [rw] name + # @return [::String] + # Name of the table. Required for subtables, ignored for the main table. + # @!attribute [rw] row_headers + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] + # Required. Headers of the table's rows. + # @!attribute [rw] column_headers + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] + # Headers of the table's columns. Optional: if not set then the table has + # only one dimension. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Row>] + # Required. The list of rows that constitute the table. Must have the same + # length as `row_headers`. + class Table + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Transit time table, number of business days spent in transit based on row + # and column dimensions. Either `min_transit_days`, `max_transit_days` or + # `transit_time_table` can be set, but not both. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of region names + # {::Google::Shopping::Merchant::Accounts::V1beta::Region#name Region.name} . The + # last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. + # @!attribute [rw] transit_time_labels + # @return [::Array<::String>] + # Required. A list of transit time labels. The last value can be + # `"all other labels"`. Example: + # `["food", "electronics", "all other labels"]`. + # @!attribute [rw] rows + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow>] + # Required. If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + class TransitTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If there's only one dimension set of `postal_code_group_names` or + # `transit_time_labels`, there are multiple rows each with one value + # for that dimension. If there are two dimensions, each row corresponds to a + # `postal_code_group_names`, and columns (values) to a + # `transit_time_labels`. + # @!attribute [rw] values + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow::TransitTimeValue>] + # Required. Transit time range (min-max) in business days. + class TransitTimeRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transit time range (min-max) in business days. + # @!attribute [rw] min_transit_days + # @return [::Integer] + # Minimum transit time range in business days. 0 means same + # day delivery, 1 means next day delivery. + # @!attribute [rw] max_transit_days + # @return [::Integer] + # Must be greater than or equal to `min_transit_days`. + class TransitTimeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Table of per store minimum order values for the pickup fulfillment type. + # @!attribute [rw] store_code_set_with_movs + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable::StoreCodeSetWithMov>] + # Required. A list of store code sets sharing the same minimum order value + # (MOV). At least two sets are required and the last one must be empty, which + # signifies 'MOV for all other stores'. Each store code can only appear once + # across all the sets. All prices within a service must have the same + # currency. + class MinimumOrderValueTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of store code sets sharing the same minimum order value. At least + # two sets are required and the last one must be empty, which signifies + # 'MOV for all other stores'. + # Each store code can only appear once across all the sets. + # All prices within a service must have the same currency. + # @!attribute [rw] store_codes + # @return [::Array<::String>] + # Optional. A list of unique store codes or empty for the catch all. + # @!attribute [rw] value + # @return [::Google::Shopping::Type::Price] + # The minimum order value for the given stores. + class StoreCodeSetWithMov + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A non-empty list of row or column headers for a table. + # Exactly one of `prices`, `weights`, + # `num_items`, `postal_code_group_names`, or + # `location` must be set. + # @!attribute [rw] prices + # @return [::Array<::Google::Shopping::Type::Price>] + # Required. A list of inclusive order price upper bounds. The last price's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "currency_code": "USD"}, + # \\{"amount_micros": 500000000, "currency_code": "USD"}, + # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers + # "<= $10", "<= $500", and "> $500". All prices within a service must have + # the same currency. Must be non-empty. Must be positive except -1. Can only + # be set if all other fields are not set. + # @!attribute [rw] weights + # @return [::Array<::Google::Shopping::Type::Weight>] + # Required. A list of inclusive order weight upper bounds. The last weight's + # value can be infinity by setting price amount_micros = -1. For example + # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, + # "unit": "kg"}, + # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers + # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have + # the same unit. Must be non-empty. Must be positive except -1. Can only be + # set if all other fields are not set. + # @!attribute [rw] number_of_items + # @return [::Array<::String>] + # Required. A list of inclusive number of items upper bounds. The last value + # can be + # `"infinity"`. For example + # `["10", "50", "infinity"]` represents the headers + # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can + # only be set if all other fields are not set. + # @!attribute [rw] postal_code_group_names + # @return [::Array<::String>] + # Required. A list of postal group names. The last value can be + # `"all other locations"`. Example: + # `["zone 1", "zone 2", "all other locations"]`. The referred + # postal code groups must match the delivery country of the service. Must + # be non-empty. Can only be set if all other fields are not set. + # @!attribute [rw] locations + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LocationIdSet>] + # Required. A list of location ID sets. Must be non-empty. Can only be set if + # all other fields are not set. + class Headers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of location ID sets. Must be non-empty. Can only be set if all + # other fields are not set. + # @!attribute [rw] location_ids + # @return [::Array<::String>] + # Required. A non-empty list of + # [location + # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # They must all be of the same location type (For + # example, state). + class LocationIdSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Include a list of cells. + # @!attribute [rw] cells + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Value>] + # Required. The list of cells that constitute the row. Must have the same + # length as `columnHeaders` for two-dimensional tables, a length of 1 for + # one-dimensional tables. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The single value of a rate group or the value of a rate group table's cell. + # Exactly one of `no_shipping`, `flat_rate`, + # `price_percentage`, `carrier_rateName`, + # `subtable_name` must be set. + # @!attribute [rw] no_shipping + # @return [::Boolean] + # If true, then the product can't be shipped. Must be true when set, can only + # be set if all other fields are not set. + # @!attribute [rw] flat_rate + # @return [::Google::Shopping::Type::Price] + # A flat rate. Can only be set if all other fields are not set. + # @!attribute [rw] price_percentage + # @return [::String] + # A percentage of the price represented as a number in decimal notation + # (For example, `"5.4"`). Can only be set if all other fields are not + # set. + # @!attribute [rw] carrier_rate + # @return [::String] + # The name of a carrier rate referring to a carrier rate defined in the + # same rate group. Can only be set if all other fields are not set. + # @!attribute [rw] subtable + # @return [::String] + # The name of a subtable. Can only be set in table cells (For example, not + # for single values), and only if all other fields are not set. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of carrier rates that can be referred to by + # `main_table` or `single_value`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the carrier rate. Must be unique per rate group. + # @!attribute [rw] carrier + # @return [::String] + # Required. Carrier service, such as `"UPS"` or `"Fedex"`. + # @!attribute [rw] carrier_service + # @return [::String] + # Required. Carrier service, such as `"ground"` or `"2 days"`. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. Shipping origin for this carrier rate. + # @!attribute [rw] percentage_adjustment + # @return [::String] + # Optional. Multiplicative shipping rate modifier as a number in decimal + # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, + # `"-3"` decreases the rate by 3%. + # @!attribute [rw] flat_adjustment + # @return [::Google::Shopping::Type::Price] + # Optional. Additive shipping rate modifier. Can be negative. For example + # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, + # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the + # rate. + class CarrierRate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetShippingSetting` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the shipping setting to retrieve. + # Format: `accounts/{account}/shippingsetting` + class GetShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertShippingSetting` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this product will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] shipping_setting + # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] + # Required. The new version of the account. + class InsertShippingSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb new file mode 100644 index 000000000000..5cbe635b16ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Primary type convension + # + # percent micro : 100% = 1 000 000 and 1% = 10 000 + # cannot be negative. + # + # Information about tax nexus and related parameters applicable to orders + # delivered to the area covered by a single tax admin. Nexus is created when a + # merchant is doing business in an area administered by tax admin (only US + # states are supported for nexus configuration). If merchant has nexus in a US + # state, merchant needs to pay tax to all tax authorities associated with + # the shipping destination. + # Next Id : 8 + # @!attribute [rw] location_id + # @return [::Integer] + # The admin_id or criteria_id of the region in which this rule is + # applicable. + # + # Note: The following fields are mutually exclusive: `location_id`, `post_code_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] post_code_range + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TaxRule::TaxPostalCodeRange] + # The range of postal codes in which this rule is applicable. + # + # Note: The following fields are mutually exclusive: `post_code_range`, `location_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] use_google_rate + # @return [::Boolean] + # Rate that depends on delivery location: if merchant has a nexus in + # corresponding US state, rates from authorities with jurisdiction over + # delivery area are added up. + # + # Note: The following fields are mutually exclusive: `use_google_rate`, `self_specified_rate_micros`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] self_specified_rate_micros + # @return [::Integer] + # A fixed rate specified in micros, where 100% = 1_000_000. + # Suitable for origin-based states. + # + # Note: The following fields are mutually exclusive: `self_specified_rate_micros`, `use_google_rate`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_code + # @return [::String] + # Region code in which this rule is applicable + # @!attribute [rw] shipping_taxed + # @return [::Boolean] + # If set, shipping charge is taxed (at the same rate as product) when + # delivering to this admin's area. + # Can only be set on US states without category. + # @!attribute [rw] effective_time_period + # @return [::Google::Type::Interval] + # Required. Time period when this rule is effective. If the duration is + # missing from effective_time listed, then it is open ended to the future. + # The start of this time period is inclusive, and the end is exclusive. + class TaxRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A range of postal codes that defines the area. + # @!attribute [rw] start + # @return [::String] + # Required. The start of the postal code range, which is also the smallest + # in the range. + # @!attribute [rw] end + # @return [::String] + # The end of the postal code range. Will be the same as start if not + # specified. + class TaxPostalCodeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb new file mode 100644 index 000000000000..1b414fd1bccf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # A `TermsOfService`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either + # a country where the ToS applies specifically to that country or `001` when + # the same `TermsOfService` can be signed in any country. However note that + # when signing a ToS that applies globally we still expect that a specific + # country is provided (this should be merchant business country or program + # country of participation). + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # The Kind this terms of service version applies to. + # @!attribute [rw] file_uri + # @return [::String] + # URI for terms of service file that needs to be displayed to signing users. + # @!attribute [rw] external + # @return [::Boolean] + # Whether this terms of service version is external. External terms of + # service versions can only be agreed through external processes and not + # directly by the merchant through UI or API. + class TermsOfService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + class GetTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveLatestTermsOfService` method. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + # @!attribute [rw] kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Required. The Kind this terms of service version applies to. + class RetrieveLatestTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `AcceptTermsOfService` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `termsOfService/{version}` + # @!attribute [rw] account + # @return [::String] + # Required. The account for which to accept the ToS. + # @!attribute [rw] region_code + # @return [::String] + # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This + # is either a country when the ToS applies specifically to that country or + # 001 when it applies globally. + class AcceptTermsOfServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb new file mode 100644 index 000000000000..0390b017c401 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # This resource represents the agreement state for a given account and terms of + # service kind. + # The state is as follows: + # + # * If the merchant has accepted a terms of service: + # [accepted](TermsOfServiceAggrementState.accepted) will be populated, + # otherwise it will be empty + # * If the merchant must sign a terms of service: + # [required](TermsOfServiceAggrementState.required) will be populated, + # otherwise it will be empty. + # + # Note that both [required](TermsOfServiceAggrementState.required) and + # [accepted](TermsOfServiceAggrementState.accepted) can be present. In this + # case the `accepted` terms of services will have an expiration date set in the + # [valid_until](Accepted.valid_until) field. The `required` terms of services + # need to be accepted before `valid_until` in order for the account to continue + # having a valid agreement. When accepting new terms of services we expect 3Ps + # to display the text associated with the given terms of service agreement (the + # url to the file containing the text is added in the Required message below as + # [tos_file_uri](Accepted.tos_file_uri). The actual acceptance of the terms of + # service is done by calling accept on the [TermsOfService](TermsOfService) + # resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + # For example, an identifier could be: `MERCHANT_CENTER-US` + # @!attribute [rw] region_code + # @return [::String] + # Region code as defined by https://cldr.unicode.org/. This is the + # country the current state applies to. + # @!attribute [rw] terms_of_service_kind + # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] + # Terms of Service kind associated with the particular version. + # @!attribute [rw] accepted + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Accepted] + # The accepted terms of service of this kind and for the associated + # region_code + # @!attribute [rw] required + # @return [::Google::Shopping::Merchant::Accounts::V1beta::Required] + # The required terms of service + class TermsOfServiceAgreementState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the accepted terms of service. + # @!attribute [rw] terms_of_service + # @return [::String] + # The accepted + # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService). + # @!attribute [rw] accepted_by + # @return [::String] + # The account where the acceptance was recorded. This can be the account + # itself or, in the case of subaccounts, the MCA account. + # @!attribute [rw] valid_until + # @return [::Google::Type::Date] + # When set, it states that the accepted + # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # is only valid until the end of this date (in UTC). A new one must be + # accepted before then. The information of the required + # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # is found in the [Required](Required) message. + class Accepted + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the terms of service which are required to be accepted. + # @!attribute [rw] terms_of_service + # @return [::String] + # The + # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) + # that need to be accepted. + # @!attribute [rw] tos_file_uri + # @return [::String] + # Full URL to the terms of service file. This field is the same as + # [TermsOfService.file_uri](TermsOfService.file_uri), it is added + # here for convenience only. + class Required + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetTermsOfServiceAgreementState` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the terms of service version. + # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` + # The identifier format is: `{TermsOfServiceKind}-{country}` + class GetTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account for which to get a TermsOfServiceAgreementState + # Format: `accounts/{account}` + class RetrieveForApplicationTermsOfServiceAgreementStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb new file mode 100644 index 000000000000..636da0a3420a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # The TermsOfService Kind. + module TermsOfServiceKind + # Default value. This value is unused. + TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 + + # Merchant Center application. + MERCHANT_CENTER = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb new file mode 100644 index 000000000000..549b2ff4eff2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.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! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # A [user](https://support.google.com/merchants/answer/12160472). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the user. + # Format: `accounts/{account}/user/{email}` + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User::State] + # Output only. The state of the user. + # @!attribute [rw] access_rights + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccessRight>] + # Optional. The [access + # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) + # the user has. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states of a user. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The user is pending confirmation. In this state, the user first needs to + # accept the invitation before performing other actions. + PENDING = 1 + + # The user is verified. + VERIFIED = 2 + end + end + + # Request message for the `GetUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to retrieve. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to retrieve the user corresponding to the caller by + # using `me` rather than an email address as in + # `accounts/{account}/users/me`. + class GetUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateUser` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account for which a user will be + # created. Format: `accounts/{account}` + # @!attribute [rw] user_id + # @return [::String] + # Required. The email address of the user (for example, + # `john.doe@gmail.com`). + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # Required. The user to create. + class CreateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteUser` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user to delete. + # Format: `accounts/{account}/users/{email}` + # + # It is also possible to delete the user corresponding to the caller by using + # `me` rather than an email address as in `accounts/{account}/users/me`. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateUser` method. + # @!attribute [rw] user + # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] + # Required. The new version of the user. + # + # Use `me` to refer to your own email address, for example + # `accounts/{account}/users/me`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListUsers` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of users. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of users to return. The service may return + # fewer than this value. If unspecified, at most 50 users will be returned. + # The maximum value is 100; values above 100 will be coerced to 100 + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListUsers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListUsers` must match + # the call that provided the page token. + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListUsers` method. + # @!attribute [rw] users + # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::User>] + # The users from the specified account. + # @!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 ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb new file mode 100644 index 000000000000..50aab1617c36 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + module V1beta + # Settings related to the verification email that is sent after adding a user. + # @!attribute [rw] verification_mail_mode + # @return [::Google::Shopping::Merchant::Accounts::V1beta::VerificationMailSettings::VerificationMailMode] + # Optional. Mode of the verification mail. If not set, the default is + # `SEND_VERIFICATION_MAIL`. + class VerificationMailSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different configuration options for sending a verification email + # when adding a user. + module VerificationMailMode + # Default first member of every enum. Do not use. + VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 + + # An invitation email is sent to the user added shortly after. + SEND_VERIFICATION_MAIL = 1 + + # No invitation email is sent. This can be useful if the user is + # expected to accept the invitation through the API without needing + # another notification. + SUPPRESS_VERIFICATION_MAIL = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,248 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Type + # The weight represented as the value in string and the unit. + # @!attribute [rw] amount_micros + # @return [::Integer] + # Required. The weight represented as a number in micros (1 million micros is + # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + # micros). + # This field can also be set as infinity by setting to -1. + # This field only support -1 and positive value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Type::Weight::WeightUnit] + # Required. The weight unit. + # Acceptable values are: kg and lb + class Weight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The weight unit. + module WeightUnit + # unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0 + + # lb unit. + POUND = 1 + + # kg unit. + KILOGRAM = 2 + end + end + + # The price represented as a number and currency. + # @!attribute [rw] amount_micros + # @return [::Integer] + # The price represented as a number in micros (1 million micros is an + # equivalent to one's currency standard unit, for example, 1 USD = 1000000 + # micros). + # @!attribute [rw] currency_code + # @return [::String] + # The currency of the price using three-letter acronyms according to [ISO + # 4217](http://en.wikipedia.org/wiki/ISO_4217). + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents custom attributes. Exactly one of `value` or + # `group_values` must not be empty. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute. + # @!attribute [rw] value + # @return [::String] + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # @!attribute [rw] group_values + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Subattributes within this attribute group. If + # `group_values` is not empty, `value` must be empty. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Destinations available for a product. + # + # Destinations are used in Merchant Center to allow you to control where the + # products from your data feed should be displayed. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Destination values. + module DestinationEnum + # Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3 + + # [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5 + + # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6 + + # Youtube shopping checkout. + YOUTUBE_SHOPPING_CHECKOUT = 7 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 8 + + # [Free vehicle + # listings](https://support.google.com/merchants/answer/11189169). + FREE_VEHICLE_LISTINGS = 9 + + # [Vehicle ads](https://support.google.com/merchants/answer/11189169). + VEHICLE_ADS = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + end + end + + # Reporting contexts that your account and product issues apply to. + # + # Reporting contexts are groups of surfaces and formats for product results on + # Google. They can represent the entire destination (for example, [Shopping + # ads](https://support.google.com/merchants/answer/6149970)) or a subset of + # formats within a destination (for example, [Demand Gen + # ads](https://support.google.com/merchants/answer/13389785)). + class ReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reporting context values. + module ReportingContextEnum + # Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 + + # [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1 + + # Deprecated: Use `DEMAND_GEN_ADS` instead. + # [Discovery and Demand Gen + # ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 + + # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13 + + # [Demand Gen ads on Discover + # surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 + + # [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3 + + # [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4 + + # [Local inventory + # ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5 + + # [Vehicle inventory + # ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6 + + # [Free product + # listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7 + + # [Free product listings on UCP + # checkout](https://developers.google.com/merchant/ucp). + FREE_LISTINGS_UCP_CHECKOUT = 19 + + # [Free local product + # listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8 + + # [Free local vehicle + # listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9 + + # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). + YOUTUBE_AFFILIATE = 18 + + # [YouTube + # Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10 + + # [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11 + + # [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12 + + # [Product + # Reviews](https://support.google.com/merchants/answer/14620732). + PRODUCT_REVIEWS = 15 + + # [Merchant + # Reviews](https://developers.google.com/merchant-review-feeds). + MERCHANT_REVIEWS = 16 + + # YouTube Checkout + # . + YOUTUBE_CHECKOUT = 17 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..f4ad43686e83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values. + # * A month and day, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * [google.type.TimeOfDay][google.type.TimeOfDay] + # * {::Google::Type::DateTime google.type.DateTime} + # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..10625864f3dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.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 Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year, month, or day are 0, the DateTime is considered not to have a + # specific year, month, or day respectively. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a + # datetime without a month. + # @!attribute [rw] day + # @return [::Integer] + # Optional. Day of month. Must be from 1 to 31 and valid for the year and + # month, or 0 if specifying a datetime without a day. + # @!attribute [rw] hours + # @return [::Integer] + # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults + # to 0 (midnight). An API may choose to allow the value "24:00:00" for + # scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, + # defaults to 0. An API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999, defaults to 0. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone. For example "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number. For example "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb new file mode 100644 index 000000000000..109db1a50c89 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # An object representing a phone number, suitable as an API wire format. + # + # This representation: + # + # - should not be used for locale-specific formatting of a phone number, such + # as "+1 (650) 253-0000 ext. 123" + # + # - is not designed for efficient storage + # - may not be suitable for dialing - specialized libraries (see references) + # should be used to parse the number for that purpose + # + # To do something meaningful with this number, such as format it for various + # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. + # + # For instance, in Java this would be: + # + # com.google.type.PhoneNumber wireProto = + # com.google.type.PhoneNumber.newBuilder().build(); + # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = + # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); + # if (!wireProto.getExtension().isEmpty()) { + # phoneNumber.setExtension(wireProto.getExtension()); + # } + # + # Reference(s): + # - https://github.com/google/libphonenumber + # @!attribute [rw] e164_number + # @return [::String] + # The phone number, represented as a leading plus sign ('+'), followed by a + # phone number that uses a relaxed ITU E.164 format consisting of the + # country calling code (1 to 3 digits) and the subscriber number, with no + # additional spaces or formatting. For example: + # + # - correct: "+15552220123" + # + # - incorrect: "+1 (555) 222-01234 x123" + # + # The ITU E.164 format limits the latter to 12 digits, but in practice not + # all countries respect that, so we relax that restriction here. + # National-only numbers are not allowed. + # + # References: + # + # - https://www.itu.int/rec/T-REC-E.164-201011-I + # + # - https://en.wikipedia.org/wiki/E.164. + # + # - https://en.wikipedia.org/wiki/List_of_country_calling_codes + # + # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] short_code + # @return [::Google::Type::PhoneNumber::ShortCode] + # A short code. + # + # Reference(s): + # - https://wikipedia.org/wiki/Short_code + # + # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] extension + # @return [::String] + # The phone number's extension. The extension is not standardized in ITU + # recommendations, except for being defined as a series of numbers with a + # maximum length of 40 digits. Other than digits, some other dialing + # characters such as ',' (indicating a wait) or '#' may be stored here. + # + # Note that no regions currently use extensions with short codes, so this + # field is normally only set in conjunction with an E.164 number. It is held + # separately from the E.164 number to allow for short code extensions in the + # future. + class PhoneNumber + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An object representing a short code, which is a phone number that is + # typically much shorter than regular phone numbers and can be used to + # address messages in MMS and SMS systems, as well as for abbreviated dialing + # (For example "Text 611 to see how many minutes you have remaining on your + # plan."). + # + # Short codes are restricted to a region and are not internationally + # dialable, which means the same short code can exist in different regions, + # with different usage and pricing, even if those regions share the same + # country calling code (For example: US and CA). + # @!attribute [rw] region_code + # @return [::String] + # Required. The BCP-47 region code of the location where calls to this + # short code can be made, such as "US" and "BB". + # + # Reference(s): + # - http://www.unicode.org/reports/tr35/#unicode_region_subtag + # @!attribute [rw] number + # @return [::String] + # Required. The short code digits, without a leading plus ('+') or country + # calling code. For example "611". + class ShortCode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..e49308966533 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 postal address, such as for postal delivery or payments + # addresses. With a postal address, a postal service can deliver items to a + # premise, P.O. box, or similar. A postal address is not intended to model + # geographical locations like roads, towns, or mountains. + # + # In typical usage, an address would be created by user input or from importing + # existing data, depending on the type of process. + # + # Advice on address input or editing: + # + # - Use an internationalization-ready address widget such as + # https://github.com/google/libaddressinput. + # - Users should not be presented with UI elements for input or editing of + # fields outside countries where that field is used. + # + # For more guidance on how to use this schema, see: + # https://support.google.com/business/answer/6397478. + # @!attribute [rw] revision + # @return [::Integer] + # The schema revision of the `PostalAddress`. This must be set to 0, which is + # the latest revision. + # + # All new revisions **must** be backward compatible with old revisions. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the country/region of the address. This + # is never inferred and it is up to the user to ensure the value is + # correct. See https://cldr.unicode.org/ and + # https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + # for details. Example: "CH" for Switzerland. + # @!attribute [rw] language_code + # @return [::String] + # Optional. BCP-47 language code of the contents of this address (if + # known). This is often the UI language of the input form or is expected + # to match one of the languages used in the address' country/region, or their + # transliterated equivalents. + # This can affect formatting in certain countries, but is not critical + # to the correctness of the data and will never affect any validation or + # other non-formatting related operations. + # + # If this value is not known, it should be omitted (rather than specifying a + # possibly incorrect default). + # + # Examples: "zh-Hant", "ja", "ja-Latn", "en". + # @!attribute [rw] postal_code + # @return [::String] + # Optional. Postal code of the address. Not all countries use or require + # postal codes to be present, but where they are used, they may trigger + # additional validation with other parts of the address (for example, + # state or zip code validation in the United States). + # @!attribute [rw] sorting_code + # @return [::String] + # Optional. Additional, country-specific, sorting code. This is not used + # in most regions. Where it is used, the value is either a string like + # "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or just + # a number alone, representing the "sector code" (Jamaica), "delivery area + # indicator" (Malawi) or "post office indicator" (Côte d'Ivoire). + # @!attribute [rw] administrative_area + # @return [::String] + # Optional. Highest administrative subdivision which is used for postal + # addresses of a country or region. + # For example, this can be a state, a province, an oblast, or a prefecture. + # For Spain, this is the province and not the autonomous + # community (for example, "Barcelona" and not "Catalonia"). + # Many countries don't use an administrative area in postal addresses. For + # example, in Switzerland, this should be left unpopulated. + # @!attribute [rw] locality + # @return [::String] + # Optional. Generally refers to the city or town portion of the address. + # Examples: US city, IT comune, UK post town. + # In regions of the world where localities are not well defined or do not fit + # into this structure well, leave `locality` empty and use `address_lines`. + # @!attribute [rw] sublocality + # @return [::String] + # Optional. Sublocality of the address. + # For example, this can be a neighborhood, borough, or district. + # @!attribute [rw] address_lines + # @return [::Array<::String>] + # Unstructured address lines describing the lower levels of an address. + # + # Because values in `address_lines` do not have type information and may + # sometimes contain multiple values in a single field (for example, + # "Austin, TX"), it is important that the line order is clear. The order of + # address lines should be "envelope order" for the country or region of the + # address. In places where this can vary (for example, Japan), + # `address_language` is used to make it explicit (for example, "ja" for + # large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this + # way, the most specific line of an address can be selected based on the + # language. + # + # The minimum permitted structural representation of an address consists + # of a `region_code` with all remaining information placed in the + # `address_lines`. It would be possible to format such an address very + # approximately without geocoding, but no semantic reasoning could be + # made about any of the address components until it was at least + # partially resolved. + # + # Creating an address only containing a `region_code` and `address_lines` and + # then geocoding is the recommended way to handle completely unstructured + # addresses (as opposed to guessing which parts of the address should be + # localities or administrative areas). + # @!attribute [rw] recipients + # @return [::Array<::String>] + # Optional. The recipient at the address. + # This field may, under certain circumstances, contain multiline information. + # For example, it might contain "care of" information. + # @!attribute [rw] organization + # @return [::String] + # Optional. The name of the organization at the address. + class PostalAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..1661c67a33c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta", path: "../" +else + gem "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb new file mode 100644 index 000000000000..d2c2f5b7044e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_account_issues call in the AccountIssueService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues. +# +def list_account_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new + + # Call the list_account_issues method. + result = client.list_account_issues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. + p item + end +end +# [END merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb new file mode 100644 index 000000000000..a6ee5c5ad6a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax. +# +def get_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new + + # Call the get_account_tax method. + result = client.get_account_tax request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p result +end +# [END merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb new file mode 100644 index 000000000000..05f1f64c9431 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax. +# +def list_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new + + # Call the list_account_tax method. + result = client.list_account_tax request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p item + end +end +# [END merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb new file mode 100644 index 000000000000..eac84cb07759 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_account_tax call in the AccountTaxService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax. +# +def update_account_tax + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new + + # Call the update_account_tax method. + result = client.update_account_tax request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. + p result +end +# [END merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb new file mode 100644 index 000000000000..c4b1730282e8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_and_configure_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account. +# +def create_and_configure_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new + + # Call the create_and_configure_account method. + result = client.create_and_configure_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb new file mode 100644 index 000000000000..be1e82db0406 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account. +# +def delete_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new + + # Call the delete_account method. + result = client.delete_account request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb new file mode 100644 index 000000000000..ce0c105100dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_GetAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account. +# +def get_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new + + # Call the get_account method. + result = client.get_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb new file mode 100644 index 000000000000..507751cb8634 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts. +# +def list_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new + + # Call the list_accounts method. + result = client.list_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + p item + end +end +# [END merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb new file mode 100644 index 000000000000..8db5c917e70c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_sub_accounts call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts. +# +def list_sub_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new + + # Call the list_sub_accounts method. + result = client.list_sub_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. + p item + end +end +# [END merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb new file mode 100644 index 000000000000..d17466b32f14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_account call in the AccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account. +# +def update_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new + + # Call the update_account method. + result = client.update_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. + p result +end +# [END merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb new file mode 100644 index 000000000000..74c288fe1afe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings. +# +def get_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new + + # Call the get_autofeed_settings method. + result = client.get_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + p result +end +# [END merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb new file mode 100644 index 000000000000..fdcde06c5e91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings. +# +def update_autofeed_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new + + # Call the update_autofeed_settings method. + result = client.update_autofeed_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. + p result +end +# [END merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb new file mode 100644 index 000000000000..aae1e325fdef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements. +# +def get_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new + + # Call the get_automatic_improvements method. + result = client.get_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + p result +end +# [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb new file mode 100644 index 000000000000..846c9557c5b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements. +# +def update_automatic_improvements + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new + + # Call the update_automatic_improvements method. + result = client.update_automatic_improvements request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. + p result +end +# [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb new file mode 100644 index 000000000000..b23cc7bee95a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity. +# +def get_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new + + # Call the get_business_identity method. + result = client.get_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + p result +end +# [END merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb new file mode 100644 index 000000000000..b6b4835aabd4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_business_identity call in the BusinessIdentityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity. +# +def update_business_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new + + # Call the update_business_identity method. + result = client.update_business_identity request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. + p result +end +# [END merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb new file mode 100644 index 000000000000..7c8d4345e227 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info. +# +def get_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new + + # Call the get_business_info method. + result = client.get_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + p result +end +# [END merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb new file mode 100644 index 000000000000..cd34a45a3abd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_business_info call in the BusinessInfoService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info. +# +def update_business_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new + + # Call the update_business_info method. + result = client.update_business_info request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. + p result +end +# [END merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb new file mode 100644 index 000000000000..ea2f979f5cd7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. +# +def create_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new + + # Call the create_checkout_settings method. + result = client.create_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb new file mode 100644 index 000000000000..b7b8c95e0bf3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. +# +def delete_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new + + # Call the delete_checkout_settings method. + result = client.delete_checkout_settings request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb new file mode 100644 index 000000000000..c7b80b5590d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. +# +def get_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new + + # Call the get_checkout_settings method. + result = client.get_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb new file mode 100644 index 000000000000..4bdc2f2116dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_checkout_settings call in the CheckoutSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. +# +def update_checkout_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new + + # Call the update_checkout_settings method. + result = client.update_checkout_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. + p result +end +# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb new file mode 100644 index 000000000000..f1cfbb47c184 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences. +# +def get_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new + + # Call the get_email_preferences method. + result = client.get_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + p result +end +# [END merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb new file mode 100644 index 000000000000..efce339f0560 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_email_preferences call in the EmailPreferencesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences. +# +def update_email_preferences + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new + + # Call the update_email_preferences method. + result = client.update_email_preferences request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. + p result +end +# [END merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb new file mode 100644 index 000000000000..cb5845dd1e9e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the link_gbp_account call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account. +# +def link_gbp_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new + + # Call the link_gbp_account method. + result = client.link_gbp_account request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. + p result +end +# [END merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb new file mode 100644 index 000000000000..db5611b0eb27 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_gbp_accounts call in the GbpAccountsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts. +# +def list_gbp_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new + + # Call the list_gbp_accounts method. + result = client.list_gbp_accounts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. + p item + end +end +# [END merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb new file mode 100644 index 000000000000..5d6017d56856 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the claim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage. +# +def claim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new + + # Call the claim_homepage method. + result = client.claim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb new file mode 100644 index 000000000000..b371da4cfb57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage. +# +def get_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new + + # Call the get_homepage method. + result = client.get_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb new file mode 100644 index 000000000000..7119627b9aeb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the unclaim_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage. +# +def unclaim_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new + + # Call the unclaim_homepage method. + result = client.unclaim_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb new file mode 100644 index 000000000000..19c3e42071a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_homepage call in the HomepageService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage. +# +def update_homepage + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new + + # Call the update_homepage method. + result = client.update_homepage request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. + p result +end +# [END merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb new file mode 100644 index 000000000000..e093657726da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the find_lfp_providers call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers. +# +def find_lfp_providers + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new + + # Call the find_lfp_providers method. + result = client.find_lfp_providers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. + p item + end +end +# [END merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb new file mode 100644 index 000000000000..0e786754f919 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the link_lfp_provider call in the LfpProvidersService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider. +# +def link_lfp_provider + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new + + # Call the link_lfp_provider method. + result = client.link_lfp_provider request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. + p result +end +# [END merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb new file mode 100644 index 000000000000..925b54971955 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting. +# +def create_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new + + # Call the create_omnichannel_setting method. + result = client.create_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb new file mode 100644 index 000000000000..f41ee01542d3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting. +# +def get_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new + + # Call the get_omnichannel_setting method. + result = client.get_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb new file mode 100644 index 000000000000..3b764f8ff84d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings. +# +def list_omnichannel_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new + + # Call the list_omnichannel_settings method. + result = client.list_omnichannel_settings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p item + end +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb new file mode 100644 index 000000000000..61b421be1805 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification. +# +def request_inventory_verification + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new + + # Call the request_inventory_verification method. + result = client.request_inventory_verification request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb new file mode 100644 index 000000000000..c9ab04368e53 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting. +# +def update_omnichannel_setting + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new + + # Call the update_omnichannel_setting method. + result = client.update_omnichannel_setting request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. + p result +end +# [END merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb new file mode 100644 index 000000000000..83bc00b2c1df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy. +# +def create_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new + + # Call the create_online_return_policy method. + result = client.create_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb new file mode 100644 index 000000000000..642b3bdcdc00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy. +# +def delete_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new + + # Call the delete_online_return_policy method. + result = client.delete_online_return_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb new file mode 100644 index 000000000000..2105a2c947a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy. +# +def get_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new + + # Call the get_online_return_policy method. + result = client.get_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb new file mode 100644 index 000000000000..f9a0b2b0a844 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies. +# +def list_online_return_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new + + # Call the list_online_return_policies method. + result = client.list_online_return_policies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p item + end +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb new file mode 100644 index 000000000000..4034ff554461 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy. +# +def update_online_return_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new + + # Call the update_online_return_policy method. + result = client.update_online_return_policy request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. + p result +end +# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb new file mode 100644 index 000000000000..775a998697dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the disable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program. +# +def disable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new + + # Call the disable_program method. + result = client.disable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb new file mode 100644 index 000000000000..d1bdf22bfbc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the enable_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program. +# +def enable_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new + + # Call the enable_program method. + result = client.enable_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb new file mode 100644 index 000000000000..ca8e55bfb1f4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_program call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program. +# +def get_program + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new + + # Call the get_program method. + result = client.get_program request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. + p result +end +# [END merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb new file mode 100644 index 000000000000..f3249c03a812 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_programs call in the ProgramsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs. +# +def list_programs + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new + + # Call the list_programs method. + result = client.list_programs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. + p item + end +end +# [END merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb new file mode 100644 index 000000000000..8b0ad849b120 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region. +# +def create_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new + + # Call the create_region method. + result = client.create_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb new file mode 100644 index 000000000000..97ee0432dab6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region. +# +def delete_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new + + # Call the delete_region method. + result = client.delete_region request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb new file mode 100644 index 000000000000..6929030f8c97 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_GetRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region. +# +def get_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new + + # Call the get_region method. + result = client.get_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb new file mode 100644 index 000000000000..390e2d0f9420 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_ListRegions_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_regions call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions. +# +def list_regions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new + + # Call the list_regions method. + result = client.list_regions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. + p item + end +end +# [END merchantapi_v1beta_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb new file mode 100644 index 000000000000..ef1e556cc578 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_region call in the RegionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region. +# +def update_region + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new + + # Call the update_region method. + result = client.update_region request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. + p result +end +# [END merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb new file mode 100644 index 000000000000..e6cbd703b4dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings. +# +def get_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new + + # Call the get_shipping_settings method. + result = client.get_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + p result +end +# [END merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb new file mode 100644 index 000000000000..592e8881b30b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the insert_shipping_settings call in the ShippingSettingsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings. +# +def insert_shipping_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new + + # Call the insert_shipping_settings method. + result = client.insert_shipping_settings request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. + p result +end +# [END merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json new file mode 100644 index 000000000000..519af736323e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -0,0 +1,2535 @@ +{ + "client_library": { + "name": "google-shopping-merchant-accounts-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.accounts.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync", + "title": "Snippet for the get_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax.", + "file": "account_tax_service/get_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "GetAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.GetAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync", + "title": "Snippet for the list_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax.", + "file": "account_tax_service/list_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "ListAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.ListAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync", + "title": "Snippet for the update_account_tax call in the AccountTaxService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax.", + "file": "account_tax_service/update_account_tax.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_tax", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", + "client": { + "short_name": "AccountTaxService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" + }, + "method": { + "short_name": "UpdateAccountTax", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.UpdateAccountTax", + "service": { + "short_name": "AccountTaxService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync", + "title": "Snippet for the list_account_issues call in the AccountIssueService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues.", + "file": "account_issue_service/list_account_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_issues", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse", + "client": { + "short_name": "AccountIssueService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client" + }, + "method": { + "short_name": "ListAccountIssues", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService.ListAccountIssues", + "service": { + "short_name": "AccountIssueService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_GetUser_sync", + "title": "Snippet for the get_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user.", + "file": "user_service/get_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "GetUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.GetUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_CreateUser_sync", + "title": "Snippet for the create_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user.", + "file": "user_service/create_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "CreateUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.CreateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_DeleteUser_sync", + "title": "Snippet for the delete_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user.", + "file": "user_service/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.DeleteUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_UpdateUser_sync", + "title": "Snippet for the update_user call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user.", + "file": "user_service/update_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_user", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "UpdateUser", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.UpdateUser", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_UserService_ListUsers_sync", + "title": "Snippet for the list_users call in the UserService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users.", + "file": "user_service/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse", + "client": { + "short_name": "UserService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService.ListUsers", + "service": { + "short_name": "UserService", + "full_name": "google.shopping.merchant.accounts.v1beta.UserService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_GetAccount_sync", + "title": "Snippet for the get_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account.", + "file": "accounts_service/get_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "GetAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.GetAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync", + "title": "Snippet for the create_and_configure_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account.", + "file": "accounts_service/create_and_configure_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_and_configure_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "CreateAndConfigureAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.CreateAndConfigureAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync", + "title": "Snippet for the delete_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account.", + "file": "accounts_service/delete_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "DeleteAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.DeleteAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync", + "title": "Snippet for the update_account call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account.", + "file": "accounts_service/update_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "UpdateAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.UpdateAccount", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_ListAccounts_sync", + "title": "Snippet for the list_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts.", + "file": "accounts_service/list_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "ListAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync", + "title": "Snippet for the list_sub_accounts call in the AccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts.", + "file": "accounts_service/list_sub_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sub_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse", + "client": { + "short_name": "AccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" + }, + "method": { + "short_name": "ListSubAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListSubAccounts", + "service": { + "short_name": "AccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync", + "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings.", + "file": "autofeed_settings_service/get_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "GetAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.GetAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", + "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings.", + "file": "autofeed_settings_service/update_autofeed_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_autofeed_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", + "client": { + "short_name": "AutofeedSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" + }, + "method": { + "short_name": "UpdateAutofeedSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.UpdateAutofeedSettings", + "service": { + "short_name": "AutofeedSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", + "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements.", + "file": "automatic_improvements_service/get_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "GetAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", + "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements.", + "file": "automatic_improvements_service/update_automatic_improvements.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_automatic_improvements", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", + "client": { + "short_name": "AutomaticImprovementsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" + }, + "method": { + "short_name": "UpdateAutomaticImprovements", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", + "service": { + "short_name": "AutomaticImprovementsService", + "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync", + "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity.", + "file": "business_identity_service/get_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" + }, + "method": { + "short_name": "GetBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.GetBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", + "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity.", + "file": "business_identity_service/update_business_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_identity", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", + "client": { + "short_name": "BusinessIdentityService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" + }, + "method": { + "short_name": "UpdateBusinessIdentity", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.UpdateBusinessIdentity", + "service": { + "short_name": "BusinessIdentityService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync", + "title": "Snippet for the get_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info.", + "file": "business_info_service/get_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" + }, + "method": { + "short_name": "GetBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.GetBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync", + "title": "Snippet for the update_business_info call in the BusinessInfoService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info.", + "file": "business_info_service/update_business_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_business_info", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", + "client": { + "short_name": "BusinessInfoService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" + }, + "method": { + "short_name": "UpdateBusinessInfo", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.UpdateBusinessInfo", + "service": { + "short_name": "BusinessInfoService", + "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", + "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", + "file": "checkout_settings_service/get_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "GetCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", + "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", + "file": "checkout_settings_service/create_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "CreateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", + "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", + "file": "checkout_settings_service/update_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "UpdateCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", + "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", + "file": "checkout_settings_service/delete_checkout_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_checkout_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CheckoutSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" + }, + "method": { + "short_name": "DeleteCheckoutSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", + "service": { + "short_name": "CheckoutSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", + "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences.", + "file": "email_preferences_service/get_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" + }, + "method": { + "short_name": "GetEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync", + "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences.", + "file": "email_preferences_service/update_email_preferences.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_email_preferences", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", + "client": { + "short_name": "EmailPreferencesService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" + }, + "method": { + "short_name": "UpdateEmailPreferences", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences", + "service": { + "short_name": "EmailPreferencesService", + "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync", + "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts.", + "file": "gbp_accounts_service/list_gbp_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gbp_accounts", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" + }, + "method": { + "short_name": "ListGbpAccounts", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync", + "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account.", + "file": "gbp_accounts_service/link_gbp_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_gbp_account", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse", + "client": { + "short_name": "GbpAccountsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" + }, + "method": { + "short_name": "LinkGbpAccount", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount", + "service": { + "short_name": "GbpAccountsService", + "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_GetHomepage_sync", + "title": "Snippet for the get_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage.", + "file": "homepage_service/get_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "GetHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.GetHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync", + "title": "Snippet for the update_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage.", + "file": "homepage_service/update_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "UpdateHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UpdateHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync", + "title": "Snippet for the claim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage.", + "file": "homepage_service/claim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "claim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "ClaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.ClaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync", + "title": "Snippet for the unclaim_homepage call in the HomepageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage.", + "file": "homepage_service/unclaim_homepage.rb", + "language": "RUBY", + "client_method": { + "short_name": "unclaim_homepage", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", + "client": { + "short_name": "HomepageService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" + }, + "method": { + "short_name": "UnclaimHomepage", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UnclaimHomepage", + "service": { + "short_name": "HomepageService", + "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync", + "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers.", + "file": "lfp_providers_service/find_lfp_providers.rb", + "language": "RUBY", + "client_method": { + "short_name": "find_lfp_providers", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" + }, + "method": { + "short_name": "FindLfpProviders", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync", + "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider.", + "file": "lfp_providers_service/link_lfp_provider.rb", + "language": "RUBY", + "client_method": { + "short_name": "link_lfp_provider", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse", + "client": { + "short_name": "LfpProvidersService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" + }, + "method": { + "short_name": "LinkLfpProvider", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider", + "service": { + "short_name": "LfpProvidersService", + "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", + "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting.", + "file": "omnichannel_settings_service/get_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "GetOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.GetOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", + "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings.", + "file": "omnichannel_settings_service/list_omnichannel_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_omnichannel_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "ListOmnichannelSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.ListOmnichannelSettings", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", + "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting.", + "file": "omnichannel_settings_service/create_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "CreateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.CreateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", + "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting.", + "file": "omnichannel_settings_service/update_omnichannel_setting.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_omnichannel_setting", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "UpdateOmnichannelSetting", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.UpdateOmnichannelSetting", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", + "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification.", + "file": "omnichannel_settings_service/request_inventory_verification.rb", + "language": "RUBY", + "client_method": { + "short_name": "request_inventory_verification", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse", + "client": { + "short_name": "OmnichannelSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" + }, + "method": { + "short_name": "RequestInventoryVerification", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.RequestInventoryVerification", + "service": { + "short_name": "OmnichannelSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", + "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy.", + "file": "online_return_policy_service/get_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "GetOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", + "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies.", + "file": "online_return_policy_service/list_online_return_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_online_return_policies", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "ListOnlineReturnPolicies", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.ListOnlineReturnPolicies", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", + "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy.", + "file": "online_return_policy_service/create_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "CreateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.CreateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync", + "title": "Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy.", + "file": "online_return_policy_service/update_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "UpdateOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.UpdateOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", + "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy.", + "file": "online_return_policy_service/delete_online_return_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_online_return_policy", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "OnlineReturnPolicyService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" + }, + "method": { + "short_name": "DeleteOnlineReturnPolicy", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", + "service": { + "short_name": "OnlineReturnPolicyService", + "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_GetProgram_sync", + "title": "Snippet for the get_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program.", + "file": "programs_service/get_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "GetProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.GetProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync", + "title": "Snippet for the list_programs call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs.", + "file": "programs_service/list_programs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_programs", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "ListPrograms", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.ListPrograms", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync", + "title": "Snippet for the enable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program.", + "file": "programs_service/enable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "EnableProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.EnableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync", + "title": "Snippet for the disable_program call in the ProgramsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program.", + "file": "programs_service/disable_program.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_program", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", + "client": { + "short_name": "ProgramsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" + }, + "method": { + "short_name": "DisableProgram", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.DisableProgram", + "service": { + "short_name": "ProgramsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_GetRegion_sync", + "title": "Snippet for the get_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region.", + "file": "regions_service/get_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "GetRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.GetRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_CreateRegion_sync", + "title": "Snippet for the create_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region.", + "file": "regions_service/create_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "CreateRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.CreateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync", + "title": "Snippet for the update_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region.", + "file": "regions_service/update_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "UpdateRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.UpdateRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync", + "title": "Snippet for the delete_region call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region.", + "file": "regions_service/delete_region.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_region", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "DeleteRegion", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.DeleteRegion", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionsService_ListRegions_sync", + "title": "Snippet for the list_regions call in the RegionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions.", + "file": "regions_service/list_regions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regions", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse", + "client": { + "short_name": "RegionsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" + }, + "method": { + "short_name": "ListRegions", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.ListRegions", + "service": { + "short_name": "RegionsService", + "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync", + "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings.", + "file": "shipping_settings_service/get_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" + }, + "method": { + "short_name": "GetShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.GetShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync", + "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings.", + "file": "shipping_settings_service/insert_shipping_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_shipping_settings", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", + "client": { + "short_name": "ShippingSettingsService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" + }, + "method": { + "short_name": "InsertShippingSettings", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.InsertShippingSettings", + "service": { + "short_name": "ShippingSettingsService", + "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync", + "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service.", + "file": "terms_of_service_service/get_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "GetTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.GetTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", + "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", + "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_latest_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "RetrieveLatestTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.RetrieveLatestTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync", + "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service.", + "file": "terms_of_service_service/accept_terms_of_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "accept_terms_of_service", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TermsOfServiceService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" + }, + "method": { + "short_name": "AcceptTermsOfService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.AcceptTermsOfService", + "service": { + "short_name": "TermsOfServiceService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", + "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "GetTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", + "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", + "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_for_application_terms_of_service_agreement_state", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", + "client": { + "short_name": "TermsOfServiceAgreementStateService::Client", + "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" + }, + "method": { + "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", + "service": { + "short_name": "TermsOfServiceAgreementStateService", + "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" + } + } + }, + "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-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..6002493fa06e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. +# +def get_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new + + # Call the get_terms_of_service_agreement_state method. + result = client.get_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb new file mode 100644 index 000000000000..fce83e3ae057 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. +# +def retrieve_for_application_terms_of_service_agreement_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new + + # Call the retrieve_for_application_terms_of_service_agreement_state method. + result = client.retrieve_for_application_terms_of_service_agreement_state request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb new file mode 100644 index 000000000000..b1e3c65fd56f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the accept_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service. +# +def accept_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new + + # Call the accept_terms_of_service method. + result = client.accept_terms_of_service request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb new file mode 100644 index 000000000000..72780fd192f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service. +# +def get_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new + + # Call the get_terms_of_service method. + result = client.get_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb new file mode 100644 index 000000000000..e0039a91db2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service. +# +def retrieve_latest_terms_of_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new + + # Call the retrieve_latest_terms_of_service method. + result = client.retrieve_latest_terms_of_service request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. + p result +end +# [END merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb new file mode 100644 index 000000000000..99337d55834e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_CreateUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the create_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user. +# +def create_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new + + # Call the create_user method. + result = client.create_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb new file mode 100644 index 000000000000..07a8a692be99 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_DeleteUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the delete_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb new file mode 100644 index 000000000000..7e279d65f5b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_GetUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the get_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user. +# +def get_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new + + # Call the get_user method. + result = client.get_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb new file mode 100644 index 000000000000..17dca433a258 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_ListUsers_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the list_users call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. + p item + end +end +# [END merchantapi_v1beta_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb new file mode 100644 index 000000000000..a39e0c84162a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_UserService_UpdateUser_sync] +require "google/shopping/merchant/accounts/v1beta" + +## +# Snippet for the update_user call in the UserService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user. +# +def update_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new + + # Call the update_user method. + result = client.update_user request + + # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. + p result +end +# [END merchantapi_v1beta_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb new file mode 100644 index 000000000000..d759cbee13e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb new file mode 100644 index 000000000000..3b4c93312537 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb new file mode 100644 index 000000000000..1762325f7744 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/accountissue_pb" +require "google/shopping/merchant/accounts/v1beta/account_issue_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + time_zone = "hello world" + + list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_issues, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, 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["language_code"] + assert_equal "hello world", request["time_zone"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_issues_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_account_issues_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb new file mode 100644 index 000000000000..f72de9504a1c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/account_tax_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_tax_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_tax_path account: "value0", tax: "value1" + assert_equal "accounts/value0/accounttax/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb new file mode 100644 index 000000000000..2448c1d9965f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_get_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_account_tax({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_account_tax name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_account_tax({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_tax_client_stub.call_count + end + end + end + + def test_list_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new + http_response = OpenStruct.new 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_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_list_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_count + end + end + end + + def test_update_account_tax + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_tax = {} + update_mask = {} + + update_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_update_account_tax_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_account_tax account_tax: account_tax, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb new file mode 100644 index 000000000000..fb9595c10ef5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/account_tax_pb" +require "google/shopping/merchant/accounts/v1beta/account_tax_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_account_tax({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_account_tax name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_account_tax({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_tax_client_stub.call_rpc_count + end + end + + def test_list_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, 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_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_rpc_count + end + end + + def test_update_account_tax + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_tax = {} + update_mask = {} + + update_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_tax, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax), request["account_tax"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_tax_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_account_tax account_tax: account_tax, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb new file mode 100644 index 000000000000..62d77fd98b02 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb new file mode 100644 index 000000000000..007709ef9bbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb @@ -0,0 +1,432 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_count + end + end + end + + def test_create_and_configure_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + users = [{}] + accept_terms_of_service = {} + service = [{}] + + create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_count + end + end + end + + def test_delete_account + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_account({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_account name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_account({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_count + end + end + end + + def test_update_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_account({ account: account, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_account account: account, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_count + end + end + end + + def test_list_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_accounts_client_stub.call_count + end + end + end + + def test_list_sub_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb new file mode 100644 index 000000000000..b804a96086a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb @@ -0,0 +1,481 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/accounts_pb" +require "google/shopping/merchant/accounts/v1beta/accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_account({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_client_stub.call_rpc_count + end + end + + def test_create_and_configure_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + users = [{}] + accept_terms_of_service = {} + service = [{}] + + create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_and_configure_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request["users"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService), request["accept_terms_of_service"] + assert request.has_accept_terms_of_service? + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_and_configure_account_client_stub.call_rpc_count + end + end + + def test_delete_account + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_account({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_account name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_account({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_client_stub.call_rpc_count + end + end + + def test_update_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = {} + update_mask = {} + + update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_account({ account: account, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_account account: account, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_account({ account: account, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_client_stub.call_rpc_count + end + end + + def test_list_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, request + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_accounts_client_stub.call_rpc_count + end + end + + def test_list_sub_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + provider = "hello world" + page_size = 42 + page_token = "hello world" + + list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sub_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, request + assert_equal "hello world", request["provider"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_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_sub_accounts_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb new file mode 100644 index 000000000000..0d03f7e27cbf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.autofeed_settings_path account: "value0" + assert_equal "accounts/value0/autofeedSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb new file mode 100644 index 000000000000..e568de354b9e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_autofeed_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_autofeed_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_autofeed_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_count + end + end + end + + def test_update_autofeed_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb new file mode 100644 index 000000000000..81bf70221d6e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" +require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_autofeed_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_autofeed_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count + end + end + + def test_update_autofeed_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + autofeed_settings = {} + update_mask = {} + + update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_autofeed_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings), request["autofeed_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_autofeed_settings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb new file mode 100644 index 000000000000..5432846fad2e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.automatic_improvements_path account: "value0" + assert_equal "accounts/value0/automaticImprovements", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb new file mode 100644 index 000000000000..3661fc4b5cb9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_automatic_improvements({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_automatic_improvements name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_automatic_improvements({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_count + end + end + end + + def test_update_automatic_improvements + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb new file mode 100644 index 000000000000..e1e55704cfc9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" +require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_automatic_improvements({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_automatic_improvements name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count + end + end + + def test_update_automatic_improvements + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + automatic_improvements = {} + update_mask = {} + + update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_automatic_improvements, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements), request["automatic_improvements"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb new file mode 100644 index 000000000000..20f3daac2d1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_identity_path account: "value0" + assert_equal "accounts/value0/businessIdentity", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb new file mode 100644 index 000000000000..d8cf55cffb39 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_business_identity({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_business_identity name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_business_identity({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_count + end + end + end + + def test_update_business_identity + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb new file mode 100644 index 000000000000..3ba57bd06fbd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" +require "google/shopping/merchant/accounts/v1beta/business_identity_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_identity_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_business_identity({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_business_identity name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_business_identity({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_identity_client_stub.call_rpc_count + end + end + + def test_update_business_identity + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_identity = {} + update_mask = {} + + update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_identity, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity), request["business_identity"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_identity_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb new file mode 100644 index 000000000000..128cf717a145 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.business_info_path account: "value0" + assert_equal "accounts/value0/businessInfo", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb new file mode 100644 index 000000000000..1e3541aadd85 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_business_info({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_business_info name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_business_info({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_count + end + end + end + + def test_update_business_info + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb new file mode 100644 index 000000000000..cd6e3250647c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" +require "google/shopping/merchant/accounts/v1beta/business_info_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_business_info_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_business_info({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_business_info name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_business_info({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_business_info_client_stub.call_rpc_count + end + end + + def test_update_business_info + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + business_info = {} + update_mask = {} + + update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_business_info, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo), request["business_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_business_info_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_business_info({ business_info: business_info, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb new file mode 100644 index 000000000000..4f838dc12447 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.checkout_settings_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1/checkoutSettings", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb new file mode 100644 index 000000000000..d1109975a30a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_count + end + end + end + + def test_create_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_count + end + end + end + + def test_update_checkout_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_count + end + end + end + + def test_delete_checkout_settings + # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_checkout_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_checkout_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_checkout_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_checkout_settings_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb new file mode 100644 index 000000000000..238e43a52a09 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -0,0 +1,340 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" +require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_checkout_settings_client_stub.call_rpc_count + end + end + + def test_create_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + checkout_settings = {} + + create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_checkout_settings_client_stub.call_rpc_count + end + end + + def test_update_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + checkout_settings = {} + update_mask = {} + + update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_checkout_settings_client_stub.call_rpc_count + end + end + + def test_delete_checkout_settings + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_checkout_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_checkout_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_checkout_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_checkout_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(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_checkout_settings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb new file mode 100644 index 000000000000..a4b6db6efe0f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_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/shopping/merchant/accounts/v1beta/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.email_preferences_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1/emailPreferences", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb new file mode 100644 index 000000000000..abdc1010bd13 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_email_preferences({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_email_preferences name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_email_preferences({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_count + end + end + end + + def test_update_email_preferences + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb new file mode 100644 index 000000000000..31103ff9a7aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" +require "google/shopping/merchant/accounts/v1beta/email_preferences_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_email_preferences({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_email_preferences name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_email_preferences({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_email_preferences_client_stub.call_rpc_count + end + end + + def test_update_email_preferences + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + email_preferences = {} + update_mask = {} + + update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_email_preferences, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences), request["email_preferences"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb new file mode 100644 index 000000000000..28b36c651b32 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_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/shopping/merchant/accounts/v1beta/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb new file mode 100644 index 000000000000..7d9ec650854d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new + http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count + end + end + end + + def test_link_gbp_account + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_gbp_account_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb new file mode 100644 index 000000000000..0a94b37e7a87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" +require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gbp_accounts, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count + end + end + + def test_link_gbp_account + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + gbp_email = "hello world" + + link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_gbp_account, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["gbp_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_gbp_account_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb new file mode 100644 index 000000000000..61d80f67f1a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.homepage_path account: "value0" + assert_equal "accounts/value0/homepage", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb new file mode 100644 index 000000000000..24f5f703463f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb @@ -0,0 +1,316 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_count + end + end + end + + def test_update_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_homepage_client_stub.call_count + end + end + end + + def test_claim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.claim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.claim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.claim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_count + end + end + end + + def test_unclaim_homepage + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.unclaim_homepage({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.unclaim_homepage name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.unclaim_homepage({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb new file mode 100644 index 000000000000..541f4c4af0ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb @@ -0,0 +1,338 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/homepage_pb" +require "google/shopping/merchant/accounts/v1beta/homepage_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_homepage_client_stub.call_rpc_count + end + end + + def test_update_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + homepage = {} + update_mask = {} + + update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Homepage), request["homepage"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_homepage({ homepage: homepage, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count + end + end + + def test_claim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :claim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, claim_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.claim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.claim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.claim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, claim_homepage_client_stub.call_rpc_count + end + end + + def test_unclaim_homepage + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unclaim_homepage, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.unclaim_homepage({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.unclaim_homepage name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.unclaim_homepage({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unclaim_homepage_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb new file mode 100644 index 000000000000..40c4e008e3f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_lfp_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" + assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb new file mode 100644 index 000000000000..9441edd6a6fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count + end + end + end + + def test_link_lfp_provider + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb new file mode 100644 index 000000000000..95a5bb2889f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" +require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :find_lfp_providers, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count + end + end + + def test_link_lfp_provider + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + external_account_id = "hello world" + + link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :link_lfp_provider, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["external_account_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, link_lfp_provider_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb new file mode 100644 index 000000000000..fda485c81acf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_omnichannel_setting_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" + assert_equal "accounts/value0/omnichannelSettings/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb new file mode 100644 index 000000000000..4e97a17d0072 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_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/rest" +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_omnichannel_setting({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_omnichannel_setting name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_omnichannel_setting({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_count + end + end + end + + def test_list_omnichannel_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new + http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count + end + end + end + + def test_create_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_count + end + end + end + + def test_update_omnichannel_setting + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_omnichannel_setting_client_stub.call_count + end + end + end + + def test_request_inventory_verification + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.request_inventory_verification({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.request_inventory_verification name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.request_inventory_verification({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb new file mode 100644 index 000000000000..54fe923feebb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb @@ -0,0 +1,407 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" +require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_omnichannel_setting({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_omnichannel_setting name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_list_omnichannel_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_omnichannel_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count + end + end + + def test_create_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + omnichannel_setting = {} + + create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_update_omnichannel_setting + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + omnichannel_setting = {} + update_mask = {} + + update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_omnichannel_setting, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count + end + end + + def test_request_inventory_verification + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + request_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :request_inventory_verification, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.request_inventory_verification({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.request_inventory_verification name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.request_inventory_verification({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, request_inventory_verification_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb new file mode 100644 index 000000000000..c8399e11c1e1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_online_return_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.online_return_policy_path account: "value0", return_policy: "value1" + assert_equal "accounts/value0/onlineReturnPolicies/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb new file mode 100644 index 000000000000..9d60cb71c44e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_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/rest" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_count + end + end + end + + def test_list_online_return_policies + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new + http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count + end + end + end + + def test_create_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_count + end + end + end + + def test_update_online_return_policy + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + online_return_policy = {} + update_mask = {} + + update_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_update_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_online_return_policy_client_stub.call_count + end + end + end + + def test_delete_online_return_policy + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_online_return_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_online_return_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_online_return_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_online_return_policy_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb new file mode 100644 index 000000000000..0cbc348828d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb @@ -0,0 +1,407 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" +require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_online_return_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_online_return_policy_client_stub.call_rpc_count + end + end + + def test_list_online_return_policies + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_online_return_policies, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count + end + end + + def test_create_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + online_return_policy = {} + + create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_online_return_policy_client_stub.call_rpc_count + end + end + + def test_update_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + online_return_policy = {} + update_mask = {} + + update_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_online_return_policy_client_stub.call_rpc_count + end + end + + def test_delete_online_return_policy + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_online_return_policy, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_online_return_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_online_return_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_online_return_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb new file mode 100644 index 000000000000..380202e72500 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_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/shopping/merchant/accounts/v1beta/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_program_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.program_path account: "value0", program: "value1" + assert_equal "accounts/value0/programs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb new file mode 100644 index 000000000000..91c368ce6958 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_count + end + end + end + + def test_list_programs + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new + http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_programs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_count + end + end + end + + def test_enable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_count + end + end + end + + def test_disable_program + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_program({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_program name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_program({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb new file mode 100644 index 000000000000..5d47d7fdf72c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb @@ -0,0 +1,345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/programs_pb" +require "google/shopping/merchant/accounts/v1beta/programs_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_program_client_stub.call_rpc_count + end + end + + def test_list_programs + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_programs, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, 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_programs_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_programs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_rpc_count + end + end + + def test_enable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_program_client_stub.call_rpc_count + end + end + + def test_disable_program + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_program, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_program_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_program({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_program name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_program({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_program_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb new file mode 100644 index 000000000000..698e3d23528b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_region_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.region_path account: "value0", region: "value1" + assert_equal "accounts/value0/regions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb new file mode 100644 index 000000000000..7a80d1a66e9b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_count + end + end + end + + def test_create_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_region parent: parent, region_id: region_id, region: region do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_count + end + end + end + + def test_update_region + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_region({ region: region, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_region region: region, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_region_client_stub.call_count + end + end + end + + def test_delete_region + # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_region({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_region name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_region({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_region_client_stub.call_count + end + end + end + + def test_list_regions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new + http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_regions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb new file mode 100644 index 000000000000..b8d04e0ec14d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb @@ -0,0 +1,409 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/regions_pb" +require "google/shopping/merchant/accounts/v1beta/regions_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_region({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_region_client_stub.call_rpc_count + end + end + + def test_create_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + region_id = "hello world" + region = {} + + create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["region_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_region parent: parent, region_id: region_id, region: region do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_region_client_stub.call_rpc_count + end + end + + def test_update_region + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region = {} + update_mask = {} + + update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_region({ region: region, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_region region: region, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_region({ region: region, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count + end + end + + def test_delete_region + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_region, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_region_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_region({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_region name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_region({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count + end + end + + def test_list_regions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regions, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, 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_regions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_regions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb new file mode 100644 index 000000000000..555555c1a601 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.shipping_settings_path account: "value0" + assert_equal "accounts/value0/shippingSettings", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb new file mode 100644 index 000000000000..12786998e452 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_shipping_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_shipping_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_shipping_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_count + end + end + end + + def test_insert_shipping_settings + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb new file mode 100644 index 000000000000..a07f02f18b17 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" +require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_shipping_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_shipping_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_shipping_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_shipping_settings_client_stub.call_rpc_count + end + end + + def test_insert_shipping_settings + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + shipping_setting = {} + + insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_shipping_settings, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings), request["shipping_setting"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_shipping_settings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb new file mode 100644 index 000000000000..eecca8da77a7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_agreement_state_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" + assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb new file mode 100644 index 000000000000..aa3c6d3f45be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb @@ -0,0 +1,207 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_terms_of_service_agreement_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_terms_of_service_agreement_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count + end + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb new file mode 100644 index 000000000000..f42810b4c121 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb @@ -0,0 +1,220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_terms_of_service_agreement_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_terms_of_service_agreement_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count + end + end + + def test_retrieve_for_application_terms_of_service_agreement_state + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_for_application_terms_of_service_agreement_state, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.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, retrieve_for_application_terms_of_service_agreement_state_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb new file mode 100644 index 000000000000..cecc22896b0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_terms_of_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.terms_of_service_path version: "value0" + assert_equal "termsOfService/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb new file mode 100644 index 000000000000..881bf00a9a36 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_terms_of_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_terms_of_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_terms_of_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_count + end + end + end + + def test_retrieve_latest_terms_of_service + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count + end + end + end + + def test_accept_terms_of_service + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb new file mode 100644 index 000000000000..2e8bb0f3b620 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb @@ -0,0 +1,284 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" +require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_terms_of_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_terms_of_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_terms_of_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_terms_of_service_client_stub.call_rpc_count + end + end + + def test_retrieve_latest_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + region_code = "hello world" + kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED + + retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_latest_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, request + assert_equal "hello world", request["region_code"] + assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count + end + end + + def test_accept_terms_of_service + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = "hello world" + region_code = "hello world" + + accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :accept_terms_of_service, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["account"] + assert_equal "hello world", request["region_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, accept_terms_of_service_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb new file mode 100644 index 000000000000..e71cf60afd5d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path account: "value0", email: "value1" + assert_equal "accounts/value0/users/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb new file mode 100644 index 000000000000..55c4d6896e48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service/rest" + + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_count + end + end + end + + def test_create_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_user parent: parent, user_id: user_id, user: user do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_count + end + end + end + + def test_delete_user + # 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_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_user({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_user name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_user({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_update_user + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_user({ user: user, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_user user: user, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_user_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new + http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_users parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb new file mode 100644 index 000000000000..21191fcbe518 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb @@ -0,0 +1,409 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/accounts/v1beta/user_pb" +require "google/shopping/merchant/accounts/v1beta/user_service" + +class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_user_client_stub.call_rpc_count + end + end + + def test_create_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_id = "hello world" + user = {} + + create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["user_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_user parent: parent, user_id: user_id, user: user do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_user_client_stub.call_rpc_count + end + end + + def test_delete_user + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_user({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_user name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_user({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(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_user_client_stub.call_rpc_count + end + end + + def test_update_user + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + user = {} + update_mask = {} + + update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_user, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_user_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_user({ user: user, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_user user: user, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_user({ user: user, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, 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_users_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_users parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json new file mode 100644 index 000000000000..20ec393175c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", + "distribution_name": "google-shopping-merchant-conversions-v1", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1 API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml new file mode 100644 index 000000000000..dc26bdfd3a23 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-conversions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..6489474b1d66 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/conversions/v1" + +::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md new file mode 100644 index 000000000000..e7b96a955e31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Merchant V1 API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1 API. Most users should consider using +the main client gem, +[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/conversions/v1" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new +request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) +response = client.create_conversion_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/conversions/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-conversions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. +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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile new file mode 100644 index 000000000000..09036b63c7b4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-conversions-v1" + header "google-shopping-merchant-conversions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-conversions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json new file mode 100644 index 000000000000..c91c1680b96f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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.shopping.merchant.conversions.v1", + "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "create_conversion_source" + ] + }, + "UpdateConversionSource": { + "methods": [ + "update_conversion_source" + ] + }, + "DeleteConversionSource": { + "methods": [ + "delete_conversion_source" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undelete_conversion_source" + ] + }, + "GetConversionSource": { + "methods": [ + "get_conversion_source" + ] + }, + "ListConversionSources": { + "methods": [ + "list_conversion_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec new file mode 100644 index 000000000000..5c67c8439003 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-conversions-v1" + gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center 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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb new file mode 100644 index 000000000000..2992146c576e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb new file mode 100644 index 000000000000..d3e68a85ea00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb new file mode 100644 index 000000000000..ec823442ad31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb new file mode 100644 index 000000000000..db5605285d85 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb @@ -0,0 +1,975 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + ## + # Client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 + + @conversion_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.conversion_source&.name + header_params["conversion_source.name"] = request.conversion_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService API. + # + # This class represents the configuration for ConversionSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb new file mode 100644 index 000000000000..c408f4a3e17b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Credentials for the ConversionSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb new file mode 100644 index 000000000000..58f06044072d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Path helper methods for the ConversionSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ConversionSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/conversionSources/{conversion_source}` + # + # @param account [String] + # @param conversion_source [String] + # + # @return [::String] + def conversion_source_path account:, conversion_source: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/conversionSources/#{conversion_source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb new file mode 100644 index 000000000000..c4ae00d76953 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ## + # Service for managing conversion sources for a merchant account. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb new file mode 100644 index 000000000000..172557541b57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb @@ -0,0 +1,890 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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 + + @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService REST API. + # + # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..cba0818d9244 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + module Rest + ## + # REST service stub for the ConversionSourcesService 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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def create_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def update_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def undelete_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # A result object deserialized from the server's reply + def get_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] + # A result object deserialized from the server's reply + def list_conversion_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_conversion_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{parent}/conversionSources", + body: "conversion_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/conversions/v1/{conversion_source.name}", + body: "conversion_source", + matches: [ + ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_conversion_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1/{parent}/conversionSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb new file mode 100644 index 000000000000..4a8730f21f3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/conversions/v1/conversionsources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Conversions + module V1 + ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass + ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule + ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule + AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass + AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass + AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule + GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass + MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass + CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass + UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass + DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass + UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass + GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass + ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass + ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb new file mode 100644 index 000000000000..45549ad85a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.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/shopping/merchant/conversions/v1/conversionsources_pb' + +module Google + module Shopping + module Merchant + module Conversions + module V1 + module ConversionSourcesService + # Service for managing conversion sources for a merchant account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' + + # Creates a new conversion source. + rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Fetches a conversion source. + rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource + # Retrieves the list of conversion sources the caller has access to. + rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb new file mode 100644 index 000000000000..851e5c7243ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" +require "google/shopping/merchant/conversions/v1/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/conversions/v1/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb new file mode 100644 index 000000000000..09fb85215856 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb new file mode 100644 index 000000000000..f308c62c77bc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1 + # Represents a conversion source owned by a Merchant account. A merchant + # account can have up to 200 conversion sources. + # @!attribute [rw] google_analytics_link + # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] + # Immutable. Conversion Source of type "Link to Google Analytics Property". + # + # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_center_destination + # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] + # Conversion Source of type "Merchant Center Tag Destination". + # + # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Generated by the Content API upon creation of a + # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before + # the colon represent the type of conversion source. Content after the colon + # represents the ID of the conversion source within that type. The ID of two + # different conversion sources might be the same across different types. The + # following type prefixes are supported: + # * `galk`: For GoogleAnalyticsLink sources. + # * `mcdn`: For MerchantCenterDestination sources. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] + # Output only. Current state of this conversion source. Can't be edited + # through the API. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when an archived conversion source becomes + # permanently deleted and is no longer available to undelete. + # @!attribute [r] controller + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] + # Output only. Controller of the conversion source. + class ConversionSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the state of a conversion source. + module State + # Conversion source has unspecified state. + STATE_UNSPECIFIED = 0 + + # Conversion source is fully functional. + ACTIVE = 1 + + # Conversion source has been archived in the last 30 days and is currently + # not functional. Can be restored using the undelete method. + ARCHIVED = 2 + + # Conversion source creation has started but not fully finished yet. + PENDING = 3 + end + + # Entity controlling the conversion source. + module Controller + # Default value. This value is unused. + CONTROLLER_UNSPECIFIED = 0 + + # Controlled by the Merchant who owns the Conversion Source. + MERCHANT = 1 + + # Controlled by the Youtube Affiliates program. + YOUTUBE_AFFILIATES = 2 + end + end + + # Represents attribution settings for conversion sources receiving + # pre-attribution data. + # @!attribute [rw] attribution_lookback_window_days + # @return [::Integer] + # Required. Lookback window (in days) used for attribution in this source. + # Supported values are `7`, `30` & `40`. + # @!attribute [rw] attribution_model + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] + # Required. Attribution model. + # @!attribute [rw] conversion_type + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] + # Immutable. Unordered list. List of different conversion types a conversion + # event can be classified as. A standard "purchase" type will be + # automatically created if this list is empty at creation time. + class AttributionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing the type of a conversion event. + # @!attribute [r] name + # @return [::String] + # Output only. Conversion event name, as it'll be reported by the client. + # @!attribute [r] report + # @return [::Boolean] + # Output only. Option indicating if the type should be included in Merchant + # Center reporting. + class ConversionType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribution model used for this source. We support the same set of + # [models offered by Google Analytics + # 4](https://support.google.com/analytics/answer/10596866). + module AttributionModel + # Unspecified model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0 + + # Cross-channel Last Click model. + CROSS_CHANNEL_LAST_CLICK = 1 + + # Ads-preferred Last Click model. + ADS_PREFERRED_LAST_CLICK = 2 + + # Cross-channel Data Driven model. + CROSS_CHANNEL_DATA_DRIVEN = 5 + + # Cross-channel First Click model. + CROSS_CHANNEL_FIRST_CLICK = 6 + + # Cross-channel Linear model. + CROSS_CHANNEL_LINEAR = 7 + + # Cross-channel Position Based model. + CROSS_CHANNEL_POSITION_BASED = 8 + + # Cross-channel Time Decay model. + CROSS_CHANNEL_TIME_DECAY = 9 + end + end + + # "Google Analytics Link" sources can be used to get conversion data from an + # existing Google Analytics property into the linked Merchant Center account. + # @!attribute [rw] property_id + # @return [::Integer] + # Required. Immutable. ID of the Google Analytics property the merchant is + # linked to. + # @!attribute [r] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Output only. Attribution settings for the linked Google Analytics property. + # @!attribute [r] property + # @return [::String] + # Output only. Name of the Google Analytics property the merchant is linked + # to. + class GoogleAnalyticsLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # "Merchant Center Destination" sources can be used to send conversion events + # from an online store using a Google tag directly to a Merchant Center account + # where the source is created. + # @!attribute [r] destination + # @return [::String] + # Output only. Merchant Center Destination ID. + # @!attribute [rw] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] + # Required. Attribution settings used for the Merchant Center Destination. + # @!attribute [rw] display_name + # @return [::String] + # Required. Merchant-specified display name for the destination. This is the + # name that identifies the conversion source within the Merchant Center UI. + # The maximum length is 64 characters. + # @!attribute [rw] currency_code + # @return [::String] + # Required. Three-letter currency code (ISO 4217). The currency code defines + # in which currency the conversions sent to this destination will be reported + # in Merchant Center. + class MerchantCenterDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateConversionSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that will own the new conversion source. + # Format: `accounts/{account}` + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + class CreateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateConversionSource method. + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] + # Required. The new version of the conversion source data. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. List of fields being updated. + class UpdateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be deleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class DeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UndeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be undeleted. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class UndeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be fetched. + # Format: `accounts/{account}/conversionSources/{conversion_source}` + class GetConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListConversionSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. Show deleted (archived) conversion sources. By default, deleted + # conversion sources are not returned. + class ListConversionSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListConversionSources method. + # @!attribute [rw] conversion_sources + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] + # List of conversion sources. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to be used to fetch the next results page. + class ListConversionSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile new file mode 100644 index 000000000000..f46fb0f94950 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1", path: "../" +else + gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb new file mode 100644 index 000000000000..827b4a926e65 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the create_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. +# +def create_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new + + # Call the create_conversion_source method. + result = client.create_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb new file mode 100644 index 000000000000..ba6b1ac8bfc2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the delete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. +# +def delete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new + + # Call the delete_conversion_source method. + result = client.delete_conversion_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb new file mode 100644 index 000000000000..d9f971d44b48 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the get_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. +# +def get_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new + + # Call the get_conversion_source method. + result = client.get_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb new file mode 100644 index 000000000000..658a5ab951e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the list_conversion_sources call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. +# +def list_conversion_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new + + # Call the list_conversion_sources method. + result = client.list_conversion_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p item + end +end +# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb new file mode 100644 index 000000000000..22afe1c1ac8b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the undelete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. +# +def undelete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new + + # Call the undelete_conversion_source method. + result = client.undelete_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb new file mode 100644 index 000000000000..67c6808b8b3c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] +require "google/shopping/merchant/conversions/v1" + +## +# Snippet for the update_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. +# +def update_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new + + # Call the update_conversion_source method. + result = client.update_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. + p result +end +# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json new file mode 100644 index 000000000000..141ac1a9a2fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-conversions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.conversions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", + "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", + "file": "conversion_sources_service/create_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "CreateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", + "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", + "file": "conversion_sources_service/update_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UpdateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", + "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", + "file": "conversion_sources_service/delete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "DeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", + "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", + "file": "conversion_sources_service/undelete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UndeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", + "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", + "file": "conversion_sources_service/get_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "GetConversionSource", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", + "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", + "file": "conversion_sources_service/list_conversion_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversion_sources", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" + }, + "method": { + "short_name": "ListConversionSources", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" + } + } + }, + "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-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb new file mode 100644 index 000000000000..58ab80ed3978 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_conversion_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversion_source_path account: "value0", conversion_source: "value1" + assert_equal "accounts/value0/conversionSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb new file mode 100644 index 000000000000..31c68180521e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" + + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_count + end + end + end + + def test_update_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_count + end + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversion_source_client_stub.call_count + end + end + end + + def test_undelete_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undelete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undelete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undelete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_count + end + end + end + + def test_get_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_count + end + end + end + + def test_list_conversion_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversion_sources_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb new file mode 100644 index 000000000000..407eedb71e02 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/conversions/v1/conversionsources_pb" +require "google/shopping/merchant/conversions/v1/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_rpc_count + end + end + + def test_update_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_rpc_count + end + end + + def test_delete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count + end + end + + def test_undelete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undelete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.undelete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count + end + end + + def test_get_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_rpc_count + end + end + + def test_list_conversion_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversion_sources, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_conversion_sources_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..20e6dffcf926 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta", + "distribution_name": "google-shopping-merchant-conversions-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml new file mode 100644 index 000000000000..6d5086c6f1ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant 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-shopping-merchant-conversions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..2159dc1507a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/conversions/v1beta" + +::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md new file mode 100644 index 000000000000..63ea9c08d6d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/conversions/v1beta" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new +request = ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new # (request fields as keyword arguments...) +response = client.create_conversion_source request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +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/shopping/merchant/conversions/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-conversions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. +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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile new file mode 100644 index 000000000000..df7ec62e5251 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-conversions-v1beta" + header "google-shopping-merchant-conversions-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-conversions-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..cb28c69efe62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.conversions.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1beta", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "create_conversion_source" + ] + }, + "UpdateConversionSource": { + "methods": [ + "update_conversion_source" + ] + }, + "DeleteConversionSource": { + "methods": [ + "delete_conversion_source" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undelete_conversion_source" + ] + }, + "GetConversionSource": { + "methods": [ + "get_conversion_source" + ] + }, + "ListConversionSources": { + "methods": [ + "list_conversion_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec new file mode 100644 index 000000000000..7e23ef15bbad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/conversions/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-conversions-v1beta" + gem.version = Google::Shopping::Merchant::Conversions::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center 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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb new file mode 100644 index 000000000000..8aae5f49f6d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb new file mode 100644 index 000000000000..efa027bc825f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" +require "google/shopping/merchant/conversions/v1beta/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1beta" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1beta" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/conversions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb new file mode 100644 index 000000000000..ec937b0d20dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/client" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ## + # Service for managing conversion sources for a merchant account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb new file mode 100644 index 000000000000..5b66e173552d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb @@ -0,0 +1,975 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + ## + # Client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Conversions", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1beta/conversionsources_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 + + @conversion_sources_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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.conversion_source&.name + header_params["conversion_source.name"] = request.conversion_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) option. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService API. + # + # This class represents the configuration for ConversionSourcesService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb new file mode 100644 index 000000000000..fc78775e84b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Credentials for the ConversionSourcesService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb new file mode 100644 index 000000000000..0957b8b6c5be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Path helper methods for the ConversionSourcesService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ConversionSource resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/conversionSources/{conversion_source}` + # + # @param account [String] + # @param conversion_source [String] + # + # @return [::String] + def conversion_source_path account:, conversion_source: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/conversionSources/#{conversion_source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb new file mode 100644 index 000000000000..050042f123cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ## + # Service for managing conversion sources for a merchant account. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module ConversionSourcesService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb new file mode 100644 index 000000000000..36efb49acdb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb @@ -0,0 +1,890 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + module Rest + ## + # REST client for the ConversionSourcesService service. + # + # Service for managing conversion sources for a merchant account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_sources_service_stub + + ## + # Configure the ConversionSourcesService Client class. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionSourcesService clients + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionSourcesService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 + @conversion_sources_service_stub.universe_domain + end + + ## + # Create a new ConversionSourcesService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionSourcesService 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 + + @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @conversion_sources_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 + @conversion_sources_service_stub.logger + end + + # Service calls + + ## + # Creates a new conversion source. + # + # @overload create_conversion_source(request, options = nil) + # Pass arguments to `create_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_conversion_source(parent: nil, conversion_source: nil) + # Pass arguments to `create_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + # + # # Call the create_conversion_source method. + # result = client.create_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def create_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest + + # Converts hash and nil to an 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_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + # + # @overload update_conversion_source(request, options = nil) + # Pass arguments to `update_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_conversion_source(conversion_source: nil, update_mask: nil) + # Pass arguments to `update_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + # + # # Call the update_conversion_source method. + # result = client.update_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def update_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + # + # @overload delete_conversion_source(request, options = nil) + # Pass arguments to `delete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_conversion_source(name: nil) + # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + # + # # Call the delete_conversion_source method. + # result = client.delete_conversion_source request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + # + # @overload undelete_conversion_source(request, options = nil) + # Pass arguments to `undelete_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_conversion_source(name: nil) + # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + # + # # Call the undelete_conversion_source method. + # result = client.undelete_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def undelete_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a conversion source. + # + # @overload get_conversion_source(request, options = nil) + # Pass arguments to `get_conversion_source` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_conversion_source(name: nil) + # Pass arguments to `get_conversion_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + # + # # Call the get_conversion_source method. + # result = client.get_conversion_source request + # + # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p result + # + def get_conversion_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_conversion_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversion_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of conversion sources the caller has access to. + # + # @overload list_conversion_sources(request, options = nil) + # Pass arguments to `list_conversion_sources` via a request object, either of type + # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) + # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @param page_token [::String] + # Optional. Page token. + # @param show_deleted [::Boolean] + # Optional. Show deleted (archived) option. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/conversions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + # + # # Call the list_conversion_sources method. + # result = client.list_conversion_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + # p item + # end + # + def list_conversion_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversion_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConversionSourcesService REST API. + # + # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversion_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::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 ConversionSourcesService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversion_source + ## + # RPC-specific configuration for `update_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversion_source + ## + # RPC-specific configuration for `delete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversion_source + ## + # RPC-specific configuration for `undelete_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_conversion_source + ## + # RPC-specific configuration for `get_conversion_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversion_source + ## + # RPC-specific configuration for `list_conversion_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversion_sources + + # @private + def initialize parent_rpcs = nil + create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source + @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config + update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source + @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config + delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source + @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config + undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source + @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config + get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source + @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config + list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources + @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb new file mode 100644 index 000000000000..fe73baae518b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + module Rest + ## + # REST service stub for the ConversionSourcesService 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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def create_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def update_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def undelete_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # A result object deserialized from the server's reply + def get_conversion_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_conversion_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] + # A result object deserialized from the server's reply + def list_conversion_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_conversion_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.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_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] + # 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_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1beta/{parent}/conversionSources", + body: "conversion_source", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/conversions/v1beta/{conversion_source.name}", + body: "conversion_source", + matches: [ + ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/conversions/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/conversions/v1beta/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversion_source REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_conversion_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversion_sources REST call + # + # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_conversion_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/conversions/v1beta/{parent}/conversionSources", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb new file mode 100644 index 000000000000..e7ee072fd173 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/conversions/v1beta/conversionsources.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/conversions/v1beta/conversionsources.proto\x12+google.shopping.merchant.conversions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x06\n\x10\x43onversionSource\x12\x66\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12m\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x46.google.shopping.merchant.conversions.v1beta.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12W\n\x05state\x18\x05 \x01(\x0e\x32\x43.google.shopping.merchant.conversions.v1beta.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x61\n\ncontroller\x18\x07 \x01(\x0e\x32H.google.shopping.merchant.conversions.v1beta.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xef\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12q\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32Q.google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12p\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xae\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12]\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\"\xb4\x01\n\x1dUpdateConversionSourceRequest\x12]\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x93\x01\n\x1dListConversionSourcesResponse\x12Y\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd2\x0c\n\x18\x43onversionSourcesService\x12\x94\x02\n\x16\x43reateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"o\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02N\"9/conversions/v1beta/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xac\x02\n\x16UpdateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"\x86\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02`2K/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xc6\x01\n\x16\x44\x65leteConversionSource\x12J.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xf6\x01\n\x18UndeleteConversionSource\x12L.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"M\x82\xd3\xe4\x93\x02G\"B/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xe7\x01\n\x13GetConversionSource\x12G.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xfa\x01\n\x15ListConversionSources\x12I.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest\x1aJ.google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdf\x01\n/com.google.shopping.merchant.conversions.v1betaB\x16\x43onversionSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb;conversionspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource").msgclass + ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.State").enummodule + ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.Controller").enummodule + AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings").msgclass + AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType").msgclass + AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel").enummodule + GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink").msgclass + MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.MerchantCenterDestination").msgclass + CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest").msgclass + UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest").msgclass + DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest").msgclass + UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest").msgclass + GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest").msgclass + ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest").msgclass + ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb new file mode 100644 index 000000000000..f25fc3f2e077 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.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/shopping/merchant/conversions/v1beta/conversionsources_pb' + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + module ConversionSourcesService + # Service for managing conversion sources for a merchant account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' + + # Creates a new conversion source. + rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Updates information of an existing conversion source. Available only for + # Merchant Center Destination conversion sources. + rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Archives an existing conversion source. If the conversion source is a + # Merchant Center Destination, it will be recoverable for 30 days. If the + # conversion source is a Google Analytics Link, it will be deleted + # immediately and can be restored by creating a new one. + rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Google::Protobuf::Empty + # Re-enables an archived conversion source. Only Available for Merchant + # Center Destination conversion sources. + rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Fetches a conversion source. + rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource + # Retrieves the list of conversion sources the caller has access to. + rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb new file mode 100644 index 000000000000..9238cbdb5b76 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" +require "google/shopping/merchant/conversions/v1beta/version" + +module Google + module Shopping + module Merchant + module Conversions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/conversions/v1beta/rest" + # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb new file mode 100644 index 000000000000..6860c89e382f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant 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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb new file mode 100644 index 000000000000..f44123837180 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb @@ -0,0 +1,290 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Conversions + module V1beta + # Represents a conversion source owned by a Merchant account. A merchant + # account can have up to 200 conversion sources. + # @!attribute [rw] google_analytics_link + # @return [::Google::Shopping::Merchant::Conversions::V1beta::GoogleAnalyticsLink] + # Immutable. Conversion Source of type "Link to Google Analytics Property". + # + # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merchant_center_destination + # @return [::Google::Shopping::Merchant::Conversions::V1beta::MerchantCenterDestination] + # Conversion Source of type "Merchant Center Tag Destination". + # + # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Generated by the Content API upon creation of a + # new `ConversionSource`. Format: [a-z]\\{4}:.+ The four characters before the + # colon represent the type of conversio source. Content after the colon + # represents the ID of the conversion source within that type. The ID of two + # different conversion sources might be the same across different types. The + # following type prefixes are supported: + # - galk: For GoogleAnalyticsLink sources. + # - mcdn: For MerchantCenterDestination sources. + # @!attribute [r] state + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::State] + # Output only. Current state of this conversion source. Can't be edited + # through the API. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when an archived conversion source becomes + # permanently deleted and is no longer available to undelete. + # @!attribute [r] controller + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::Controller] + # Output only. Controller of the conversion source. + class ConversionSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents state of the conversion source. + module State + # Conversion source has unspecified state. + STATE_UNSPECIFIED = 0 + + # Conversion source is fully functional. + ACTIVE = 1 + + # Conversion source has been archived in the last 30 days and not + # currently functional. Can be restored using the undelete method. + ARCHIVED = 2 + + # Conversion source creation has started but not fully finished yet. + PENDING = 3 + end + + # Entity controlling the conversion source. + module Controller + # Default value. This value is unused. + CONTROLLER_UNSPECIFIED = 0 + + # Controlled by the Merchant who owns the Conversion Source. + MERCHANT = 1 + + # Controlled by the YT Affiliates program. + YOUTUBE_AFFILIATES = 2 + end + end + + # Represents attribution settings for conversion sources receiving + # pre-attribution data. + # @!attribute [rw] attribution_lookback_window_days + # @return [::Integer] + # Required. Lookback windows (in days) used for attribution in this source. + # Supported values are 7, 30, 40. + # @!attribute [rw] attribution_model + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::AttributionModel] + # Required. Attribution model. + # @!attribute [rw] conversion_type + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::ConversionType>] + # Immutable. Unordered list. List of different conversion types a conversion + # event can be classified as. A standard "purchase" type will be + # automatically created if this list is empty at creation time. + class AttributionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing a types of conversion events + # @!attribute [r] name + # @return [::String] + # Output only. Conversion event name, as it'll be reported by the client. + # @!attribute [r] report + # @return [::Boolean] + # Output only. Option indicating if the type should be included in Merchant + # Center reporting. + class ConversionType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribution model used for this source. We support the same set of + # models offered by Google Analytics 4, as described in: + # https://support.google.com/analytics/answer/10596866. + module AttributionModel + # Unspecified model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0 + + # Cross-channel Last Click model. + CROSS_CHANNEL_LAST_CLICK = 1 + + # Ads-preferred Last Click model. + ADS_PREFERRED_LAST_CLICK = 2 + + # Cross-channel Data Driven model. + CROSS_CHANNEL_DATA_DRIVEN = 5 + + # Cross-channel First Click model. + CROSS_CHANNEL_FIRST_CLICK = 6 + + # Cross-channel Linear model. + CROSS_CHANNEL_LINEAR = 7 + + # Cross-channel Position Based model. + CROSS_CHANNEL_POSITION_BASED = 8 + + # Cross-channel Time Decay model. + CROSS_CHANNEL_TIME_DECAY = 9 + end + end + + # "Google Analytics Link" sources can be used to get conversion data from an + # existing Google Analytics property into the linked Merchant Center account. + # @!attribute [rw] property_id + # @return [::Integer] + # Required. Immutable. ID of the Google Analytics property the merchant is + # linked to. + # @!attribute [r] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] + # Output only. Attribution settings for the linked Google Analytics property. + # @!attribute [r] property + # @return [::String] + # Output only. Name of the Google Analytics property the merchant is linked + # to. + class GoogleAnalyticsLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # "Merchant Center Destination" sources can be used to send conversion events + # from an online store using a Google tag directly to a Merchant Center account + # where the source is created. + # @!attribute [r] destination + # @return [::String] + # Output only. Merchant Center Destination ID. + # @!attribute [rw] attribution_settings + # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] + # Required. Attribution settings being used for the Merchant Center + # Destination. + # @!attribute [rw] display_name + # @return [::String] + # Required. Merchant-specified display name for the destination. This is the + # name that identifies the conversion source within the Merchant Center UI. + # Limited to 64 characters. + # @!attribute [rw] currency_code + # @return [::String] + # Required. Three-letter currency code (ISO 4217). The currency code defines + # in which currency the conversions sent to this destination will be reported + # in Merchant Center. + class MerchantCenterDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateConversionSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that will own the new conversion source. + # Format: accounts/\\{account} + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # Required. The conversion source description. A new ID will be automatically + # assigned to it upon creation. + class CreateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateConversionSource method. + # @!attribute [rw] conversion_source + # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] + # Required. The new version of the conversion source data. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields being updated. + class UpdateConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be deleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + class DeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UndeleteConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be undeleted. + # Format: accounts/\\{account}/conversionSources/\\{conversion_source} + class UndeleteConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetConversionSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversion source to be fetched. + # Format: accounts/\\{account}/conversionsources/\\{conversion_source} + class GetConversionSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListConversionSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of conversion + # sources. Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of conversion sources to return in a page. + # If no `page_size` is specified, `100` is used as the default value. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # Regardless of pagination, at most `200` conversion sources are returned + # in total. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. Show deleted (archived) option. + class ListConversionSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListConversionSources method. + # @!attribute [rw] conversion_sources + # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] + # List of conversion sources. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to be used to fetch the next results page. + class ListConversionSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..6a2aef3b6555 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta", path: "../" +else + gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb new file mode 100644 index 000000000000..8081af021563 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the create_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source. +# +def create_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new + + # Call the create_conversion_source method. + result = client.create_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb new file mode 100644 index 000000000000..67d343214d62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the delete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source. +# +def delete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new + + # Call the delete_conversion_source method. + result = client.delete_conversion_source request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb new file mode 100644 index 000000000000..6c928140a9a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the get_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source. +# +def get_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new + + # Call the get_conversion_source method. + result = client.get_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb new file mode 100644 index 000000000000..45183543d605 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the list_conversion_sources call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources. +# +def list_conversion_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new + + # Call the list_conversion_sources method. + result = client.list_conversion_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p item + end +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb new file mode 100644 index 000000000000..88a2acac8a2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the undelete_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source. +# +def undelete_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new + + # Call the undelete_conversion_source method. + result = client.undelete_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb new file mode 100644 index 000000000000..e65690f44b15 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] +require "google/shopping/merchant/conversions/v1beta" + +## +# Snippet for the update_conversion_source call in the ConversionSourcesService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source. +# +def update_conversion_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new + + # Call the update_conversion_source method. + result = client.update_conversion_source request + + # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. + p result +end +# [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json new file mode 100644 index 000000000000..6649119ca2d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-conversions-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.conversions.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync", + "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source.", + "file": "conversion_sources_service/create_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "CreateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.CreateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync", + "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source.", + "file": "conversion_sources_service/update_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UpdateConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UpdateConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync", + "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source.", + "file": "conversion_sources_service/delete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "DeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.DeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync", + "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source.", + "file": "conversion_sources_service/undelete_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "UndeleteConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UndeleteConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync", + "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source.", + "file": "conversion_sources_service/get_conversion_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversion_source", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "GetConversionSource", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.GetConversionSource", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync", + "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources.", + "file": "conversion_sources_service/list_conversion_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversion_sources", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse", + "client": { + "short_name": "ConversionSourcesService::Client", + "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" + }, + "method": { + "short_name": "ListConversionSources", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.ListConversionSources", + "service": { + "short_name": "ConversionSourcesService", + "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" + } + } + }, + "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-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb new file mode 100644 index 000000000000..ac9354d66391 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_conversion_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversion_source_path account: "value0", conversion_source: "value1" + assert_equal "accounts/value0/conversionSources/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb new file mode 100644 index 000000000000..dce67f4f09e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb @@ -0,0 +1,428 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" + + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_count + end + end + end + + def test_update_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_count + end + end + end + + def test_delete_conversion_source + # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversion_source_client_stub.call_count + end + end + end + + def test_undelete_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undelete_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undelete_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undelete_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_count + end + end + end + + def test_get_conversion_source + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_conversion_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_conversion_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_conversion_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_count + end + end + end + + def test_list_conversion_sources + # Create test objects. + client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversion_sources_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb new file mode 100644 index 000000000000..67b1bc0f16d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb @@ -0,0 +1,467 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" +require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" + +class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversion_source = {} + + create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversion_source_client_stub.call_rpc_count + end + end + + def test_update_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + conversion_source = {} + update_mask = {} + + update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_conversion_source_client_stub.call_rpc_count + end + end + + def test_delete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count + end + end + + def test_undelete_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undelete_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.undelete_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count + end + end + + def test_get_conversion_source + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversion_source, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_conversion_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_conversion_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_conversion_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_conversion_source_client_stub.call_rpc_count + end + end + + def test_list_conversion_sources + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_deleted = true + + list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversion_sources, name + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_conversion_sources_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 122a105f2adcd05a0d2ce72a4c64c5e44e1815d3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:10:37 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-web_security_scanner-v1beta.rb | 2 +- .../cloud/web_security_scanner/v1beta.rb | 2 +- .../cloud/web_security_scanner/v1beta/rest.rb | 2 +- .../v1beta/web_security_scanner.rb | 2 +- .../v1beta/web_security_scanner/client.rb | 2 +- .../web_security_scanner/credentials.rb | 2 +- .../v1beta/web_security_scanner/paths.rb | 2 +- .../v1beta/web_security_scanner/rest.rb | 2 +- .../web_security_scanner/rest/client.rb | 2 +- .../web_security_scanner/rest/service_stub.rb | 2 +- .../web_security_scanner_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../websecurityscanner/v1beta/crawled_url.rb | 2 +- .../websecurityscanner/v1beta/finding.rb | 2 +- .../v1beta/finding_addon.rb | 2 +- .../v1beta/finding_type_stats.rb | 2 +- .../websecurityscanner/v1beta/scan_config.rb | 2 +- .../v1beta/scan_config_error.rb | 2 +- .../websecurityscanner/v1beta/scan_run.rb | 2 +- .../v1beta/scan_run_error_trace.rb | 2 +- .../v1beta/scan_run_warning_trace.rb | 2 +- .../v1beta/web_security_scanner.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../create_scan_config.rb | 2 +- .../delete_scan_config.rb | 2 +- .../web_security_scanner/get_finding.rb | 2 +- .../web_security_scanner/get_scan_config.rb | 2 +- .../web_security_scanner/get_scan_run.rb | 2 +- .../web_security_scanner/list_crawled_urls.rb | 2 +- .../list_finding_type_stats.rb | 2 +- .../web_security_scanner/list_findings.rb | 2 +- .../web_security_scanner/list_scan_configs.rb | 2 +- .../web_security_scanner/list_scan_runs.rb | 2 +- .../web_security_scanner/start_scan_run.rb | 2 +- .../web_security_scanner/stop_scan_run.rb | 2 +- .../update_scan_config.rb | 2 +- .../v1beta/web_security_scanner_paths_test.rb | 2 +- .../v1beta/web_security_scanner_rest_test.rb | 2 +- .../v1beta/web_security_scanner_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-executions-v1/.toys.rb | 2 +- google-cloud-workflows-executions-v1/Rakefile | 2 +- .../google-cloud-workflows-executions-v1.rb | 2 +- .../google/cloud/workflows/executions/v1.rb | 2 +- .../workflows/executions/v1/executions.rb | 2 +- .../executions/v1/executions/client.rb | 2 +- .../executions/v1/executions/credentials.rb | 2 +- .../executions/v1/executions/paths.rb | 2 +- .../executions/v1/executions/rest.rb | 2 +- .../executions/v1/executions/rest/client.rb | 2 +- .../v1/executions/rest/service_stub.rb | 2 +- .../executions/v1/executions_services_pb.rb | 2 +- .../cloud/workflows/executions/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../workflows/executions/v1/executions.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../snippets/executions/cancel_execution.rb | 2 +- .../snippets/executions/create_execution.rb | 2 +- .../snippets/executions/get_execution.rb | 2 +- .../snippets/executions/list_executions.rb | 2 +- .../executions/v1/executions_paths_test.rb | 2 +- .../executions/v1/executions_rest_test.rb | 2 +- .../executions/v1/executions_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-workflows-executions-v1beta.rb | 2 +- .../cloud/workflows/executions/v1beta.rb | 2 +- .../workflows/executions/v1beta/executions.rb | 2 +- .../executions/v1beta/executions/client.rb | 2 +- .../v1beta/executions/credentials.rb | 2 +- .../executions/v1beta/executions/paths.rb | 2 +- .../v1beta/executions_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../workflows/executions/v1beta/executions.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../snippets/executions/cancel_execution.rb | 2 +- .../snippets/executions/create_execution.rb | 2 +- .../snippets/executions/get_execution.rb | 2 +- .../snippets/executions/list_executions.rb | 2 +- .../v1beta/executions_paths_test.rb | 2 +- .../executions/v1beta/executions_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-v1/.toys.rb | 2 +- google-cloud-workflows-v1/Rakefile | 2 +- .../lib/google-cloud-workflows-v1.rb | 2 +- .../lib/google/cloud/workflows/v1.rb | 2 +- .../cloud/workflows/v1/bindings_override.rb | 2 +- .../lib/google/cloud/workflows/v1/rest.rb | 2 +- .../google/cloud/workflows/v1/workflows.rb | 2 +- .../cloud/workflows/v1/workflows/client.rb | 2 +- .../workflows/v1/workflows/credentials.rb | 2 +- .../workflows/v1/workflows/operations.rb | 2 +- .../cloud/workflows/v1/workflows/paths.rb | 2 +- .../cloud/workflows/v1/workflows/rest.rb | 2 +- .../workflows/v1/workflows/rest/client.rb | 2 +- .../workflows/v1/workflows/rest/operations.rb | 2 +- .../v1/workflows/rest/service_stub.rb | 2 +- .../workflows/v1/workflows_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/workflows/v1/workflows.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- google-cloud-workflows-v1/snippets/Gemfile | 2 +- .../snippets/workflows/create_workflow.rb | 2 +- .../snippets/workflows/delete_workflow.rb | 2 +- .../snippets/workflows/get_workflow.rb | 2 +- .../workflows/list_workflow_revisions.rb | 2 +- .../snippets/workflows/list_workflows.rb | 2 +- .../snippets/workflows/update_workflow.rb | 2 +- .../workflows/v1/workflows_operations_test.rb | 2 +- .../workflows/v1/workflows_paths_test.rb | 2 +- .../cloud/workflows/v1/workflows_rest_test.rb | 2 +- .../cloud/workflows/v1/workflows_test.rb | 2 +- google-cloud-workflows-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-v1beta/.toys.rb | 2 +- google-cloud-workflows-v1beta/Rakefile | 2 +- .../lib/google-cloud-workflows-v1beta.rb | 2 +- .../lib/google/cloud/workflows/v1beta.rb | 2 +- .../workflows/v1beta/bindings_override.rb | 2 +- .../lib/google/cloud/workflows/v1beta/rest.rb | 2 +- .../cloud/workflows/v1beta/workflows.rb | 2 +- .../workflows/v1beta/workflows/client.rb | 2 +- .../workflows/v1beta/workflows/credentials.rb | 2 +- .../workflows/v1beta/workflows/operations.rb | 2 +- .../cloud/workflows/v1beta/workflows/paths.rb | 2 +- .../cloud/workflows/v1beta/workflows/rest.rb | 2 +- .../workflows/v1beta/workflows/rest/client.rb | 2 +- .../v1beta/workflows/rest/operations.rb | 2 +- .../v1beta/workflows/rest/service_stub.rb | 2 +- .../workflows/v1beta/workflows_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workflows/v1beta/workflows.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../snippets/workflows/create_workflow.rb | 2 +- .../snippets/workflows/delete_workflow.rb | 2 +- .../snippets/workflows/get_workflow.rb | 2 +- .../snippets/workflows/list_workflows.rb | 2 +- .../snippets/workflows/update_workflow.rb | 2 +- .../v1beta/workflows_operations_test.rb | 2 +- .../workflows/v1beta/workflows_paths_test.rb | 2 +- .../workflows/v1beta/workflows_rest_test.rb | 2 +- .../cloud/workflows/v1beta/workflows_test.rb | 2 +- google-cloud-workflows-v1beta/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- .../.owlbot-manifest.json | 3 +- google-cloud-workstations-v1/.toys.rb | 2 +- google-cloud-workstations-v1/Rakefile | 2 +- .../lib/google-cloud-workstations-v1.rb | 2 +- .../lib/google/cloud/workstations/v1.rb | 2 +- .../workstations/v1/bindings_override.rb | 2 +- .../lib/google/cloud/workstations/v1/rest.rb | 2 +- .../cloud/workstations/v1/workstations.rb | 2 +- .../workstations/v1/workstations/client.rb | 2 +- .../v1/workstations/credentials.rb | 2 +- .../v1/workstations/operations.rb | 2 +- .../workstations/v1/workstations/paths.rb | 2 +- .../workstations/v1/workstations/rest.rb | 2 +- .../v1/workstations/rest/client.rb | 2 +- .../v1/workstations/rest/operations.rb | 2 +- .../v1/workstations/rest/service_stub.rb | 2 +- .../v1/workstations_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workstations/v1/workstations.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- google-cloud-workstations-v1/snippets/Gemfile | 2 +- .../workstations/create_workstation.rb | 2 +- .../create_workstation_cluster.rb | 2 +- .../workstations/create_workstation_config.rb | 2 +- .../workstations/delete_workstation.rb | 2 +- .../delete_workstation_cluster.rb | 2 +- .../workstations/delete_workstation_config.rb | 2 +- .../workstations/generate_access_token.rb | 2 +- .../snippets/workstations/get_workstation.rb | 2 +- .../workstations/get_workstation_cluster.rb | 2 +- .../workstations/get_workstation_config.rb | 2 +- .../list_usable_workstation_configs.rb | 2 +- .../workstations/list_usable_workstations.rb | 2 +- .../workstations/list_workstation_clusters.rb | 2 +- .../workstations/list_workstation_configs.rb | 2 +- .../workstations/list_workstations.rb | 2 +- .../workstations/start_workstation.rb | 2 +- .../snippets/workstations/stop_workstation.rb | 2 +- .../workstations/update_workstation.rb | 2 +- .../update_workstation_cluster.rb | 2 +- .../workstations/update_workstation_config.rb | 2 +- .../v1/workstations_operations_test.rb | 2 +- .../v1/workstations_paths_test.rb | 2 +- .../workstations/v1/workstations_rest_test.rb | 2 +- .../workstations/v1/workstations_test.rb | 2 +- google-cloud-workstations-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workstations-v1beta/.toys.rb | 2 +- google-cloud-workstations-v1beta/Rakefile | 2 +- .../lib/google-cloud-workstations-v1beta.rb | 2 +- .../lib/google/cloud/workstations/v1beta.rb | 2 +- .../workstations/v1beta/bindings_override.rb | 2 +- .../google/cloud/workstations/v1beta/rest.rb | 2 +- .../cloud/workstations/v1beta/workstations.rb | 2 +- .../v1beta/workstations/client.rb | 2 +- .../v1beta/workstations/credentials.rb | 2 +- .../v1beta/workstations/operations.rb | 2 +- .../workstations/v1beta/workstations/paths.rb | 2 +- .../workstations/v1beta/workstations/rest.rb | 2 +- .../v1beta/workstations/rest/client.rb | 2 +- .../v1beta/workstations/rest/operations.rb | 2 +- .../v1beta/workstations/rest/service_stub.rb | 2 +- .../v1beta/workstations_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workstations/v1beta/workstations.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../workstations/create_workstation.rb | 2 +- .../create_workstation_cluster.rb | 2 +- .../workstations/create_workstation_config.rb | 2 +- .../workstations/delete_workstation.rb | 2 +- .../delete_workstation_cluster.rb | 2 +- .../workstations/delete_workstation_config.rb | 2 +- .../workstations/generate_access_token.rb | 2 +- .../snippets/workstations/get_workstation.rb | 2 +- .../workstations/get_workstation_cluster.rb | 2 +- .../workstations/get_workstation_config.rb | 2 +- .../list_usable_workstation_configs.rb | 2 +- .../workstations/list_usable_workstations.rb | 2 +- .../workstations/list_workstation_clusters.rb | 2 +- .../workstations/list_workstation_configs.rb | 2 +- .../workstations/list_workstations.rb | 2 +- .../workstations/start_workstation.rb | 2 +- .../snippets/workstations/stop_workstation.rb | 2 +- .../workstations/update_workstation.rb | 2 +- .../update_workstation_cluster.rb | 2 +- .../workstations/update_workstation_config.rb | 2 +- .../v1beta/workstations_operations_test.rb | 2 +- .../v1beta/workstations_paths_test.rb | 2 +- .../v1beta/workstations_rest_test.rb | 2 +- .../workstations/v1beta/workstations_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- .../.owlbot-manifest.json | 3 +- google-iam-credentials-v1/.toys.rb | 2 +- google-iam-credentials-v1/Rakefile | 2 +- .../lib/google-iam-credentials-v1.rb | 2 +- .../lib/google/iam/credentials/v1.rb | 2 +- .../iam/credentials/v1/iam_credentials.rb | 2 +- .../credentials/v1/iam_credentials/client.rb | 2 +- .../v1/iam_credentials/credentials.rb | 2 +- .../credentials/v1/iam_credentials/paths.rb | 2 +- .../credentials/v1/iam_credentials/rest.rb | 2 +- .../v1/iam_credentials/rest/client.rb | 2 +- .../v1/iam_credentials/rest/service_stub.rb | 2 +- .../v1/iamcredentials_services_pb.rb | 2 +- .../lib/google/iam/credentials/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/credentials/v1/common.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-credentials-v1/snippets/Gemfile | 2 +- .../iam_credentials/generate_access_token.rb | 2 +- .../iam_credentials/generate_id_token.rb | 2 +- .../snippets/iam_credentials/sign_blob.rb | 2 +- .../snippets/iam_credentials/sign_jwt.rb | 2 +- .../v1/iam_credentials_paths_test.rb | 2 +- .../v1/iam_credentials_rest_test.rb | 2 +- .../credentials/v1/iam_credentials_test.rb | 2 +- google-iam-credentials-v1/test/helper.rb | 2 +- google-iam-v2/.owlbot-manifest.json | 3 +- google-iam-v2/.toys.rb | 2 +- google-iam-v2/Rakefile | 2 +- google-iam-v2/lib/google-iam-v2.rb | 2 +- google-iam-v2/lib/google/iam/v2.rb | 2 +- google-iam-v2/lib/google/iam/v2/policies.rb | 2 +- .../lib/google/iam/v2/policies/client.rb | 2 +- .../lib/google/iam/v2/policies/credentials.rb | 2 +- .../lib/google/iam/v2/policies/operations.rb | 2 +- .../lib/google/iam/v2/policies/rest.rb | 2 +- .../lib/google/iam/v2/policies/rest/client.rb | 2 +- .../google/iam/v2/policies/rest/operations.rb | 2 +- .../iam/v2/policies/rest/service_stub.rb | 2 +- .../lib/google/iam/v2/policy_services_pb.rb | 2 +- google-iam-v2/lib/google/iam/v2/rest.rb | 2 +- google-iam-v2/proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v2/deny.rb | 2 +- .../proto_docs/google/iam/v2/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-v2/proto_docs/google/rpc/status.rb | 2 +- google-iam-v2/proto_docs/google/type/expr.rb | 2 +- google-iam-v2/snippets/Gemfile | 2 +- .../snippets/policies/create_policy.rb | 2 +- .../snippets/policies/delete_policy.rb | 2 +- google-iam-v2/snippets/policies/get_policy.rb | 2 +- .../snippets/policies/list_policies.rb | 2 +- .../snippets/policies/update_policy.rb | 2 +- .../google/iam/v2/policies_operations_test.rb | 2 +- .../test/google/iam/v2/policies_rest_test.rb | 2 +- .../test/google/iam/v2/policies_test.rb | 2 +- google-iam-v2/test/helper.rb | 2 +- google-iam-v3/.owlbot-manifest.json | 3 +- google-iam-v3/.toys.rb | 2 +- google-iam-v3/Rakefile | 2 +- google-iam-v3/lib/google-iam-v3.rb | 2 +- google-iam-v3/lib/google/iam/v3.rb | 2 +- .../lib/google/iam/v3/policy_bindings.rb | 2 +- .../google/iam/v3/policy_bindings/client.rb | 2 +- .../iam/v3/policy_bindings/credentials.rb | 2 +- .../iam/v3/policy_bindings/operations.rb | 2 +- .../google/iam/v3/policy_bindings/paths.rb | 2 +- .../lib/google/iam/v3/policy_bindings/rest.rb | 2 +- .../iam/v3/policy_bindings/rest/client.rb | 2 +- .../iam/v3/policy_bindings/rest/operations.rb | 2 +- .../v3/policy_bindings/rest/service_stub.rb | 2 +- .../v3/policy_bindings_service_services_pb.rb | 2 +- .../v3/principal_access_boundary_policies.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- ...s_boundary_policies_service_services_pb.rb | 2 +- google-iam-v3/lib/google/iam/v3/rest.rb | 2 +- google-iam-v3/proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/v3/operation_metadata.rb | 2 +- .../google/iam/v3/policy_binding_resources.rb | 2 +- .../google/iam/v3/policy_bindings_service.rb | 2 +- ...ncipal_access_boundary_policies_service.rb | 2 +- ...ncipal_access_boundary_policy_resources.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-v3/proto_docs/google/rpc/status.rb | 2 +- google-iam-v3/proto_docs/google/type/expr.rb | 2 +- google-iam-v3/snippets/Gemfile | 2 +- .../policy_bindings/create_policy_binding.rb | 2 +- .../policy_bindings/delete_policy_binding.rb | 2 +- .../policy_bindings/get_policy_binding.rb | 2 +- .../policy_bindings/list_policy_bindings.rb | 2 +- .../search_target_policy_bindings.rb | 2 +- .../policy_bindings/update_policy_binding.rb | 2 +- ...create_principal_access_boundary_policy.rb | 2 +- ...delete_principal_access_boundary_policy.rb | 2 +- .../get_principal_access_boundary_policy.rb | 2 +- ...list_principal_access_boundary_policies.rb | 2 +- ...incipal_access_boundary_policy_bindings.rb | 2 +- ...update_principal_access_boundary_policy.rb | 2 +- .../snippet_metadata_google.iam.v3.json | 2 +- .../iam/v3/policy_bindings_operations_test.rb | 2 +- .../iam/v3/policy_bindings_paths_test.rb | 2 +- .../iam/v3/policy_bindings_rest_test.rb | 2 +- .../google/iam/v3/policy_bindings_test.rb | 2 +- ...ccess_boundary_policies_operations_test.rb | 2 +- ...pal_access_boundary_policies_paths_test.rb | 2 +- ...ipal_access_boundary_policies_rest_test.rb | 2 +- ...principal_access_boundary_policies_test.rb | 2 +- google-iam-v3/test/helper.rb | 2 +- google-iam-v3beta/.owlbot-manifest.json | 3 +- google-iam-v3beta/.toys.rb | 2 +- google-iam-v3beta/Rakefile | 2 +- google-iam-v3beta/lib/google/iam/v3beta.rb | 2 +- .../lib/google/iam/v3beta/policy_bindings.rb | 2 +- .../iam/v3beta/policy_bindings/client.rb | 2 +- .../iam/v3beta/policy_bindings/credentials.rb | 2 +- .../iam/v3beta/policy_bindings/operations.rb | 2 +- .../iam/v3beta/policy_bindings/paths.rb | 2 +- .../google/iam/v3beta/policy_bindings/rest.rb | 2 +- .../iam/v3beta/policy_bindings/rest/client.rb | 2 +- .../v3beta/policy_bindings/rest/operations.rb | 2 +- .../policy_bindings/rest/service_stub.rb | 2 +- .../policy_bindings_service_services_pb.rb | 2 +- .../principal_access_boundary_policies.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- ...s_boundary_policies_service_services_pb.rb | 2 +- .../lib/google/iam/v3beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/v3beta/operation_metadata.rb | 2 +- .../iam/v3beta/policy_binding_resources.rb | 2 +- .../iam/v3beta/policy_bindings_service.rb | 2 +- ...ncipal_access_boundary_policies_service.rb | 2 +- ...ncipal_access_boundary_policy_resources.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- google-iam-v3beta/snippets/Gemfile | 2 +- .../policy_bindings/create_policy_binding.rb | 2 +- .../policy_bindings/delete_policy_binding.rb | 2 +- .../policy_bindings/get_policy_binding.rb | 2 +- .../policy_bindings/list_policy_bindings.rb | 2 +- .../search_target_policy_bindings.rb | 2 +- .../policy_bindings/update_policy_binding.rb | 2 +- ...create_principal_access_boundary_policy.rb | 2 +- ...delete_principal_access_boundary_policy.rb | 2 +- .../get_principal_access_boundary_policy.rb | 2 +- ...list_principal_access_boundary_policies.rb | 2 +- ...incipal_access_boundary_policy_bindings.rb | 2 +- ...update_principal_access_boundary_policy.rb | 2 +- .../v3beta/policy_bindings_operations_test.rb | 2 +- .../iam/v3beta/policy_bindings_paths_test.rb | 2 +- .../iam/v3beta/policy_bindings_rest_test.rb | 2 +- .../google/iam/v3beta/policy_bindings_test.rb | 2 +- ...ccess_boundary_policies_operations_test.rb | 2 +- ...pal_access_boundary_policies_paths_test.rb | 2 +- ...ipal_access_boundary_policies_rest_test.rb | 2 +- ...principal_access_boundary_policies_test.rb | 2 +- google-iam-v3beta/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...ogle-identity-access_context_manager-v1.rb | 2 +- .../identity/access_context_manager/v1.rb | 2 +- .../v1/access_context_manager.rb | 2 +- .../v1/access_context_manager/client.rb | 2 +- .../v1/access_context_manager/credentials.rb | 2 +- .../v1/access_context_manager/operations.rb | 2 +- .../v1/access_context_manager/paths.rb | 2 +- .../v1/access_context_manager/rest.rb | 2 +- .../v1/access_context_manager/rest/client.rb | 2 +- .../access_context_manager/rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../access_context_manager/v1/rest.rb | 2 +- .../v1/access_context_manager_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../type/device_resources.rb | 2 +- .../v1/access_context_manager.rb | 2 +- .../accesscontextmanager/v1/access_level.rb | 2 +- .../accesscontextmanager/v1/access_policy.rb | 2 +- .../v1/gcp_user_access_binding.rb | 2 +- .../v1/service_perimeter.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../commit_service_perimeters.rb | 2 +- .../create_access_level.rb | 2 +- .../create_access_policy.rb | 2 +- .../create_gcp_user_access_binding.rb | 2 +- .../create_service_perimeter.rb | 2 +- .../delete_access_level.rb | 2 +- .../delete_access_policy.rb | 2 +- .../delete_gcp_user_access_binding.rb | 2 +- .../delete_service_perimeter.rb | 2 +- .../get_access_level.rb | 2 +- .../get_access_policy.rb | 2 +- .../get_gcp_user_access_binding.rb | 2 +- .../access_context_manager/get_iam_policy.rb | 2 +- .../get_service_perimeter.rb | 2 +- .../list_access_levels.rb | 2 +- .../list_access_policies.rb | 2 +- .../list_gcp_user_access_bindings.rb | 2 +- .../list_service_perimeters.rb | 2 +- .../replace_access_levels.rb | 2 +- .../replace_service_perimeters.rb | 2 +- .../access_context_manager/set_iam_policy.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../update_access_level.rb | 2 +- .../update_access_policy.rb | 2 +- .../update_gcp_user_access_binding.rb | 2 +- .../update_service_perimeter.rb | 2 +- .../access_context_manager_operations_test.rb | 2 +- .../v1/access_context_manager_paths_test.rb | 2 +- .../v1/access_context_manager_rest_test.rb | 2 +- .../v1/access_context_manager_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-maps-fleet_engine-delivery-v1/.toys.rb | 2 +- google-maps-fleet_engine-delivery-v1/Rakefile | 2 +- .../google-maps-fleet_engine-delivery-v1.rb | 2 +- .../google/maps/fleet_engine/delivery/v1.rb | 2 +- .../delivery/v1/delivery_service.rb | 2 +- .../delivery/v1/delivery_service/client.rb | 2 +- .../v1/delivery_service/credentials.rb | 2 +- .../delivery/v1/delivery_service/paths.rb | 2 +- .../delivery/v1/delivery_service/rest.rb | 2 +- .../v1/delivery_service/rest/client.rb | 2 +- .../v1/delivery_service/rest/service_stub.rb | 2 +- .../maps/fleet_engine/delivery/v1/rest.rb | 2 +- .../delivery/v1/delivery_api_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/routing.rb | 2 +- .../proto_docs/google/geo/type/viewport.rb | 2 +- .../maps/fleetengine/delivery/v1/common.rb | 2 +- .../fleetengine/delivery/v1/delivery_api.rb | 2 +- .../delivery/v1/delivery_vehicles.rb | 2 +- .../maps/fleetengine/delivery/v1/header.rb | 2 +- .../delivery/v1/task_tracking_info.rb | 2 +- .../maps/fleetengine/delivery/v1/tasks.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/type/latlng.rb | 2 +- .../snippets/Gemfile | 2 +- .../delivery_service/batch_create_tasks.rb | 2 +- .../create_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/create_task.rb | 2 +- .../delete_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/delete_task.rb | 2 +- .../delivery_service/get_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/get_task.rb | 2 +- .../get_task_tracking_info.rb | 2 +- .../list_delivery_vehicles.rb | 2 +- .../snippets/delivery_service/list_tasks.rb | 2 +- .../update_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/update_task.rb | 2 +- .../v1/delivery_service_paths_test.rb | 2 +- .../delivery/v1/delivery_service_rest_test.rb | 2 +- .../delivery/v1/delivery_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-maps-fleet_engine-v1/.toys.rb | 2 +- google-maps-fleet_engine-v1/Rakefile | 2 +- .../lib/google-maps-fleet_engine-v1.rb | 2 +- .../lib/google/maps/fleet_engine/v1.rb | 2 +- .../lib/google/maps/fleet_engine/v1/rest.rb | 2 +- .../maps/fleet_engine/v1/trip_service.rb | 2 +- .../fleet_engine/v1/trip_service/client.rb | 2 +- .../v1/trip_service/credentials.rb | 2 +- .../fleet_engine/v1/trip_service/paths.rb | 2 +- .../maps/fleet_engine/v1/trip_service/rest.rb | 2 +- .../v1/trip_service/rest/client.rb | 2 +- .../v1/trip_service/rest/service_stub.rb | 2 +- .../maps/fleet_engine/v1/vehicle_service.rb | 2 +- .../fleet_engine/v1/vehicle_service/client.rb | 2 +- .../v1/vehicle_service/credentials.rb | 2 +- .../fleet_engine/v1/vehicle_service/paths.rb | 2 +- .../fleet_engine/v1/vehicle_service/rest.rb | 2 +- .../v1/vehicle_service/rest/client.rb | 2 +- .../v1/vehicle_service/rest/service_stub.rb | 2 +- .../fleetengine/v1/trip_api_services_pb.rb | 2 +- .../fleetengine/v1/vehicle_api_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/routing.rb | 2 +- .../proto_docs/google/geo/type/viewport.rb | 2 +- .../google/maps/fleetengine/v1/fleetengine.rb | 2 +- .../google/maps/fleetengine/v1/header.rb | 2 +- .../google/maps/fleetengine/v1/traffic.rb | 2 +- .../google/maps/fleetengine/v1/trip_api.rb | 2 +- .../google/maps/fleetengine/v1/trips.rb | 2 +- .../google/maps/fleetengine/v1/vehicle_api.rb | 2 +- .../google/maps/fleetengine/v1/vehicles.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/type/latlng.rb | 2 +- google-maps-fleet_engine-v1/snippets/Gemfile | 2 +- .../snippets/trip_service/create_trip.rb | 2 +- .../snippets/trip_service/delete_trip.rb | 2 +- .../snippets/trip_service/get_trip.rb | 2 +- .../trip_service/report_billable_trip.rb | 2 +- .../snippets/trip_service/search_trips.rb | 2 +- .../snippets/trip_service/update_trip.rb | 2 +- .../vehicle_service/create_vehicle.rb | 2 +- .../vehicle_service/delete_vehicle.rb | 2 +- .../snippets/vehicle_service/get_vehicle.rb | 2 +- .../snippets/vehicle_service/list_vehicles.rb | 2 +- .../vehicle_service/search_vehicles.rb | 2 +- .../vehicle_service/update_vehicle.rb | 2 +- .../update_vehicle_attributes.rb | 2 +- .../v1/trip_service_paths_test.rb | 2 +- .../fleet_engine/v1/trip_service_rest_test.rb | 2 +- .../maps/fleet_engine/v1/trip_service_test.rb | 2 +- .../v1/vehicle_service_paths_test.rb | 2 +- .../v1/vehicle_service_rest_test.rb | 2 +- .../fleet_engine/v1/vehicle_service_test.rb | 2 +- google-maps-fleet_engine-v1/test/helper.rb | 2 +- google-shopping-css-v1/.owlbot-manifest.json | 3 +- google-shopping-css-v1/.toys.rb | 2 +- google-shopping-css-v1/Rakefile | 2 +- .../lib/google-shopping-css-v1.rb | 2 +- .../lib/google/shopping/css/v1.rb | 2 +- .../shopping/css/v1/account_labels_service.rb | 2 +- .../css/v1/account_labels_service/client.rb | 2 +- .../v1/account_labels_service/credentials.rb | 2 +- .../css/v1/account_labels_service/paths.rb | 2 +- .../css/v1/account_labels_service/rest.rb | 2 +- .../v1/account_labels_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../css/v1/accounts_labels_services_pb.rb | 2 +- .../shopping/css/v1/accounts_service.rb | 2 +- .../css/v1/accounts_service/client.rb | 2 +- .../css/v1/accounts_service/credentials.rb | 2 +- .../shopping/css/v1/accounts_service/paths.rb | 2 +- .../shopping/css/v1/accounts_service/rest.rb | 2 +- .../css/v1/accounts_service/rest/client.rb | 2 +- .../v1/accounts_service/rest/service_stub.rb | 2 +- .../shopping/css/v1/accounts_services_pb.rb | 2 +- .../css/v1/css_product_inputs_service.rb | 2 +- .../v1/css_product_inputs_service/client.rb | 2 +- .../css_product_inputs_service/credentials.rb | 2 +- .../v1/css_product_inputs_service/paths.rb | 2 +- .../css/v1/css_product_inputs_service/rest.rb | 2 +- .../css_product_inputs_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../css/v1/css_product_inputs_services_pb.rb | 2 +- .../shopping/css/v1/css_products_service.rb | 2 +- .../css/v1/css_products_service/client.rb | 2 +- .../v1/css_products_service/credentials.rb | 2 +- .../css/v1/css_products_service/paths.rb | 2 +- .../css/v1/css_products_service/rest.rb | 2 +- .../v1/css_products_service/rest/client.rb | 2 +- .../css_products_service/rest/service_stub.rb | 2 +- .../css/v1/css_products_services_pb.rb | 2 +- .../google/shopping/css/v1/quota_service.rb | 2 +- .../shopping/css/v1/quota_service/client.rb | 2 +- .../css/v1/quota_service/credentials.rb | 2 +- .../shopping/css/v1/quota_service/paths.rb | 2 +- .../shopping/css/v1/quota_service/rest.rb | 2 +- .../css/v1/quota_service/rest/client.rb | 2 +- .../css/v1/quota_service/rest/service_stub.rb | 2 +- .../shopping/css/v1/quota_services_pb.rb | 2 +- .../lib/google/shopping/css/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../google/shopping/css/v1/accounts.rb | 2 +- .../google/shopping/css/v1/accounts_labels.rb | 2 +- .../shopping/css/v1/css_product_common.rb | 2 +- .../shopping/css/v1/css_product_inputs.rb | 2 +- .../google/shopping/css/v1/css_products.rb | 2 +- .../google/shopping/css/v1/quota.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- google-shopping-css-v1/snippets/Gemfile | 2 +- .../create_account_label.rb | 2 +- .../delete_account_label.rb | 2 +- .../list_account_labels.rb | 2 +- .../update_account_label.rb | 2 +- .../snippets/accounts_service/get_account.rb | 2 +- .../accounts_service/list_child_accounts.rb | 2 +- .../accounts_service/update_labels.rb | 2 +- .../delete_css_product_input.rb | 2 +- .../insert_css_product_input.rb | 2 +- .../update_css_product_input.rb | 2 +- .../css_products_service/get_css_product.rb | 2 +- .../css_products_service/list_css_products.rb | 2 +- .../quota_service/list_quota_groups.rb | 2 +- .../v1/account_labels_service_paths_test.rb | 2 +- .../v1/account_labels_service_rest_test.rb | 2 +- .../css/v1/account_labels_service_test.rb | 2 +- .../css/v1/accounts_service_paths_test.rb | 2 +- .../css/v1/accounts_service_rest_test.rb | 2 +- .../shopping/css/v1/accounts_service_test.rb | 2 +- .../css_product_inputs_service_paths_test.rb | 2 +- .../css_product_inputs_service_rest_test.rb | 2 +- .../css/v1/css_product_inputs_service_test.rb | 2 +- .../css/v1/css_products_service_paths_test.rb | 2 +- .../css/v1/css_products_service_rest_test.rb | 2 +- .../css/v1/css_products_service_test.rb | 2 +- .../css/v1/quota_service_paths_test.rb | 2 +- .../css/v1/quota_service_rest_test.rb | 2 +- .../shopping/css/v1/quota_service_test.rb | 2 +- google-shopping-css-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-shopping-merchant-accounts-v1beta.rb | 2 +- .../shopping/merchant/accounts/v1beta.rb | 2 +- .../accounts/v1beta/account_issue_service.rb | 2 +- .../v1beta/account_issue_service/client.rb | 2 +- .../account_issue_service/credentials.rb | 2 +- .../v1beta/account_issue_service/paths.rb | 2 +- .../v1beta/account_issue_service/rest.rb | 2 +- .../account_issue_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../accounts/v1beta/account_tax_service.rb | 2 +- .../v1beta/account_tax_service/client.rb | 2 +- .../v1beta/account_tax_service/credentials.rb | 2 +- .../v1beta/account_tax_service/paths.rb | 2 +- .../v1beta/account_tax_service/rest.rb | 2 +- .../v1beta/account_tax_service/rest/client.rb | 2 +- .../account_tax_service/rest/service_stub.rb | 2 +- .../v1beta/account_tax_services_pb.rb | 2 +- .../v1beta/accountissue_services_pb.rb | 2 +- .../accounts/v1beta/accounts_service.rb | 2 +- .../v1beta/accounts_service/client.rb | 2 +- .../v1beta/accounts_service/credentials.rb | 2 +- .../accounts/v1beta/accounts_service/paths.rb | 2 +- .../accounts/v1beta/accounts_service/rest.rb | 2 +- .../v1beta/accounts_service/rest/client.rb | 2 +- .../accounts_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/accounts_services_pb.rb | 2 +- .../v1beta/autofeed_settings_service.rb | 2 +- .../autofeed_settings_service/client.rb | 2 +- .../autofeed_settings_service/credentials.rb | 2 +- .../v1beta/autofeed_settings_service/paths.rb | 2 +- .../v1beta/autofeed_settings_service/rest.rb | 2 +- .../autofeed_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/autofeedsettings_services_pb.rb | 2 +- .../v1beta/automatic_improvements_service.rb | 2 +- .../automatic_improvements_service/client.rb | 2 +- .../credentials.rb | 2 +- .../automatic_improvements_service/paths.rb | 2 +- .../automatic_improvements_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/business_identity_service.rb | 2 +- .../business_identity_service/client.rb | 2 +- .../business_identity_service/credentials.rb | 2 +- .../v1beta/business_identity_service/paths.rb | 2 +- .../v1beta/business_identity_service/rest.rb | 2 +- .../business_identity_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../accounts/v1beta/business_info_service.rb | 2 +- .../v1beta/business_info_service/client.rb | 2 +- .../business_info_service/credentials.rb | 2 +- .../v1beta/business_info_service/paths.rb | 2 +- .../v1beta/business_info_service/rest.rb | 2 +- .../business_info_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/businessidentity_services_pb.rb | 2 +- .../v1beta/businessinfo_services_pb.rb | 2 +- .../v1beta/checkout_settings_service.rb | 2 +- .../checkout_settings_service/client.rb | 2 +- .../checkout_settings_service/credentials.rb | 2 +- .../v1beta/checkout_settings_service/paths.rb | 2 +- .../v1beta/checkout_settings_service/rest.rb | 2 +- .../checkout_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/email_preferences_service.rb | 2 +- .../email_preferences_service/client.rb | 2 +- .../email_preferences_service/credentials.rb | 2 +- .../v1beta/email_preferences_service/paths.rb | 2 +- .../v1beta/email_preferences_service/rest.rb | 2 +- .../email_preferences_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/emailpreferences_services_pb.rb | 2 +- .../accounts/v1beta/gbp_accounts_service.rb | 2 +- .../v1beta/gbp_accounts_service/client.rb | 2 +- .../gbp_accounts_service/credentials.rb | 2 +- .../v1beta/gbp_accounts_service/paths.rb | 2 +- .../v1beta/gbp_accounts_service/rest.rb | 2 +- .../gbp_accounts_service/rest/client.rb | 2 +- .../gbp_accounts_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/homepage_service.rb | 2 +- .../v1beta/homepage_service/client.rb | 2 +- .../v1beta/homepage_service/credentials.rb | 2 +- .../accounts/v1beta/homepage_service/paths.rb | 2 +- .../accounts/v1beta/homepage_service/rest.rb | 2 +- .../v1beta/homepage_service/rest/client.rb | 2 +- .../homepage_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/homepage_services_pb.rb | 2 +- .../accounts/v1beta/lfp_providers_service.rb | 2 +- .../v1beta/lfp_providers_service/client.rb | 2 +- .../lfp_providers_service/credentials.rb | 2 +- .../v1beta/lfp_providers_service/paths.rb | 2 +- .../v1beta/lfp_providers_service/rest.rb | 2 +- .../lfp_providers_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/omnichannel_settings_service.rb | 2 +- .../omnichannel_settings_service/client.rb | 2 +- .../credentials.rb | 2 +- .../omnichannel_settings_service/paths.rb | 2 +- .../omnichannel_settings_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/online_return_policy_service.rb | 2 +- .../online_return_policy_service/client.rb | 2 +- .../credentials.rb | 2 +- .../online_return_policy_service/paths.rb | 2 +- .../online_return_policy_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../online_return_policy_services_pb.rb | 2 +- .../accounts/v1beta/programs_service.rb | 2 +- .../v1beta/programs_service/client.rb | 2 +- .../v1beta/programs_service/credentials.rb | 2 +- .../accounts/v1beta/programs_service/paths.rb | 2 +- .../accounts/v1beta/programs_service/rest.rb | 2 +- .../v1beta/programs_service/rest/client.rb | 2 +- .../programs_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/programs_services_pb.rb | 2 +- .../accounts/v1beta/regions_service.rb | 2 +- .../accounts/v1beta/regions_service/client.rb | 2 +- .../v1beta/regions_service/credentials.rb | 2 +- .../accounts/v1beta/regions_service/paths.rb | 2 +- .../accounts/v1beta/regions_service/rest.rb | 2 +- .../v1beta/regions_service/rest/client.rb | 2 +- .../regions_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/regions_services_pb.rb | 2 +- .../shopping/merchant/accounts/v1beta/rest.rb | 2 +- .../v1beta/shipping_settings_service.rb | 2 +- .../shipping_settings_service/client.rb | 2 +- .../shipping_settings_service/credentials.rb | 2 +- .../v1beta/shipping_settings_service/paths.rb | 2 +- .../v1beta/shipping_settings_service/rest.rb | 2 +- .../shipping_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/shippingsettings_services_pb.rb | 2 +- ...erms_of_service_agreement_state_service.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/terms_of_service_service.rb | 2 +- .../v1beta/terms_of_service_service/client.rb | 2 +- .../terms_of_service_service/credentials.rb | 2 +- .../v1beta/terms_of_service_service/paths.rb | 2 +- .../v1beta/terms_of_service_service/rest.rb | 2 +- .../terms_of_service_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/termsofservice_services_pb.rb | 2 +- ...ermsofserviceagreementstate_services_pb.rb | 2 +- .../merchant/accounts/v1beta/user_service.rb | 2 +- .../accounts/v1beta/user_service/client.rb | 2 +- .../v1beta/user_service/credentials.rb | 2 +- .../accounts/v1beta/user_service/paths.rb | 2 +- .../accounts/v1beta/user_service/rest.rb | 2 +- .../v1beta/user_service/rest/client.rb | 2 +- .../v1beta/user_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/user_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../merchant/accounts/v1beta/accessright.rb | 2 +- .../merchant/accounts/v1beta/account_tax.rb | 2 +- .../merchant/accounts/v1beta/accountissue.rb | 2 +- .../merchant/accounts/v1beta/accounts.rb | 2 +- .../accounts/v1beta/accountservices.rb | 2 +- .../accounts/v1beta/autofeedsettings.rb | 2 +- .../accounts/v1beta/automaticimprovements.rb | 2 +- .../accounts/v1beta/businessidentity.rb | 2 +- .../merchant/accounts/v1beta/businessinfo.rb | 2 +- .../accounts/v1beta/checkoutsettings.rb | 2 +- .../accounts/v1beta/customerservice.rb | 2 +- .../accounts/v1beta/emailpreferences.rb | 2 +- .../merchant/accounts/v1beta/gbpaccounts.rb | 2 +- .../merchant/accounts/v1beta/homepage.rb | 2 +- .../merchant/accounts/v1beta/lfpproviders.rb | 2 +- .../accounts/v1beta/omnichannelsettings.rb | 2 +- .../accounts/v1beta/online_return_policy.rb | 2 +- .../accounts/v1beta/phoneverificationstate.rb | 2 +- .../merchant/accounts/v1beta/programs.rb | 2 +- .../merchant/accounts/v1beta/regions.rb | 2 +- .../accounts/v1beta/shippingsettings.rb | 2 +- .../merchant/accounts/v1beta/tax_rule.rb | 2 +- .../accounts/v1beta/termsofservice.rb | 2 +- .../v1beta/termsofserviceagreementstate.rb | 2 +- .../accounts/v1beta/termsofservicekind.rb | 2 +- .../shopping/merchant/accounts/v1beta/user.rb | 2 +- .../v1beta/verificationmailsettings.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/date.rb | 2 +- .../proto_docs/google/type/datetime.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../proto_docs/google/type/phone_number.rb | 2 +- .../proto_docs/google/type/postal_address.rb | 2 +- .../snippets/Gemfile | 2 +- .../list_account_issues.rb | 2 +- .../account_tax_service/get_account_tax.rb | 2 +- .../account_tax_service/list_account_tax.rb | 2 +- .../account_tax_service/update_account_tax.rb | 2 +- .../create_and_configure_account.rb | 2 +- .../accounts_service/delete_account.rb | 2 +- .../snippets/accounts_service/get_account.rb | 2 +- .../accounts_service/list_accounts.rb | 2 +- .../accounts_service/list_sub_accounts.rb | 2 +- .../accounts_service/update_account.rb | 2 +- .../get_autofeed_settings.rb | 2 +- .../update_autofeed_settings.rb | 2 +- .../get_automatic_improvements.rb | 2 +- .../update_automatic_improvements.rb | 2 +- .../get_business_identity.rb | 2 +- .../update_business_identity.rb | 2 +- .../get_business_info.rb | 2 +- .../update_business_info.rb | 2 +- .../create_checkout_settings.rb | 2 +- .../delete_checkout_settings.rb | 2 +- .../get_checkout_settings.rb | 2 +- .../update_checkout_settings.rb | 2 +- .../get_email_preferences.rb | 2 +- .../update_email_preferences.rb | 2 +- .../gbp_accounts_service/link_gbp_account.rb | 2 +- .../gbp_accounts_service/list_gbp_accounts.rb | 2 +- .../homepage_service/claim_homepage.rb | 2 +- .../snippets/homepage_service/get_homepage.rb | 2 +- .../homepage_service/unclaim_homepage.rb | 2 +- .../homepage_service/update_homepage.rb | 2 +- .../find_lfp_providers.rb | 2 +- .../link_lfp_provider.rb | 2 +- .../create_omnichannel_setting.rb | 2 +- .../get_omnichannel_setting.rb | 2 +- .../list_omnichannel_settings.rb | 2 +- .../request_inventory_verification.rb | 2 +- .../update_omnichannel_setting.rb | 2 +- .../create_online_return_policy.rb | 2 +- .../delete_online_return_policy.rb | 2 +- .../get_online_return_policy.rb | 2 +- .../list_online_return_policies.rb | 2 +- .../update_online_return_policy.rb | 2 +- .../programs_service/disable_program.rb | 2 +- .../programs_service/enable_program.rb | 2 +- .../snippets/programs_service/get_program.rb | 2 +- .../programs_service/list_programs.rb | 2 +- .../snippets/regions_service/create_region.rb | 2 +- .../snippets/regions_service/delete_region.rb | 2 +- .../snippets/regions_service/get_region.rb | 2 +- .../snippets/regions_service/list_regions.rb | 2 +- .../snippets/regions_service/update_region.rb | 2 +- .../get_shipping_settings.rb | 2 +- .../insert_shipping_settings.rb | 2 +- .../get_terms_of_service_agreement_state.rb | 2 +- ...cation_terms_of_service_agreement_state.rb | 2 +- .../accept_terms_of_service.rb | 2 +- .../get_terms_of_service.rb | 2 +- .../retrieve_latest_terms_of_service.rb | 2 +- .../snippets/user_service/create_user.rb | 2 +- .../snippets/user_service/delete_user.rb | 2 +- .../snippets/user_service/get_user.rb | 2 +- .../snippets/user_service/list_users.rb | 2 +- .../snippets/user_service/update_user.rb | 2 +- .../account_issue_service_paths_test.rb | 2 +- .../v1beta/account_issue_service_rest_test.rb | 2 +- .../v1beta/account_issue_service_test.rb | 2 +- .../v1beta/account_tax_service_paths_test.rb | 2 +- .../v1beta/account_tax_service_rest_test.rb | 2 +- .../v1beta/account_tax_service_test.rb | 2 +- .../v1beta/accounts_service_paths_test.rb | 2 +- .../v1beta/accounts_service_rest_test.rb | 2 +- .../accounts/v1beta/accounts_service_test.rb | 2 +- .../autofeed_settings_service_paths_test.rb | 2 +- .../autofeed_settings_service_rest_test.rb | 2 +- .../v1beta/autofeed_settings_service_test.rb | 2 +- ...tomatic_improvements_service_paths_test.rb | 2 +- ...utomatic_improvements_service_rest_test.rb | 2 +- .../automatic_improvements_service_test.rb | 2 +- .../business_identity_service_paths_test.rb | 2 +- .../business_identity_service_rest_test.rb | 2 +- .../v1beta/business_identity_service_test.rb | 2 +- .../business_info_service_paths_test.rb | 2 +- .../v1beta/business_info_service_rest_test.rb | 2 +- .../v1beta/business_info_service_test.rb | 2 +- .../checkout_settings_service_paths_test.rb | 2 +- .../checkout_settings_service_rest_test.rb | 2 +- .../v1beta/checkout_settings_service_test.rb | 2 +- .../email_preferences_service_paths_test.rb | 2 +- .../email_preferences_service_rest_test.rb | 2 +- .../v1beta/email_preferences_service_test.rb | 2 +- .../v1beta/gbp_accounts_service_paths_test.rb | 2 +- .../v1beta/gbp_accounts_service_rest_test.rb | 2 +- .../v1beta/gbp_accounts_service_test.rb | 2 +- .../v1beta/homepage_service_paths_test.rb | 2 +- .../v1beta/homepage_service_rest_test.rb | 2 +- .../accounts/v1beta/homepage_service_test.rb | 2 +- .../lfp_providers_service_paths_test.rb | 2 +- .../v1beta/lfp_providers_service_rest_test.rb | 2 +- .../v1beta/lfp_providers_service_test.rb | 2 +- ...omnichannel_settings_service_paths_test.rb | 2 +- .../omnichannel_settings_service_rest_test.rb | 2 +- .../omnichannel_settings_service_test.rb | 2 +- ...online_return_policy_service_paths_test.rb | 2 +- .../online_return_policy_service_rest_test.rb | 2 +- .../online_return_policy_service_test.rb | 2 +- .../v1beta/programs_service_paths_test.rb | 2 +- .../v1beta/programs_service_rest_test.rb | 2 +- .../accounts/v1beta/programs_service_test.rb | 2 +- .../v1beta/regions_service_paths_test.rb | 2 +- .../v1beta/regions_service_rest_test.rb | 2 +- .../accounts/v1beta/regions_service_test.rb | 2 +- .../shipping_settings_service_paths_test.rb | 2 +- .../shipping_settings_service_rest_test.rb | 2 +- .../v1beta/shipping_settings_service_test.rb | 2 +- ...vice_agreement_state_service_paths_test.rb | 2 +- ...rvice_agreement_state_service_rest_test.rb | 2 +- ...of_service_agreement_state_service_test.rb | 2 +- .../terms_of_service_service_paths_test.rb | 2 +- .../terms_of_service_service_rest_test.rb | 2 +- .../v1beta/terms_of_service_service_test.rb | 2 +- .../v1beta/user_service_paths_test.rb | 2 +- .../accounts/v1beta/user_service_rest_test.rb | 2 +- .../accounts/v1beta/user_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...google-shopping-merchant-conversions-v1.rb | 2 +- .../shopping/merchant/conversions/v1.rb | 2 +- .../v1/conversion_sources_service.rb | 2 +- .../v1/conversion_sources_service/client.rb | 2 +- .../conversion_sources_service/credentials.rb | 2 +- .../v1/conversion_sources_service/paths.rb | 2 +- .../v1/conversion_sources_service/rest.rb | 2 +- .../conversion_sources_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../shopping/merchant/conversions/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../conversions/v1/conversionsources.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_conversion_source.rb | 2 +- .../delete_conversion_source.rb | 2 +- .../get_conversion_source.rb | 2 +- .../list_conversion_sources.rb | 2 +- .../undelete_conversion_source.rb | 2 +- .../update_conversion_source.rb | 2 +- .../conversion_sources_service_paths_test.rb | 2 +- .../conversion_sources_service_rest_test.rb | 2 +- .../v1/conversion_sources_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...le-shopping-merchant-conversions-v1beta.rb | 2 +- .../shopping/merchant/conversions/v1beta.rb | 2 +- .../v1beta/conversion_sources_service.rb | 2 +- .../conversion_sources_service/client.rb | 2 +- .../conversion_sources_service/credentials.rb | 2 +- .../conversion_sources_service/paths.rb | 2 +- .../v1beta/conversion_sources_service/rest.rb | 2 +- .../conversion_sources_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/conversionsources_services_pb.rb | 2 +- .../merchant/conversions/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../conversions/v1beta/conversionsources.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_conversion_source.rb | 2 +- .../delete_conversion_source.rb | 2 +- .../get_conversion_source.rb | 2 +- .../list_conversion_sources.rb | 2 +- .../undelete_conversion_source.rb | 2 +- .../update_conversion_source.rb | 2 +- .../conversion_sources_service_paths_test.rb | 2 +- .../conversion_sources_service_rest_test.rb | 2 +- .../v1beta/conversion_sources_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 1723 --------- .../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 | 1589 -------- .../web_security_scanner/rest/service_stub.rb | 878 ----- .../v1beta/crawled_url_pb.rb | 21 - .../v1beta/finding_addon_pb.rb | 27 - .../websecurityscanner/v1beta/finding_pb.rb | 24 - .../v1beta/finding_type_stats_pb.rb | 21 - .../v1beta/scan_config_error_pb.rb | 22 - .../v1beta/scan_config_pb.rb | 34 - .../v1beta/scan_run_error_trace_pb.rb | 24 - .../websecurityscanner/v1beta/scan_run_pb.rb | 28 - .../v1beta/scan_run_warning_trace_pb.rb | 22 - .../v1beta/web_security_scanner_pb.rb | 50 - .../web_security_scanner_services_pb.rb | 73 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 804 ---- .../executions/v1/executions/credentials.rb | 53 - .../executions/v1/executions/paths.rb | 75 - .../executions/v1/executions/rest.rb | 55 - .../executions/v1/executions/rest/client.rb | 733 ---- .../v1/executions/rest/service_stub.rb | 329 -- .../workflows/executions/v1/executions_pb.rb | 46 - .../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 | 593 --- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 791 ---- .../v1beta/executions/credentials.rb | 53 - .../executions/v1beta/executions/paths.rb | 75 - .../executions/v1beta/executions_pb.rb | 37 - .../v1beta/executions_services_pb.rb | 57 - .../workflows/executions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../workflows/executions/v1beta/executions.rb | 200 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../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 | 35 - .../google-cloud-workflows-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 1076 ------ .../workflows/v1/workflows/credentials.rb | 51 - .../workflows/v1/workflows/operations.rb | 843 ----- .../cloud/workflows/v1/workflows/paths.rb | 113 - .../cloud/workflows/v1/workflows/rest.rb | 56 - .../workflows/v1/workflows/rest/client.rb | 999 ----- .../workflows/v1/workflows/rest/operations.rb | 927 ----- .../v1/workflows/rest/service_stub.rb | 449 --- .../google/cloud/workflows/v1/workflows_pb.rb | 44 - .../workflows/v1/workflows_services_pb.rb | 66 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../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 | 128 - .../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 | 35 - .../google-cloud-workflows-v1beta/.gitignore | 20 - .../.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 | 15 - .../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 | 954 ----- .../workflows/v1beta/workflows/credentials.rb | 51 - .../workflows/v1beta/workflows/operations.rb | 843 ----- .../cloud/workflows/v1beta/workflows/paths.rb | 69 - .../cloud/workflows/v1beta/workflows/rest.rb | 56 - .../workflows/v1beta/workflows/rest/client.rb | 884 ----- .../v1beta/workflows/rest/operations.rb | 927 ----- .../v1beta/workflows/rest/service_stub.rb | 388 -- .../cloud/workflows/v1beta/workflows_pb.rb | 38 - .../workflows/v1beta/workflows_services_pb.rb | 64 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-workload_manager-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-workload_manager-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-workload_manager-v1/Rakefile | 169 - .../gapic_metadata.json | 78 - .../google-cloud-workload_manager-v1.gemspec | 29 - .../lib/google-cloud-workload_manager-v1.rb | 21 - .../lib/google/cloud/workload_manager/v1.rb | 45 - .../workload_manager/v1/bindings_override.rb | 75 - .../google/cloud/workload_manager/v1/rest.rb | 38 - .../cloud/workload_manager/v1/version.rb | 28 - .../workload_manager/v1/workload_manager.rb | 57 - .../v1/workload_manager/client.rb | 1774 --------- .../v1/workload_manager/credentials.rb | 47 - .../v1/workload_manager/operations.rb | 843 ----- .../v1/workload_manager/paths.rb | 111 - .../v1/workload_manager/rest.rb | 55 - .../v1/workload_manager/rest/client.rb | 1655 --------- .../v1/workload_manager/rest/operations.rb | 927 ----- .../v1/workload_manager/rest/service_stub.rb | 816 ---- .../cloud/workloadmanager/v1/service_pb.rb | 75 - .../workloadmanager/v1/service_services_pb.rb | 68 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workloadmanager/v1/service.rb | 991 ----- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...adata_google.cloud.workloadmanager.v1.json | 495 --- .../workload_manager/create_evaluation.rb | 54 - .../workload_manager/delete_evaluation.rb | 54 - .../workload_manager/delete_execution.rb | 54 - .../workload_manager/get_evaluation.rb | 47 - .../workload_manager/get_execution.rb | 47 - .../workload_manager/list_evaluations.rb | 51 - .../list_execution_results.rb | 51 - .../workload_manager/list_executions.rb | 51 - .../snippets/workload_manager/list_rules.rb | 47 - .../list_scanned_resources.rb | 51 - .../workload_manager/run_evaluation.rb | 54 - .../workload_manager/update_evaluation.rb | 54 - .../v1/workload_manager_operations_test.rb | 400 -- .../v1/workload_manager_paths_test.rb | 91 - .../v1/workload_manager_rest_test.rb | 779 ---- .../v1/workload_manager_test.rb | 923 ----- .../test/helper.rb | 35 - .../google-cloud-workstations-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 2620 ------------- .../v1/workstations/credentials.rb | 47 - .../v1/workstations/operations.rb | 843 ----- .../workstations/v1/workstations/paths.rb | 113 - .../workstations/v1/workstations/rest.rb | 54 - .../v1/workstations/rest/client.rb | 2445 ------------ .../v1/workstations/rest/operations.rb | 927 ----- .../v1/workstations/rest/service_stub.rb | 1310 ------- .../cloud/workstations/v1/workstations_pb.rb | 85 - .../v1/workstations_services_pb.rb | 88 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1/workstations.rb | 1678 --------- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...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 | 1225 ------ .../workstations/v1/workstations_test.rb | 1451 -------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.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 | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../google-cloud-workstations-v1beta/Rakefile | 169 - .../gapic_metadata.json | 123 - .../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 | 2728 -------------- .../v1beta/workstations/credentials.rb | 47 - .../v1beta/workstations/operations.rb | 843 ----- .../workstations/v1beta/workstations/paths.rb | 113 - .../workstations/v1beta/workstations/rest.rb | 54 - .../v1beta/workstations/rest/client.rb | 2546 ------------- .../v1beta/workstations/rest/operations.rb | 927 ----- .../v1beta/workstations/rest/service_stub.rb | 1372 ------- .../workstations/v1beta/workstations_pb.rb | 92 - .../v1beta/workstations_services_pb.rb | 92 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1beta/workstations.rb | 1874 ---------- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...data_google.cloud.workstations.v1beta.json | 855 ----- .../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 - .../snippets/workstations/push_credentials.rb | 54 - .../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 | 1280 ------- .../workstations/v1beta/workstations_test.rb | 1516 -------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...-developers-developer_knowledge-v1.gemspec | 28 - ...oogle-developers-developer_knowledge-v1.rb | 21 - .../developers/developer_knowledge/v1.rb | 45 - .../v1/developer_knowledge.rb | 70 - .../v1/developer_knowledge/client.rb | 847 ----- .../v1/developer_knowledge/credentials.rb | 47 - .../v1/developer_knowledge/paths.rb | 47 - .../v1/developer_knowledge/rest.rb | 67 - .../v1/developer_knowledge/rest/client.rb | 800 ---- .../developer_knowledge/rest/service_stub.rb | 320 -- .../developers/developer_knowledge/v1/rest.rb | 37 - .../developer_knowledge/v1/version.rb | 28 - .../knowledge/v1/developerknowledge_pb.rb | 41 - .../v1/developerknowledge_services_pb.rb | 77 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../knowledge/v1/developerknowledge.rb | 371 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../snippets/Gemfile | 32 - .../developer_knowledge/answer_query.rb | 47 - .../batch_get_documents.rb | 47 - .../developer_knowledge/get_document.rb | 47 - .../search_document_chunks.rb | 51 - ...tadata_google.developers.knowledge.v1.json | 175 - .../v1/developer_knowledge_paths_test.rb | 55 - .../v1/developer_knowledge_rest_test.rb | 320 -- .../v1/developer_knowledge_test.rb | 351 -- .../test/helper.rb | 35 - .../google-iam-credentials-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 33 - .../iam/credentials/v1/iam_credentials.rb | 63 - .../credentials/v1/iam_credentials/client.rb | 856 ----- .../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 | 785 ---- .../v1/iam_credentials/rest/service_stub.rb | 329 -- .../iam/credentials/v1/iamcredentials_pb.rb | 24 - .../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 | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/iam/credentials/v1/common.rb | 186 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../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 | 35 - owl-bot-staging/google-iam-v2/.gitignore | 20 - .../google-iam-v2/.repo-metadata.json | 17 - owl-bot-staging/google-iam-v2/.rubocop.yml | 33 - owl-bot-staging/google-iam-v2/.toys.rb | 28 - owl-bot-staging/google-iam-v2/.yardopts | 12 - .../google-iam-v2/AUTHENTICATION.md | 122 - owl-bot-staging/google-iam-v2/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v2/Gemfile | 15 - owl-bot-staging/google-iam-v2/LICENSE.md | 201 - owl-bot-staging/google-iam-v2/README.md | 154 - owl-bot-staging/google-iam-v2/Rakefile | 169 - .../google-iam-v2/gapic_metadata.json | 43 - .../google-iam-v2/google-iam-v2.gemspec | 28 - .../google-iam-v2/lib/google-iam-v2.rb | 21 - .../google-iam-v2/lib/google/iam/v2.rb | 43 - .../lib/google/iam/v2/deny_pb.rb | 21 - .../lib/google/iam/v2/policies.rb | 53 - .../lib/google/iam/v2/policies/client.rb | 989 ----- .../lib/google/iam/v2/policies/credentials.rb | 45 - .../lib/google/iam/v2/policies/operations.rb | 841 ----- .../lib/google/iam/v2/policies/rest.rb | 50 - .../lib/google/iam/v2/policies/rest/client.rb | 911 ----- .../google/iam/v2/policies/rest/operations.rb | 925 ----- .../iam/v2/policies/rest/service_stub.rb | 386 -- .../lib/google/iam/v2/policy_pb.rb | 34 - .../lib/google/iam/v2/policy_services_pb.rb | 65 - .../google-iam-v2/lib/google/iam/v2/rest.rb | 35 - .../lib/google/iam/v2/version.rb | 26 - .../google-iam-v2/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/iam/v2/deny.rb | 110 - .../proto_docs/google/iam/v2/policy.rb | 241 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v2/snippets/Gemfile | 32 - .../snippets/policies/create_policy.rb | 54 - .../snippets/policies/delete_policy.rb | 54 - .../snippets/policies/get_policy.rb | 47 - .../snippets/policies/list_policies.rb | 51 - .../snippets/policies/update_policy.rb | 54 - .../snippet_metadata_google.iam.v2.json | 215 -- .../google/iam/v2/policies_operations_test.rb | 400 -- .../test/google/iam/v2/policies_rest_test.rb | 374 -- .../test/google/iam/v2/policies_test.rb | 438 --- owl-bot-staging/google-iam-v2/test/helper.rb | 35 - owl-bot-staging/google-iam-v3/.gitignore | 20 - .../google-iam-v3/.repo-metadata.json | 17 - owl-bot-staging/google-iam-v3/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3/.toys.rb | 28 - owl-bot-staging/google-iam-v3/.yardopts | 12 - .../google-iam-v3/AUTHENTICATION.md | 122 - owl-bot-staging/google-iam-v3/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3/Gemfile | 15 - owl-bot-staging/google-iam-v3/LICENSE.md | 201 - owl-bot-staging/google-iam-v3/README.md | 154 - owl-bot-staging/google-iam-v3/Rakefile | 169 - .../google-iam-v3/gapic_metadata.json | 126 - .../google-iam-v3/google-iam-v3.gemspec | 29 - .../google-iam-v3/lib/google-iam-v3.rb | 21 - .../google-iam-v3/lib/google/iam/v3.rb | 45 - .../lib/google/iam/v3/access_policies.rb | 54 - .../google/iam/v3/access_policies/client.rb | 1113 ------ .../iam/v3/access_policies/credentials.rb | 45 - .../iam/v3/access_policies/operations.rb | 841 ----- .../google/iam/v3/access_policies/paths.rb | 140 - .../lib/google/iam/v3/access_policies/rest.rb | 51 - .../iam/v3/access_policies/rest/client.rb | 1028 ----- .../iam/v3/access_policies/rest/operations.rb | 939 ----- .../v3/access_policies/rest/service_stub.rb | 535 --- .../iam/v3/access_policies_service_pb.rb | 36 - .../v3/access_policies_service_services_pb.rb | 54 - .../iam/v3/access_policy_resources_pb.rb | 29 - .../google/iam/v3/operation_metadata_pb.rb | 22 - .../iam/v3/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3/policy_bindings.rb | 55 - .../google/iam/v3/policy_bindings/client.rb | 1157 ------ .../iam/v3/policy_bindings/credentials.rb | 45 - .../iam/v3/policy_bindings/operations.rb | 841 ----- .../google/iam/v3/policy_bindings/paths.rb | 140 - .../lib/google/iam/v3/policy_bindings/rest.rb | 52 - .../iam/v3/policy_bindings/rest/client.rb | 1072 ------ .../iam/v3/policy_bindings/rest/operations.rb | 939 ----- .../v3/policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3/policy_bindings_service_pb.rb | 36 - .../v3/policy_bindings_service_services_pb.rb | 61 - .../v3/principal_access_boundary_policies.rb | 55 - .../client.rb | 1102 ------ .../credentials.rb | 45 - .../operations.rb | 841 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1017 ----- .../rest/operations.rb | 939 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../google-iam-v3/lib/google/iam/v3/rest.rb | 37 - .../lib/google/iam/v3/version.rb | 26 - .../google-iam-v3/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/iam/v3/access_policies_service.rb | 203 - .../google/iam/v3/access_policy_resources.rb | 223 -- .../google/iam/v3/operation_metadata.rb | 55 - .../google/iam/v3/policy_binding_resources.rb | 193 - .../google/iam/v3/policy_bindings_service.rb | 243 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3/snippets/Gemfile | 32 - .../access_policies/create_access_policy.rb | 54 - .../access_policies/delete_access_policy.rb | 54 - .../access_policies/get_access_policy.rb | 47 - .../access_policies/list_access_policies.rb | 51 - .../search_access_policy_bindings.rb | 51 - .../access_policies/update_access_policy.rb | 54 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3.json | 735 ---- .../iam/v3/access_policies_operations_test.rb | 400 -- .../iam/v3/access_policies_paths_test.rb | 97 - .../iam/v3/access_policies_rest_test.rb | 434 --- .../google/iam/v3/access_policies_test.rb | 513 --- .../iam/v3/policy_bindings_operations_test.rb | 400 -- .../iam/v3/policy_bindings_paths_test.rb | 97 - .../iam/v3/policy_bindings_rest_test.rb | 437 --- .../google/iam/v3/policy_bindings_test.rb | 519 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- owl-bot-staging/google-iam-v3/test/helper.rb | 35 - owl-bot-staging/google-iam-v3beta/.gitignore | 20 - .../google-iam-v3beta/.repo-metadata.json | 17 - .../google-iam-v3beta/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3beta/.toys.rb | 28 - owl-bot-staging/google-iam-v3beta/.yardopts | 12 - .../google-iam-v3beta/AUTHENTICATION.md | 122 - .../google-iam-v3beta/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3beta/Gemfile | 15 - owl-bot-staging/google-iam-v3beta/LICENSE.md | 201 - owl-bot-staging/google-iam-v3beta/README.md | 154 - owl-bot-staging/google-iam-v3beta/Rakefile | 169 - .../google-iam-v3beta/gapic_metadata.json | 126 - .../google-iam-v3beta.gemspec | 29 - .../lib/google-iam-v3beta.rb | 21 - .../lib/google/iam/v3beta.rb | 45 - .../lib/google/iam/v3beta/access_policies.rb | 54 - .../iam/v3beta/access_policies/client.rb | 1113 ------ .../iam/v3beta/access_policies/credentials.rb | 45 - .../iam/v3beta/access_policies/operations.rb | 841 ----- .../iam/v3beta/access_policies/paths.rb | 140 - .../google/iam/v3beta/access_policies/rest.rb | 51 - .../iam/v3beta/access_policies/rest/client.rb | 1028 ----- .../v3beta/access_policies/rest/operations.rb | 939 ----- .../access_policies/rest/service_stub.rb | 535 --- .../iam/v3beta/access_policies_service_pb.rb | 36 - .../access_policies_service_services_pb.rb | 54 - .../iam/v3beta/access_policy_resources_pb.rb | 29 - .../iam/v3beta/operation_metadata_pb.rb | 22 - .../iam/v3beta/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3beta/policy_bindings.rb | 55 - .../iam/v3beta/policy_bindings/client.rb | 1157 ------ .../iam/v3beta/policy_bindings/credentials.rb | 45 - .../iam/v3beta/policy_bindings/operations.rb | 841 ----- .../iam/v3beta/policy_bindings/paths.rb | 140 - .../google/iam/v3beta/policy_bindings/rest.rb | 52 - .../iam/v3beta/policy_bindings/rest/client.rb | 1072 ------ .../v3beta/policy_bindings/rest/operations.rb | 939 ----- .../policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3beta/policy_bindings_service_pb.rb | 36 - .../policy_bindings_service_services_pb.rb | 61 - .../principal_access_boundary_policies.rb | 55 - .../client.rb | 1102 ------ .../credentials.rb | 45 - .../operations.rb | 841 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1017 ----- .../rest/operations.rb | 939 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../lib/google/iam/v3beta/rest.rb | 37 - .../lib/google/iam/v3beta/version.rb | 26 - .../google-iam-v3beta/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../iam/v3beta/access_policies_service.rb | 203 - .../iam/v3beta/access_policy_resources.rb | 223 -- .../google/iam/v3beta/operation_metadata.rb | 55 - .../iam/v3beta/policy_binding_resources.rb | 193 - .../iam/v3beta/policy_bindings_service.rb | 243 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3beta/snippets/Gemfile | 32 - .../access_policies/create_access_policy.rb | 54 - .../access_policies/delete_access_policy.rb | 54 - .../access_policies/get_access_policy.rb | 47 - .../access_policies/list_access_policies.rb | 51 - .../search_access_policy_bindings.rb | 51 - .../access_policies/update_access_policy.rb | 54 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3beta.json | 735 ---- .../v3beta/access_policies_operations_test.rb | 400 -- .../iam/v3beta/access_policies_paths_test.rb | 97 - .../iam/v3beta/access_policies_rest_test.rb | 434 --- .../google/iam/v3beta/access_policies_test.rb | 513 --- .../v3beta/policy_bindings_operations_test.rb | 400 -- .../iam/v3beta/policy_bindings_paths_test.rb | 97 - .../iam/v3beta/policy_bindings_rest_test.rb | 437 --- .../google/iam/v3beta/policy_bindings_test.rb | 519 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- .../google-iam-v3beta/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 148 - ...identity-access_context_manager-v1.gemspec | 29 - ...ogle-identity-access_context_manager-v1.rb | 21 - .../identity/access_context_manager/v1.rb | 45 - .../v1/access_context_manager.rb | 66 - .../v1/access_context_manager/client.rb | 3299 ----------------- .../v1/access_context_manager/credentials.rb | 47 - .../v1/access_context_manager/operations.rb | 843 ----- .../v1/access_context_manager/paths.rb | 112 - .../v1/access_context_manager/rest.rb | 63 - .../v1/access_context_manager/rest/client.rb | 3090 --------------- .../access_context_manager/rest/operations.rb | 927 ----- .../rest/service_stub.rb | 1693 --------- .../access_context_manager/v1/rest.rb | 37 - .../access_context_manager/v1/version.rb | 28 - .../type/device_resources_pb.rb | 23 - .../v1/access_context_manager_pb.rb | 65 - .../v1/access_context_manager_services_pb.rb | 240 -- .../v1/access_level_pb.rb | 32 - .../v1/access_policy_pb.rb | 24 - .../v1/gcp_user_access_binding_pb.rb | 24 - .../v1/service_perimeter_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 --- .../type/device_resources.rb | 84 - .../v1/access_context_manager.rb | 539 --- .../accesscontextmanager/v1/access_level.rb | 201 - .../accesscontextmanager/v1/access_policy.rb | 76 - .../v1/gcp_user_access_binding.rb | 55 - .../v1/service_perimeter.rb | 500 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../commit_service_perimeters.rb | 54 - .../create_access_level.rb | 54 - .../create_access_policy.rb | 54 - .../create_gcp_user_access_binding.rb | 54 - .../create_service_perimeter.rb | 54 - .../delete_access_level.rb | 54 - .../delete_access_policy.rb | 54 - .../delete_gcp_user_access_binding.rb | 54 - .../delete_service_perimeter.rb | 54 - .../get_access_level.rb | 47 - .../get_access_policy.rb | 47 - .../get_gcp_user_access_binding.rb | 47 - .../access_context_manager/get_iam_policy.rb | 47 - .../get_service_perimeter.rb | 47 - .../list_access_levels.rb | 51 - .../list_access_policies.rb | 51 - .../list_gcp_user_access_bindings.rb | 51 - .../list_service_perimeters.rb | 51 - .../replace_access_levels.rb | 54 - .../replace_service_perimeters.rb | 54 - .../access_context_manager/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_access_level.rb | 54 - .../update_access_policy.rb | 54 - .../update_gcp_user_access_binding.rb | 54 - .../update_service_perimeter.rb | 54 - ...ogle.identity.accesscontextmanager.v1.json | 1055 ------ .../access_context_manager_operations_test.rb | 400 -- .../v1/access_context_manager_paths_test.rb | 103 - .../v1/access_context_manager_rest_test.rb | 1535 -------- .../v1/access_context_manager_test.rb | 1785 --------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 78 - ...ogle-maps-fleet_engine-delivery-v1.gemspec | 29 - .../google-maps-fleet_engine-delivery-v1.rb | 21 - .../google/maps/fleet_engine/delivery/v1.rb | 47 - .../delivery/v1/delivery_service.rb | 57 - .../delivery/v1/delivery_service/client.rb | 1757 --------- .../v1/delivery_service/credentials.rb | 49 - .../delivery/v1/delivery_service/paths.rb | 100 - .../delivery/v1/delivery_service/rest.rb | 54 - .../v1/delivery_service/rest/client.rb | 1618 -------- .../v1/delivery_service/rest/service_stub.rb | 820 ---- .../maps/fleet_engine/delivery/v1/rest.rb | 39 - .../maps/fleet_engine/delivery/v1/version.rb | 30 - .../maps/fleetengine/delivery/v1/common_pb.rb | 33 - .../delivery/v1/delivery_api_pb.rb | 50 - .../delivery/v1/delivery_api_services_pb.rb | 81 - .../delivery/v1/delivery_vehicles_pb.rb | 36 - .../maps/fleetengine/delivery/v1/header_pb.rb | 27 - .../delivery/v1/task_tracking_info_pb.rb | 32 - .../maps/fleetengine/delivery/v1/tasks_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../maps/fleetengine/delivery/v1/common.rb | 276 -- .../fleetengine/delivery/v1/delivery_api.rb | 395 -- .../delivery/v1/delivery_vehicles.rb | 276 -- .../maps/fleetengine/delivery/v1/header.rb | 113 - .../delivery/v1/task_tracking_info.rb | 91 - .../maps/fleetengine/delivery/v1/tasks.rb | 291 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../delivery_service/batch_create_tasks.rb | 47 - .../create_delivery_vehicle.rb | 47 - .../snippets/delivery_service/create_task.rb | 47 - .../delete_delivery_vehicle.rb | 47 - .../snippets/delivery_service/delete_task.rb | 47 - .../delivery_service/get_delivery_vehicle.rb | 47 - .../snippets/delivery_service/get_task.rb | 47 - .../get_task_tracking_info.rb | 47 - .../list_delivery_vehicles.rb | 51 - .../snippets/delivery_service/list_tasks.rb | 51 - .../update_delivery_vehicle.rb | 47 - .../snippets/delivery_service/update_task.rb | 47 - ...metadata_maps.fleetengine.delivery.v1.json | 495 --- .../v1/delivery_service_paths_test.rb | 91 - .../delivery/v1/delivery_service_rest_test.rb | 773 ---- .../delivery/v1/delivery_service_test.rb | 862 ----- .../test/helper.rb | 35 - .../google-maps-fleet_engine-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-maps-fleet_engine-v1/.rubocop.yml | 33 - .../google-maps-fleet_engine-v1/.toys.rb | 28 - .../google-maps-fleet_engine-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-maps-fleet_engine-v1/CHANGELOG.md | 2 - .../google-maps-fleet_engine-v1/Gemfile | 15 - .../google-maps-fleet_engine-v1/LICENSE.md | 201 - .../google-maps-fleet_engine-v1/README.md | 154 - .../google-maps-fleet_engine-v1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-maps-fleet_engine-v1.gemspec | 29 - .../lib/google-maps-fleet_engine-v1.rb | 21 - .../lib/google/maps/fleet_engine/v1.rb | 46 - .../lib/google/maps/fleet_engine/v1/rest.rb | 38 - .../maps/fleet_engine/v1/trip_service.rb | 55 - .../fleet_engine/v1/trip_service/client.rb | 1153 ------ .../v1/trip_service/credentials.rb | 47 - .../fleet_engine/v1/trip_service/paths.rb | 50 - .../maps/fleet_engine/v1/trip_service/rest.rb | 52 - .../v1/trip_service/rest/client.rb | 1062 ------ .../v1/trip_service/rest/service_stub.rb | 451 --- .../maps/fleet_engine/v1/vehicle_service.rb | 55 - .../fleet_engine/v1/vehicle_service/client.rb | 1463 -------- .../v1/vehicle_service/credentials.rb | 47 - .../fleet_engine/v1/vehicle_service/paths.rb | 50 - .../fleet_engine/v1/vehicle_service/rest.rb | 52 - .../v1/vehicle_service/rest/client.rb | 1364 ------- .../v1/vehicle_service/rest/service_stub.rb | 512 --- .../google/maps/fleet_engine/v1/version.rb | 28 - .../maps/fleetengine/v1/fleetengine_pb.rb | 39 - .../google/maps/fleetengine/v1/header_pb.rb | 25 - .../google/maps/fleetengine/v1/traffic_pb.rb | 23 - .../google/maps/fleetengine/v1/trip_api_pb.rb | 41 - .../fleetengine/v1/trip_api_services_pb.rb | 58 - .../google/maps/fleetengine/v1/trips_pb.rb | 34 - .../maps/fleetengine/v1/vehicle_api_pb.rb | 52 - .../fleetengine/v1/vehicle_api_services_pb.rb | 108 - .../google/maps/fleetengine/v1/vehicles_pb.rb | 40 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../google/maps/fleetengine/v1/fleetengine.rb | 394 -- .../google/maps/fleetengine/v1/header.rb | 111 - .../google/maps/fleetengine/v1/traffic.rb | 76 - .../google/maps/fleetengine/v1/trip_api.rb | 312 -- .../google/maps/fleetengine/v1/trips.rb | 289 -- .../google/maps/fleetengine/v1/vehicle_api.rb | 674 ---- .../google/maps/fleetengine/v1/vehicles.rb | 365 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../snippet_metadata_maps.fleetengine.v1.json | 535 --- .../snippets/trip_service/create_trip.rb | 47 - .../snippets/trip_service/delete_trip.rb | 47 - .../snippets/trip_service/get_trip.rb | 47 - .../trip_service/report_billable_trip.rb | 47 - .../snippets/trip_service/search_trips.rb | 51 - .../snippets/trip_service/update_trip.rb | 47 - .../vehicle_service/create_vehicle.rb | 47 - .../vehicle_service/delete_vehicle.rb | 47 - .../snippets/vehicle_service/get_vehicle.rb | 47 - .../snippets/vehicle_service/list_vehicles.rb | 51 - .../vehicle_service/search_vehicles.rb | 47 - .../vehicle_service/update_vehicle.rb | 47 - .../update_vehicle_attributes.rb | 47 - .../v1/trip_service_paths_test.rb | 55 - .../fleet_engine/v1/trip_service_rest_test.rb | 447 --- .../maps/fleet_engine/v1/trip_service_test.rb | 505 --- .../v1/vehicle_service_paths_test.rb | 55 - .../v1/vehicle_service_rest_test.rb | 520 --- .../fleet_engine/v1/vehicle_service_test.rb | 601 --- .../test/helper.rb | 35 - .../google-shopping-css-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-shopping-css-v1/.rubocop.yml | 33 - .../google-shopping-css-v1/.toys.rb | 28 - .../google-shopping-css-v1/.yardopts | 12 - .../google-shopping-css-v1/AUTHENTICATION.md | 122 - .../google-shopping-css-v1/CHANGELOG.md | 2 - .../google-shopping-css-v1/Gemfile | 15 - .../google-shopping-css-v1/LICENSE.md | 201 - .../google-shopping-css-v1/README.md | 154 - .../google-shopping-css-v1/Rakefile | 169 - .../gapic_metadata.json | 119 - .../google-shopping-css-v1.gemspec | 29 - .../lib/google-shopping-css-v1.rb | 21 - .../lib/google/shopping/css/v1.rb | 49 - .../shopping/css/v1/account_labels_service.rb | 55 - .../css/v1/account_labels_service/client.rb | 785 ---- .../v1/account_labels_service/credentials.rb | 47 - .../css/v1/account_labels_service/paths.rb | 64 - .../css/v1/account_labels_service/rest.rb | 52 - .../v1/account_labels_service/rest/client.rb | 714 ---- .../rest/service_stub.rb | 327 -- .../shopping/css/v1/accounts_labels_pb.rb | 33 - .../css/v1/accounts_labels_services_pb.rb | 51 - .../lib/google/shopping/css/v1/accounts_pb.rb | 31 - .../shopping/css/v1/accounts_service.rb | 55 - .../css/v1/accounts_service/client.rb | 709 ---- .../css/v1/accounts_service/credentials.rb | 47 - .../shopping/css/v1/accounts_service/paths.rb | 47 - .../shopping/css/v1/accounts_service/rest.rb | 52 - .../css/v1/accounts_service/rest/client.rb | 645 ---- .../v1/accounts_service/rest/service_stub.rb | 265 -- .../shopping/css/v1/accounts_services_pb.rb | 50 - .../shopping/css/v1/css_product_common_pb.rb | 35 - .../shopping/css/v1/css_product_inputs_pb.rb | 34 - .../css/v1/css_product_inputs_service.rb | 56 - .../v1/css_product_inputs_service/client.rb | 716 ---- .../css_product_inputs_service/credentials.rb | 47 - .../v1/css_product_inputs_service/paths.rb | 64 - .../css/v1/css_product_inputs_service/rest.rb | 53 - .../css_product_inputs_service/rest/client.rb | 652 ---- .../rest/service_stub.rb | 266 -- .../css/v1/css_product_inputs_services_pb.rb | 61 - .../google/shopping/css/v1/css_products_pb.rb | 31 - .../shopping/css/v1/css_products_service.rb | 56 - .../css/v1/css_products_service/client.rb | 606 --- .../v1/css_products_service/credentials.rb | 47 - .../css/v1/css_products_service/paths.rb | 64 - .../css/v1/css_products_service/rest.rb | 53 - .../v1/css_products_service/rest/client.rb | 549 --- .../css_products_service/rest/service_stub.rb | 203 - .../css/v1/css_products_services_pb.rb | 56 - .../lib/google/shopping/css/v1/quota_pb.rb | 29 - .../google/shopping/css/v1/quota_service.rb | 55 - .../shopping/css/v1/quota_service/client.rb | 495 --- .../css/v1/quota_service/credentials.rb | 47 - .../shopping/css/v1/quota_service/paths.rb | 47 - .../shopping/css/v1/quota_service/rest.rb | 52 - .../css/v1/quota_service/rest/client.rb | 445 --- .../css/v1/quota_service/rest/service_stub.rb | 142 - .../shopping/css/v1/quota_services_pb.rb | 45 - .../lib/google/shopping/css/v1/rest.rb | 41 - .../lib/google/shopping/css/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../google/shopping/css/v1/accounts.rb | 171 - .../google/shopping/css/v1/accounts_labels.rb | 131 - .../shopping/css/v1/css_product_common.rb | 436 --- .../shopping/css/v1/css_product_inputs.rb | 169 - .../google/shopping/css/v1/css_products.rb | 110 - .../google/shopping/css/v1/quota.rb | 110 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../google-shopping-css-v1/snippets/Gemfile | 32 - .../create_account_label.rb | 47 - .../delete_account_label.rb | 47 - .../list_account_labels.rb | 51 - .../update_account_label.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_child_accounts.rb | 51 - .../accounts_service/update_labels.rb | 47 - .../delete_css_product_input.rb | 47 - .../insert_css_product_input.rb | 47 - .../update_css_product_input.rb | 47 - .../css_products_service/get_css_product.rb | 47 - .../css_products_service/list_css_products.rb | 51 - .../quota_service/list_quota_groups.rb | 51 - ...ippet_metadata_google.shopping.css.v1.json | 535 --- .../v1/account_labels_service_paths_test.rb | 67 - .../v1/account_labels_service_rest_test.rb | 318 -- .../css/v1/account_labels_service_test.rb | 347 -- .../css/v1/accounts_service_paths_test.rb | 55 - .../css/v1/accounts_service_rest_test.rb | 268 -- .../shopping/css/v1/accounts_service_test.rb | 301 -- .../css_product_inputs_service_paths_test.rb | 67 - .../css_product_inputs_service_rest_test.rb | 265 -- .../css/v1/css_product_inputs_service_test.rb | 287 -- .../css/v1/css_products_service_paths_test.rb | 67 - .../css/v1/css_products_service_rest_test.rb | 209 -- .../css/v1/css_products_service_test.rb | 229 -- .../css/v1/quota_service_paths_test.rb | 55 - .../css/v1/quota_service_rest_test.rb | 155 - .../shopping/css/v1/quota_service_test.rb | 171 - .../google-shopping-css-v1/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 504 --- ...-shopping-merchant-accounts-v1beta.gemspec | 29 - ...oogle-shopping-merchant-accounts-v1beta.rb | 21 - .../shopping/merchant/accounts/v1beta.rb | 66 - .../accounts/v1beta/accessright_pb.rb | 23 - .../accounts/v1beta/account_issue_service.rb | 57 - .../v1beta/account_issue_service/client.rb | 509 --- .../account_issue_service/credentials.rb | 49 - .../v1beta/account_issue_service/paths.rb | 49 - .../v1beta/account_issue_service/rest.rb | 54 - .../account_issue_service/rest/client.rb | 459 --- .../rest/service_stub.rb | 144 - .../accounts/v1beta/account_tax_pb.rb | 34 - .../accounts/v1beta/account_tax_service.rb | 61 - .../v1beta/account_tax_service/client.rb | 688 ---- .../v1beta/account_tax_service/credentials.rb | 49 - .../v1beta/account_tax_service/paths.rb | 66 - .../v1beta/account_tax_service/rest.rb | 58 - .../v1beta/account_tax_service/rest/client.rb | 624 ---- .../account_tax_service/rest/service_stub.rb | 267 -- .../v1beta/account_tax_services_pb.rb | 58 - .../accounts/v1beta/accountissue_pb.rb | 34 - .../v1beta/accountissue_services_pb.rb | 47 - .../merchant/accounts/v1beta/accounts_pb.rb | 43 - .../accounts/v1beta/accounts_service.rb | 57 - .../v1beta/accounts_service/client.rb | 1000 ----- .../v1beta/accounts_service/credentials.rb | 49 - .../accounts/v1beta/accounts_service/paths.rb | 80 - .../accounts/v1beta/accounts_service/rest.rb | 54 - .../v1beta/accounts_service/rest/client.rb | 931 ----- .../accounts_service/rest/service_stub.rb | 447 --- .../accounts/v1beta/accounts_services_pb.rb | 75 - .../accounts/v1beta/accountservices_pb.rb | 28 - .../v1beta/autofeed_settings_service.rb | 58 - .../autofeed_settings_service/client.rb | 579 --- .../autofeed_settings_service/credentials.rb | 49 - .../v1beta/autofeed_settings_service/paths.rb | 49 - .../v1beta/autofeed_settings_service/rest.rb | 55 - .../autofeed_settings_service/rest/client.rb | 522 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/autofeedsettings_pb.rb | 31 - .../v1beta/autofeedsettings_services_pb.rb | 50 - .../v1beta/automatic_improvements_service.rb | 59 - .../automatic_improvements_service/client.rb | 589 --- .../credentials.rb | 49 - .../automatic_improvements_service/paths.rb | 49 - .../automatic_improvements_service/rest.rb | 56 - .../rest/client.rb | 532 --- .../rest/service_stub.rb | 206 - .../v1beta/automaticimprovements_pb.rb | 36 - .../automaticimprovements_services_pb.rb | 51 - .../v1beta/business_identity_service.rb | 58 - .../business_identity_service/client.rb | 580 --- .../business_identity_service/credentials.rb | 49 - .../v1beta/business_identity_service/paths.rb | 49 - .../v1beta/business_identity_service/rest.rb | 55 - .../business_identity_service/rest/client.rb | 523 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/business_info_service.rb | 57 - .../v1beta/business_info_service/client.rb | 579 --- .../business_info_service/credentials.rb | 49 - .../v1beta/business_info_service/paths.rb | 49 - .../v1beta/business_info_service/rest.rb | 54 - .../business_info_service/rest/client.rb | 522 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/businessidentity_pb.rb | 34 - .../v1beta/businessidentity_services_pb.rb | 51 - .../accounts/v1beta/businessinfo_pb.rb | 35 - .../v1beta/businessinfo_services_pb.rb | 50 - .../v1beta/checkout_settings_service.rb | 58 - .../checkout_settings_service/client.rb | 776 ---- .../checkout_settings_service/credentials.rb | 49 - .../v1beta/checkout_settings_service/paths.rb | 69 - .../v1beta/checkout_settings_service/rest.rb | 55 - .../checkout_settings_service/rest/client.rb | 705 ---- .../rest/service_stub.rb | 329 -- .../accounts/v1beta/checkoutsettings_pb.rb | 38 - .../v1beta/checkoutsettings_services_pb.rb | 56 - .../accounts/v1beta/customerservice_pb.rb | 26 - .../v1beta/email_preferences_service.rb | 60 - .../email_preferences_service/client.rb | 594 --- .../email_preferences_service/credentials.rb | 49 - .../v1beta/email_preferences_service/paths.rb | 52 - .../v1beta/email_preferences_service/rest.rb | 57 - .../email_preferences_service/rest/client.rb | 537 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/emailpreferences_pb.rb | 32 - .../v1beta/emailpreferences_services_pb.rb | 65 - .../accounts/v1beta/gbp_accounts_service.rb | 60 - .../v1beta/gbp_accounts_service/client.rb | 600 --- .../gbp_accounts_service/credentials.rb | 49 - .../v1beta/gbp_accounts_service/paths.rb | 49 - .../v1beta/gbp_accounts_service/rest.rb | 57 - .../gbp_accounts_service/rest/client.rb | 543 --- .../gbp_accounts_service/rest/service_stub.rb | 206 - .../accounts/v1beta/gbpaccounts_pb.rb | 34 - .../v1beta/gbpaccounts_services_pb.rb | 52 - .../merchant/accounts/v1beta/homepage_pb.rb | 33 - .../accounts/v1beta/homepage_service.rb | 57 - .../v1beta/homepage_service/client.rb | 777 ---- .../v1beta/homepage_service/credentials.rb | 49 - .../accounts/v1beta/homepage_service/paths.rb | 49 - .../accounts/v1beta/homepage_service/rest.rb | 54 - .../v1beta/homepage_service/rest/client.rb | 706 ---- .../homepage_service/rest/service_stub.rb | 330 -- .../accounts/v1beta/homepage_services_pb.rb | 66 - .../accounts/v1beta/lfp_providers_service.rb | 59 - .../v1beta/lfp_providers_service/client.rb | 603 --- .../lfp_providers_service/credentials.rb | 49 - .../v1beta/lfp_providers_service/paths.rb | 71 - .../v1beta/lfp_providers_service/rest.rb | 56 - .../lfp_providers_service/rest/client.rb | 546 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/lfpproviders_pb.rb | 33 - .../v1beta/lfpproviders_services_pb.rb | 51 - .../v1beta/omnichannel_settings_service.rb | 60 - .../omnichannel_settings_service/client.rb | 894 ----- .../credentials.rb | 49 - .../omnichannel_settings_service/paths.rb | 66 - .../omnichannel_settings_service/rest.rb | 57 - .../rest/client.rb | 816 ---- .../rest/service_stub.rb | 391 -- .../accounts/v1beta/omnichannelsettings_pb.rb | 46 - .../v1beta/omnichannelsettings_services_pb.rb | 58 - .../v1beta/online_return_policy_pb.rb | 47 - .../v1beta/online_return_policy_service.rb | 61 - .../online_return_policy_service/client.rb | 899 ----- .../credentials.rb | 49 - .../online_return_policy_service/paths.rb | 66 - .../online_return_policy_service/rest.rb | 58 - .../rest/client.rb | 821 ---- .../rest/service_stub.rb | 390 -- .../online_return_policy_services_pb.rb | 59 - .../v1beta/phoneverificationstate_pb.rb | 23 - .../merchant/accounts/v1beta/programs_pb.rb | 35 - .../accounts/v1beta/programs_service.rb | 67 - .../v1beta/programs_service/client.rb | 788 ---- .../v1beta/programs_service/credentials.rb | 49 - .../accounts/v1beta/programs_service/paths.rb | 66 - .../accounts/v1beta/programs_service/rest.rb | 64 - .../v1beta/programs_service/rest/client.rb | 717 ---- .../programs_service/rest/service_stub.rb | 329 -- .../accounts/v1beta/programs_services_pb.rb | 65 - .../merchant/accounts/v1beta/regions_pb.rb | 40 - .../accounts/v1beta/regions_service.rb | 61 - .../accounts/v1beta/regions_service/client.rb | 888 ----- .../v1beta/regions_service/credentials.rb | 49 - .../accounts/v1beta/regions_service/paths.rb | 66 - .../accounts/v1beta/regions_service/rest.rb | 58 - .../v1beta/regions_service/rest/client.rb | 810 ---- .../regions_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/regions_services_pb.rb | 62 - .../shopping/merchant/accounts/v1beta/rest.rb | 58 - .../v1beta/shipping_settings_service.rb | 58 - .../shipping_settings_service/client.rb | 576 --- .../shipping_settings_service/credentials.rb | 49 - .../v1beta/shipping_settings_service/paths.rb | 49 - .../v1beta/shipping_settings_service/rest.rb | 55 - .../shipping_settings_service/rest/client.rb | 519 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/shippingsettings_pb.rb | 61 - .../v1beta/shippingsettings_services_pb.rb | 51 - .../merchant/accounts/v1beta/tax_rule_pb.rb | 27 - ...erms_of_service_agreement_state_service.rb | 57 - .../client.rb | 578 --- .../credentials.rb | 49 - .../paths.rb | 66 - .../rest.rb | 54 - .../rest/client.rb | 521 --- .../rest/service_stub.rb | 205 - .../v1beta/terms_of_service_service.rb | 57 - .../v1beta/terms_of_service_service/client.rb | 672 ---- .../terms_of_service_service/credentials.rb | 49 - .../v1beta/terms_of_service_service/paths.rb | 63 - .../v1beta/terms_of_service_service/rest.rb | 54 - .../terms_of_service_service/rest/client.rb | 616 --- .../rest/service_stub.rb | 264 -- .../accounts/v1beta/termsofservice_pb.rb | 33 - .../v1beta/termsofservice_services_pb.rb | 52 - .../v1beta/termsofserviceagreementstate_pb.rb | 34 - ...ermsofserviceagreementstate_services_pb.rb | 49 - .../accounts/v1beta/termsofservicekind_pb.rb | 23 - .../merchant/accounts/v1beta/user_pb.rb | 38 - .../merchant/accounts/v1beta/user_service.rb | 57 - .../accounts/v1beta/user_service/client.rb | 891 ----- .../v1beta/user_service/credentials.rb | 49 - .../accounts/v1beta/user_service/paths.rb | 66 - .../accounts/v1beta/user_service/rest.rb | 54 - .../v1beta/user_service/rest/client.rb | 813 ---- .../v1beta/user_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/user_services_pb.rb | 58 - .../v1beta/verificationmailsettings_pb.rb | 26 - .../merchant/accounts/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../merchant/accounts/v1beta/accessright.rb | 43 - .../merchant/accounts/v1beta/account_tax.rb | 101 - .../merchant/accounts/v1beta/accountissue.rb | 142 - .../merchant/accounts/v1beta/accounts.rb | 231 -- .../accounts/v1beta/accountservices.rb | 34 - .../accounts/v1beta/autofeedsettings.rb | 75 - .../accounts/v1beta/automaticimprovements.rb | 235 -- .../accounts/v1beta/businessidentity.rb | 129 - .../merchant/accounts/v1beta/businessinfo.rb | 77 - .../accounts/v1beta/checkoutsettings.rb | 185 - .../accounts/v1beta/customerservice.rb | 43 - .../accounts/v1beta/emailpreferences.rb | 82 - .../merchant/accounts/v1beta/gbpaccounts.rb | 123 - .../merchant/accounts/v1beta/homepage.rb | 87 - .../merchant/accounts/v1beta/lfpproviders.rb | 108 - .../accounts/v1beta/omnichannelsettings.rb | 336 -- .../accounts/v1beta/online_return_policy.rb | 345 -- .../accounts/v1beta/phoneverificationstate.rb | 40 - .../merchant/accounts/v1beta/programs.rb | 160 - .../merchant/accounts/v1beta/regions.rb | 195 - .../accounts/v1beta/shippingsettings.rb | 747 ---- .../merchant/accounts/v1beta/tax_rule.rb | 96 - .../accounts/v1beta/termsofservice.rb | 99 - .../v1beta/termsofserviceagreementstate.rb | 135 - .../accounts/v1beta/termsofservicekind.rb | 37 - .../shopping/merchant/accounts/v1beta/user.rb | 156 - .../v1beta/verificationmailsettings.rb | 53 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 56 - .../proto_docs/google/type/datetime.rb | 104 - .../proto_docs/google/type/interval.rb | 45 - .../proto_docs/google/type/phone_number.rb | 122 - .../proto_docs/google/type/postal_address.rb | 136 - .../snippets/Gemfile | 32 - .../list_account_issues.rb | 51 - .../account_tax_service/get_account_tax.rb | 47 - .../account_tax_service/list_account_tax.rb | 51 - .../account_tax_service/update_account_tax.rb | 47 - .../create_and_configure_account.rb | 47 - .../accounts_service/delete_account.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_accounts.rb | 51 - .../accounts_service/list_sub_accounts.rb | 51 - .../accounts_service/update_account.rb | 47 - .../get_autofeed_settings.rb | 47 - .../update_autofeed_settings.rb | 47 - .../get_automatic_improvements.rb | 47 - .../update_automatic_improvements.rb | 47 - .../get_business_identity.rb | 47 - .../update_business_identity.rb | 47 - .../get_business_info.rb | 47 - .../update_business_info.rb | 47 - .../create_checkout_settings.rb | 47 - .../delete_checkout_settings.rb | 47 - .../get_checkout_settings.rb | 47 - .../update_checkout_settings.rb | 47 - .../get_email_preferences.rb | 47 - .../update_email_preferences.rb | 47 - .../gbp_accounts_service/link_gbp_account.rb | 47 - .../gbp_accounts_service/list_gbp_accounts.rb | 51 - .../homepage_service/claim_homepage.rb | 47 - .../snippets/homepage_service/get_homepage.rb | 47 - .../homepage_service/unclaim_homepage.rb | 47 - .../homepage_service/update_homepage.rb | 47 - .../find_lfp_providers.rb | 51 - .../link_lfp_provider.rb | 47 - .../create_omnichannel_setting.rb | 47 - .../get_omnichannel_setting.rb | 47 - .../list_omnichannel_settings.rb | 51 - .../request_inventory_verification.rb | 47 - .../update_omnichannel_setting.rb | 47 - .../create_online_return_policy.rb | 47 - .../delete_online_return_policy.rb | 47 - .../get_online_return_policy.rb | 47 - .../list_online_return_policies.rb | 51 - .../update_online_return_policy.rb | 47 - .../programs_service/disable_program.rb | 47 - .../programs_service/enable_program.rb | 47 - .../snippets/programs_service/get_program.rb | 47 - .../programs_service/list_programs.rb | 51 - .../snippets/regions_service/create_region.rb | 47 - .../snippets/regions_service/delete_region.rb | 47 - .../snippets/regions_service/get_region.rb | 47 - .../snippets/regions_service/list_regions.rb | 51 - .../snippets/regions_service/update_region.rb | 47 - .../get_shipping_settings.rb | 47 - .../insert_shipping_settings.rb | 47 - ...gle.shopping.merchant.accounts.v1beta.json | 2535 ------------- .../get_terms_of_service_agreement_state.rb | 47 - ...cation_terms_of_service_agreement_state.rb | 47 - .../accept_terms_of_service.rb | 47 - .../get_terms_of_service.rb | 47 - .../retrieve_latest_terms_of_service.rb | 47 - .../snippets/user_service/create_user.rb | 47 - .../snippets/user_service/delete_user.rb | 47 - .../snippets/user_service/get_user.rb | 47 - .../snippets/user_service/list_users.rb | 51 - .../snippets/user_service/update_user.rb | 47 - .../account_issue_service_paths_test.rb | 55 - .../v1beta/account_issue_service_rest_test.rb | 157 - .../v1beta/account_issue_service_test.rb | 175 - .../v1beta/account_tax_service_paths_test.rb | 67 - .../v1beta/account_tax_service_rest_test.rb | 264 -- .../v1beta/account_tax_service_test.rb | 289 -- .../v1beta/accounts_service_paths_test.rb | 79 - .../v1beta/accounts_service_rest_test.rb | 432 --- .../accounts/v1beta/accounts_service_test.rb | 481 --- .../autofeed_settings_service_paths_test.rb | 55 - .../autofeed_settings_service_rest_test.rb | 208 -- .../v1beta/autofeed_settings_service_test.rb | 222 -- ...tomatic_improvements_service_paths_test.rb | 55 - ...utomatic_improvements_service_rest_test.rb | 208 -- .../automatic_improvements_service_test.rb | 222 -- .../business_identity_service_paths_test.rb | 55 - .../business_identity_service_rest_test.rb | 208 -- .../v1beta/business_identity_service_test.rb | 222 -- .../business_info_service_paths_test.rb | 55 - .../v1beta/business_info_service_rest_test.rb | 208 -- .../v1beta/business_info_service_test.rb | 222 -- .../checkout_settings_service_paths_test.rb | 67 - .../checkout_settings_service_rest_test.rb | 317 -- .../v1beta/checkout_settings_service_test.rb | 340 -- .../email_preferences_service_paths_test.rb | 55 - .../email_preferences_service_rest_test.rb | 208 -- .../v1beta/email_preferences_service_test.rb | 222 -- .../v1beta/gbp_accounts_service_paths_test.rb | 55 - .../v1beta/gbp_accounts_service_rest_test.rb | 210 -- .../v1beta/gbp_accounts_service_test.rb | 231 -- .../v1beta/homepage_service_paths_test.rb | 55 - .../v1beta/homepage_service_rest_test.rb | 316 -- .../accounts/v1beta/homepage_service_test.rb | 338 -- .../lfp_providers_service_paths_test.rb | 67 - .../v1beta/lfp_providers_service_rest_test.rb | 210 -- .../v1beta/lfp_providers_service_test.rb | 231 -- ...omnichannel_settings_service_paths_test.rb | 67 - .../omnichannel_settings_service_rest_test.rb | 373 -- .../omnichannel_settings_service_test.rb | 407 -- ...online_return_policy_service_paths_test.rb | 67 - .../online_return_policy_service_rest_test.rb | 373 -- .../online_return_policy_service_test.rb | 407 -- .../v1beta/programs_service_paths_test.rb | 67 - .../v1beta/programs_service_rest_test.rb | 317 -- .../accounts/v1beta/programs_service_test.rb | 345 -- .../v1beta/regions_service_paths_test.rb | 67 - .../v1beta/regions_service_rest_test.rb | 374 -- .../accounts/v1beta/regions_service_test.rb | 409 -- .../shipping_settings_service_paths_test.rb | 55 - .../shipping_settings_service_rest_test.rb | 208 -- .../v1beta/shipping_settings_service_test.rb | 222 -- ...vice_agreement_state_service_paths_test.rb | 67 - ...rvice_agreement_state_service_rest_test.rb | 207 -- ...of_service_agreement_state_service_test.rb | 220 -- .../terms_of_service_service_paths_test.rb | 67 - .../terms_of_service_service_rest_test.rb | 264 -- .../v1beta/terms_of_service_service_test.rb | 284 -- .../v1beta/user_service_paths_test.rb | 67 - .../accounts/v1beta/user_service_rest_test.rb | 374 -- .../accounts/v1beta/user_service_test.rb | 409 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...e-shopping-merchant-conversions-v1.gemspec | 28 - ...google-shopping-merchant-conversions-v1.rb | 21 - .../shopping/merchant/conversions/v1.rb | 47 - .../v1/conversion_sources_service.rb | 57 - .../v1/conversion_sources_service/client.rb | 975 ----- .../conversion_sources_service/credentials.rb | 49 - .../v1/conversion_sources_service/paths.rb | 66 - .../v1/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 890 ----- .../rest/service_stub.rb | 452 --- .../conversions/v1/conversionsources_pb.rb | 45 - .../v1/conversionsources_services_pb.rb | 62 - .../shopping/merchant/conversions/v1/rest.rb | 39 - .../merchant/conversions/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../conversions/v1/conversionsources.rb | 289 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ...ogle.shopping.merchant.conversions.v1.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...opping-merchant-conversions-v1beta.gemspec | 28 - ...le-shopping-merchant-conversions-v1beta.rb | 21 - .../shopping/merchant/conversions/v1beta.rb | 47 - .../v1beta/conversion_sources_service.rb | 57 - .../conversion_sources_service/client.rb | 975 ----- .../conversion_sources_service/credentials.rb | 49 - .../conversion_sources_service/paths.rb | 66 - .../v1beta/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 890 ----- .../rest/service_stub.rb | 452 --- .../v1beta/conversionsources_pb.rb | 45 - .../v1beta/conversionsources_services_pb.rb | 62 - .../merchant/conversions/v1beta/rest.rb | 39 - .../merchant/conversions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../conversions/v1beta/conversionsources.rb | 290 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ....shopping.merchant.conversions.v1beta.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1beta/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 35 - 2812 files changed, 1326 insertions(+), 310374 deletions(-) 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-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-workload_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/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/field_info.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/field_info.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/push_credentials.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-developers-developer_knowledge-v1/.gitignore delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/README.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/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-v2/.gitignore delete mode 100644 owl-bot-staging/google-iam-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v2/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v2/.yardopts delete mode 100644 owl-bot-staging/google-iam-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v2/Gemfile delete mode 100644 owl-bot-staging/google-iam-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v2/README.md delete mode 100644 owl-bot-staging/google-iam-v2/Rakefile delete mode 100644 owl-bot-staging/google-iam-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v2/google-iam-v2.gemspec delete mode 100644 owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-v3/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3/README.md delete mode 100644 owl-bot-staging/google-iam-v3/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/google-iam-v3.gemspec delete mode 100644 owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3beta/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3beta/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/helper.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-css-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-css-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-css-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb diff --git a/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json b/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json index 723b6d18419c..6b8b6584ba64 100644 --- a/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json +++ b/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json @@ -75,6 +75,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-web_security_scanner-v1beta/.toys.rb b/google-cloud-web_security_scanner-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-web_security_scanner-v1beta/.toys.rb +++ b/google-cloud-web_security_scanner-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/Rakefile b/google-cloud-web_security_scanner-v1beta/Rakefile index 307715c48e8f..32e97681638d 100644 --- a/google-cloud-web_security_scanner-v1beta/Rakefile +++ b/google-cloud-web_security_scanner-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb b/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb index 479f184b740e..aa99555f2dd3 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb index cc49d5253bf9..42ef3ae8aa7c 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb index 9fd194489416..3c7b745ca0ac 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb index bf48649a5e89..e4d014ad6c61 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb index 15dff214059c..29f093951a00 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb index 543a02336fb1..9237239dac26 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb index f5e93086df12..035cb9ea1502 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb index cdadad39d709..cc7e1c7d1fdd 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb index 84bec82f8dd3..59b89648ea0d 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb index d220d8e25a7c..bcd26bf90ea5 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb index 5743498e0bc2..d1cdbdcd623f 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb index ff11ed8dc2dd..16a4684b0a87 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb index 30b08a65a27d..b6d583c7a7df 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb index c2d60a503172..950dc9db788a 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb index ef6f60a583a7..a04437f47106 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb index 991f82c12b7d..b814049f15c4 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb index e270c88dc761..35cbd2e7b0f4 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb index fa52f0ed3e47..2ee0a0f3dc7b 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb index 5bf82be259d8..9a4290f473e2 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb index 21fd01e9579e..14ef8134f765 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb index e5b1793ff19a..5c0a8825ce30 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-web_security_scanner-v1beta/snippets/Gemfile b/google-cloud-web_security_scanner-v1beta/snippets/Gemfile index b18c6577579e..2cf622627fe6 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/Gemfile +++ b/google-cloud-web_security_scanner-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb index a179dd0f1ee1..72531ba34f7c 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb index de6648bda49e..4edf65f51798 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb index ce7dea9460cf..31b8a781be9a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb index fba93437c7dc..54d205419154 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb index fa9473697bb2..849242e39e6a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb index c069dea4d680..5909d290f3fe 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb index 7ec5d2616461..c3c3e83e332a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb index cc2ac91f02da..942fcec7e55d 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb index cf0e6efca042..654d77988f2c 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb index d89ba68af91b..37835b22f132 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb index ce716f8096f9..645b424b6b29 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb index bd3e8da936e7..894d270fec3b 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb index 99c25a302aef..7803724b8906 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb index 0c534a923317..8b06894bb244 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb index e6db5f89648b..967f3a73832e 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb index 60805f77b09b..8d7b2344ec03 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/helper.rb b/google-cloud-web_security_scanner-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-web_security_scanner-v1beta/test/helper.rb +++ b/google-cloud-web_security_scanner-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/.owlbot-manifest.json b/google-cloud-workflows-executions-v1/.owlbot-manifest.json index 768fb671eec5..1f5e7f19e97e 100644 --- a/google-cloud-workflows-executions-v1/.owlbot-manifest.json +++ b/google-cloud-workflows-executions-v1/.owlbot-manifest.json @@ -46,6 +46,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-executions-v1/.toys.rb b/google-cloud-workflows-executions-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-executions-v1/.toys.rb +++ b/google-cloud-workflows-executions-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/Rakefile b/google-cloud-workflows-executions-v1/Rakefile index df712a496255..44509fa79f79 100644 --- a/google-cloud-workflows-executions-v1/Rakefile +++ b/google-cloud-workflows-executions-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb b/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb index 4bf9e94d3eba..fc4b162a318b 100644 --- a/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb +++ b/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb index f3dfd21e3bdb..3c540505d083 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb index 1b0a1d6d62b2..b39a54aa895b 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb index 5bd27192dd64..ea2a952f4319 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb index bd13968d2d71..6a4511ebd935 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb index 7de4f6545bd7..4cbadc66f285 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb index a68aedffc9f1..46394ec79f74 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb index 558760515b65..c95d43b8e04d 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb index c030b6a27037..5c82daaa16de 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb index 9811e5b7f5c0..c6a331fde8df 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/workflows/executions/v1/executions.proto for package 'google.cloud.workflows.executions.v1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb index 161d12ebeaf1..a230b9e48d83 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb b/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb index 23315182cfb1..857f5d110040 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-executions-v1/snippets/Gemfile b/google-cloud-workflows-executions-v1/snippets/Gemfile index 2d8cda0be363..7daeaea34a37 100755 --- a/google-cloud-workflows-executions-v1/snippets/Gemfile +++ b/google-cloud-workflows-executions-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb index e8345731c623..62751576d96a 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb index 6d43196669c5..e18a26220cc7 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb index 8074bc61a03a..606f5d673467 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb b/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb index 0e6d9b46bc29..71b5474a1300 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb index c10f0660cd9b..72a7af7dcf6e 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb index 6bc924013bd0..0f90ae8cb19d 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb index aa2f6353c97d..d372ed41a44a 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/helper.rb b/google-cloud-workflows-executions-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-workflows-executions-v1/test/helper.rb +++ b/google-cloud-workflows-executions-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json b/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json index 5e8aa6d5ef94..aa5ed9b3b558 100644 --- a/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json +++ b/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json @@ -41,6 +41,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-executions-v1beta/.toys.rb b/google-cloud-workflows-executions-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-executions-v1beta/.toys.rb +++ b/google-cloud-workflows-executions-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/Rakefile b/google-cloud-workflows-executions-v1beta/Rakefile index 21e21b324a81..fa9f3f6dac59 100644 --- a/google-cloud-workflows-executions-v1beta/Rakefile +++ b/google-cloud-workflows-executions-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb b/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb index 25466b7d3851..2e0636bb1b59 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb index 3fed66d971d4..f86ef8bc398c 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb index d13eafd66360..10f6adbe5ec1 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb index 79c5f540f345..d4fb4d8aa377 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb index c71df9c5569c..82a81fac37cc 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb index a144c564bae6..91d5836ff754 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb index 535a59f954fd..fc57272d1ea2 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/workflows/executions/v1beta/executions.proto for package 'google.cloud.workflows.executions.v1beta' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb index 24768f0511be..155d545071b2 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-executions-v1beta/snippets/Gemfile b/google-cloud-workflows-executions-v1beta/snippets/Gemfile index 68e763424279..16f945ec033e 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/Gemfile +++ b/google-cloud-workflows-executions-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb index c50060f28ffd..8f7f3934284c 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb index 4fb77cd5ecee..926c4489f51d 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb index 7529e7ee8ec1..58e0a552a8ab 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb index b556a17f1357..a8f00e5f1390 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb index be34ed2dd584..d23ec98d8085 100644 --- a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb +++ b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb index 044009dbfe89..578052bdc7b5 100644 --- a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb +++ b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/helper.rb b/google-cloud-workflows-executions-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-workflows-executions-v1beta/test/helper.rb +++ b/google-cloud-workflows-executions-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/.owlbot-manifest.json b/google-cloud-workflows-v1/.owlbot-manifest.json index 907b68dea26e..388ef0466032 100644 --- a/google-cloud-workflows-v1/.owlbot-manifest.json +++ b/google-cloud-workflows-v1/.owlbot-manifest.json @@ -57,6 +57,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-v1/.toys.rb b/google-cloud-workflows-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-v1/.toys.rb +++ b/google-cloud-workflows-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/Rakefile b/google-cloud-workflows-v1/Rakefile index 36860b03f7ec..13816b0b43f6 100644 --- a/google-cloud-workflows-v1/Rakefile +++ b/google-cloud-workflows-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb b/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb index f1b4e4ac5d06..1b638a3e422e 100644 --- a/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb +++ b/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb index fa37e8eeae0b..bda78f5b4bc6 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb index 554edcc50928..793a02bd64cd 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb index 0712e5feb5bb..16f410759b32 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb index ed11a3f2ec19..f4818691ad45 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb index 0ed3956990d9..63a66d7d6400 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb index 024d93f36d25..2c4bc8c1e0e6 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb index ab6de9b2c767..f1ff4db6066f 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb index 5859ea794f80..7c5a1c321b45 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb index 7fb714a54d19..250354de6315 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb index 9ef9e4d71bab..766c6a240c0e 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb index 9eb251ec2291..d1fc051655e0 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb index 29a3b8d39c58..c36b18474d53 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb index b2dbf1aeacc6..d568aa342f04 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/client.rb b/google-cloud-workflows-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/resource.rb b/google-cloud-workflows-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb b/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb index 4a18a06bf8b9..78a09faef384 100644 --- a/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb +++ b/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb b/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/Gemfile b/google-cloud-workflows-v1/snippets/Gemfile index 0b27239ffd9b..3f40a63d2540 100755 --- a/google-cloud-workflows-v1/snippets/Gemfile +++ b/google-cloud-workflows-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb index 782cdb001304..57bb5d7052f6 100755 --- a/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb index 2095c67bc0c5..ee3a675341df 100755 --- a/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb index 1ba450b87282..8e945eb77b52 100755 --- a/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb b/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb index 333f807257d1..24fa4adf9ff9 100644 --- a/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb +++ b/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb b/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb index 8aa0409869b7..423d261480f1 100755 --- a/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb +++ b/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb index 0d49aa8eef16..20e240695166 100755 --- a/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb index 29973edbe744..16718a9ef007 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb index 45c7d8db0c5d..940534eeb434 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb index 9cc32ec0729d..cf13cbce88dc 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb index 6b5028e8e6f6..c48d4214d226 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/helper.rb b/google-cloud-workflows-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-workflows-v1/test/helper.rb +++ b/google-cloud-workflows-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/.owlbot-manifest.json b/google-cloud-workflows-v1beta/.owlbot-manifest.json index f5a2a2b2e961..c3b7e17dc032 100644 --- a/google-cloud-workflows-v1beta/.owlbot-manifest.json +++ b/google-cloud-workflows-v1beta/.owlbot-manifest.json @@ -56,6 +56,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-v1beta/.toys.rb b/google-cloud-workflows-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-v1beta/.toys.rb +++ b/google-cloud-workflows-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/Rakefile b/google-cloud-workflows-v1beta/Rakefile index 5cf726f1e42a..26a1b0335b69 100644 --- a/google-cloud-workflows-v1beta/Rakefile +++ b/google-cloud-workflows-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb b/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb index db1bd24abeb3..6570d59e4c97 100644 --- a/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb +++ b/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb index fd4d808e804b..8ffa325a3d21 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb index 7ccafb070123..89cc4db94d26 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb index f7e10c7c14f5..449f092f35af 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb index 649ca34f32c3..0fcbf048c458 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb index 732b2749f2b8..5a3b0e5fa1ca 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb index 34a002312e22..550b00fccd1b 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb index 68a7dd1c80f6..293530077430 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb index d2f08b755ab1..8e6d9fdd43a9 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb index 60b576b136d9..c806faf98cba 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb index d16c8f774af4..ccbb62fed292 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb index 929c9a8580a8..7269c2d1da8f 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb index a3b5ce112d0c..2b77bde101f9 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb index 216e248fe933..c6606ec7ea91 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb b/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb index 84ab70d2092e..51dd7e8cb940 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb b/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb b/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/Gemfile b/google-cloud-workflows-v1beta/snippets/Gemfile index 7536575cc565..6d0b5707d9d1 100755 --- a/google-cloud-workflows-v1beta/snippets/Gemfile +++ b/google-cloud-workflows-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb index b62a96faddf6..8b8c1e929159 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb index 00d843d4f308..95eaf09e0e6f 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb index fc4789f8cf7a..8d629d661011 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb b/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb index cefd417ede31..0ed09a7616d6 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb index 1b4735fed7d8..bab5a8ac4c65 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb index 046c922e2c66..0f0081e8d9d0 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb index 639a5fd9ad01..79297ed7cc4c 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb index c933d33bbaff..fc962295d47a 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb index e135c1181dbf..0c4369c49b95 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/helper.rb b/google-cloud-workflows-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-workflows-v1beta/test/helper.rb +++ b/google-cloud-workflows-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workload_manager-v1/.owlbot-manifest.json b/google-cloud-workload_manager-v1/.owlbot-manifest.json index 765c7d856587..241fe085026b 100644 --- a/google-cloud-workload_manager-v1/.owlbot-manifest.json +++ b/google-cloud-workload_manager-v1/.owlbot-manifest.json @@ -63,6 +63,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1/.owlbot-manifest.json b/google-cloud-workstations-v1/.owlbot-manifest.json index 9263eb7eb843..b67e0e6cd759 100644 --- a/google-cloud-workstations-v1/.owlbot-manifest.json +++ b/google-cloud-workstations-v1/.owlbot-manifest.json @@ -73,6 +73,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workstations-v1/.toys.rb b/google-cloud-workstations-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workstations-v1/.toys.rb +++ b/google-cloud-workstations-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/Rakefile b/google-cloud-workstations-v1/Rakefile index a3daa2708ba6..2d6588091b1a 100644 --- a/google-cloud-workstations-v1/Rakefile +++ b/google-cloud-workstations-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb b/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb index 6986bc30296c..5432da78d5cb 100644 --- a/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb +++ b/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb index 7f8f7ee71e74..33d0c263a9f4 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb index 5b3255fcc9e7..4e045e2c88f2 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb index e42d70ceff75..4a1cec95dcc9 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb index 11e6b311c5fc..08a4bda4af66 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb index bbfb0bd934a4..85f95a678c11 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb index 19f5e73cfa27..dfd9bd39ea0a 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb index c36728d56b53..2087f38ccf61 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb index 5a7432d6864a..464e72c7f12e 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb index 3d6ca96e10dd..ba4f83cc6e0c 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb index 7c09881ab915..aa208259fcfa 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb index b54699ee5139..c6115b5ff1ff 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb index 7e8fb8258e17..420e199f7069 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb index d9fa046b1e4a..792cd03236da 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/client.rb b/google-cloud-workstations-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/resource.rb b/google-cloud-workstations-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb b/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb index b6b4ce299966..6047b249e889 100644 --- a/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb +++ b/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb b/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/type/expr.rb b/google-cloud-workstations-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-workstations-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-workstations-v1/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/Gemfile b/google-cloud-workstations-v1/snippets/Gemfile index 17b11efc1fa8..a1469457e584 100644 --- a/google-cloud-workstations-v1/snippets/Gemfile +++ b/google-cloud-workstations-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb index 74256cdd065d..4031f08e9005 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb index f8f82884aa7f..6920a957ca47 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb index 21ecfa5c4e1d..a4ee1a5ba3bd 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb index f6c4daf37ad0..81660ff7e383 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb index 22b5e48ee221..979c4987b36e 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb index 65b6cd870ba0..282347e33b9b 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb b/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb index 7a70181cf4aa..5ee1e774fee1 100644 --- a/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb +++ b/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb index f394e329147d..3f39180ba50d 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb index b8e5f9e8a7b5..439839d2c17f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb index de0812f3121d..03403b54417f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb index a8f5c1a81500..b829c05c865c 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb index c313de0cfaa4..d7266f51ca88 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb index 23ff612d5e8f..4234e04c9aee 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb index 93094da530bb..8810eb261cd2 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb index 1b2ee48e0dea..f667c3ea7346 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb index bb90c9cf2507..8e9f7ff1738c 100644 --- a/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb index 93fb925811a6..938fb5a5843f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb index fa4cc37931b3..7b34ea13f4bb 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb index 0476c8fe9d27..b2c9b129aa80 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb index 04226a80364a..f2129ee535ec 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb index cbc365ee4174..52bdf0f508ad 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb index 8f0102ab4e34..2411b91ff053 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb index 1001a4c2192f..cc8f0344b566 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb index e7056a61e738..545fb10d714e 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/helper.rb b/google-cloud-workstations-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-workstations-v1/test/helper.rb +++ b/google-cloud-workstations-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/.owlbot-manifest.json b/google-cloud-workstations-v1beta/.owlbot-manifest.json index 62cf12abb1a4..5456a36c82c2 100644 --- a/google-cloud-workstations-v1beta/.owlbot-manifest.json +++ b/google-cloud-workstations-v1beta/.owlbot-manifest.json @@ -74,6 +74,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workstations-v1beta/.toys.rb b/google-cloud-workstations-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workstations-v1beta/.toys.rb +++ b/google-cloud-workstations-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/Rakefile b/google-cloud-workstations-v1beta/Rakefile index 1af042a6bad9..19a6e40ad1cb 100644 --- a/google-cloud-workstations-v1beta/Rakefile +++ b/google-cloud-workstations-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb b/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb index 7dc6eac3698e..a0188c280162 100644 --- a/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb +++ b/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb index f3b04c48bc54..c7ef63fc2912 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb index b3e0fa9120bc..2b52965b4f26 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb index 263a8d624c37..80bc9428e548 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb index 54d640c117f8..b0c7dfb12bbf 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb index f82ab3773db8..7aa5892babd9 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb index fa639bfe9775..cd1d778b15ef 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb index 2eab2a170919..620b2be83356 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb index 0f5becf33f55..651fbc0e8140 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb index 1ca8808205f4..203469f53bee 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb index cbeab4491f7c..c39d1909ad91 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb index 9e1b322ddef5..a100147caf77 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb index 9ac13ef13d13..1af97769fe62 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb index dee7faa9aa39..bddade12446d 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb b/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb index e00977475b79..b9791493eed8 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb b/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb b/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb b/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/Gemfile b/google-cloud-workstations-v1beta/snippets/Gemfile index 19ef17d61deb..7a19ba50a0c6 100644 --- a/google-cloud-workstations-v1beta/snippets/Gemfile +++ b/google-cloud-workstations-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb index 05bbedd0593d..d693d2b46ae5 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb index 19a0d668883b..87128b5c9ea7 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb index 1621fde4cfb4..f2b1d8cd72ce 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb index 4eac7c0b7fec..5077d7921393 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb index cd15e102ae95..102ab70aae42 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb index ff23ae8546b2..9ad29224664b 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb b/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb index 496ded0ea83e..c810256cd2e2 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb index c26cdb5df5b3..ed645c9c161d 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb index 04bf1634fa50..665a6a0fe884 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb index aff926a56d20..df2764fba5d2 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb index b2adf37f85a1..04c759f7d070 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb index c8e1399a6ec6..ac98db348987 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb index b031794b90cd..339e219b560c 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb index 2ade2b14afdc..e048457320f7 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb index edcd44468ac0..cdea490fd7b3 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb index 2f348c3fbddf..4d0f92d6a22b 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb index 93b9624a8321..81426cbc8008 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb index 4f5c4e8e5805..5f5722b2f007 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb index 5758ace9cb56..9890ea125115 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb index 187ce313cd01..659a518628ac 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb index dd36b0c018ad..af5378e9c6a7 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb index 2347a11293d6..b909911491fb 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb index 10bd354469d0..2484c4f4930c 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb index 79e766d2cbb9..b76165c92c75 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/helper.rb b/google-cloud-workstations-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-workstations-v1beta/test/helper.rb +++ b/google-cloud-workstations-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-developers-developer_knowledge-v1/.owlbot-manifest.json b/google-developers-developer_knowledge-v1/.owlbot-manifest.json index 3b4f0cdf2b82..7766587dd35b 100644 --- a/google-developers-developer_knowledge-v1/.owlbot-manifest.json +++ b/google-developers-developer_knowledge-v1/.owlbot-manifest.json @@ -46,6 +46,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb b/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-credentials-v1/.owlbot-manifest.json b/google-iam-credentials-v1/.owlbot-manifest.json index 8aa3900cfe1e..3b6c91cf470c 100644 --- a/google-iam-credentials-v1/.owlbot-manifest.json +++ b/google-iam-credentials-v1/.owlbot-manifest.json @@ -47,6 +47,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-credentials-v1/.toys.rb b/google-iam-credentials-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-iam-credentials-v1/.toys.rb +++ b/google-iam-credentials-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/Rakefile b/google-iam-credentials-v1/Rakefile index 9b98114ed1a0..d9311daefed7 100644 --- a/google-iam-credentials-v1/Rakefile +++ b/google-iam-credentials-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb b/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb index a9fe3ff73b6c..ed2f7cb1dc33 100644 --- a/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb +++ b/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb index 2a240776e062..a614ad91054b 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb index 297c73ac3161..f97cbb3723e3 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb index 2d635175329b..e7e7c3b84421 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb index d8c2c7067e66..7cb79642525d 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb index 9db2bb35f985..a57ff6ec11e5 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb index f2f175cf93d1..80ffb5c62a94 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb index 5f6203db5276..00f36f66f3e4 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb index 91beadcbd30e..c6cfe4454df2 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb index fe53d671f085..a550a8f0fcfe 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb index b3d8e1af0898..68ade197545e 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/client.rb b/google-iam-credentials-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/client.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb b/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb b/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/resource.rb b/google-iam-credentials-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/resource.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb b/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb index 2badba1833fc..87dc4a4ab1ff 100644 --- a/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb +++ b/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb b/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb +++ b/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb b/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-credentials-v1/snippets/Gemfile b/google-iam-credentials-v1/snippets/Gemfile index 4193d6959cae..68414f33ff49 100755 --- a/google-iam-credentials-v1/snippets/Gemfile +++ b/google-iam-credentials-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb b/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb index 7e56d84947ca..9ba589bd6910 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb b/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb index f78c29052dd9..4a1c3491483f 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb b/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb index 21597b71d986..27272c74919b 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb b/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb index b14eb36f15e0..806a57c1515f 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb index 22958423294e..3a872d20e5a0 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb index ed2a4ef6102d..3b870f137cb7 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb index be554322222a..6fc2459f3e5f 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/helper.rb b/google-iam-credentials-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-iam-credentials-v1/test/helper.rb +++ b/google-iam-credentials-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/.owlbot-manifest.json b/google-iam-v2/.owlbot-manifest.json index e2ca0d13bb0a..85e87ce2e4af 100644 --- a/google-iam-v2/.owlbot-manifest.json +++ b/google-iam-v2/.owlbot-manifest.json @@ -55,6 +55,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v2/.toys.rb b/google-iam-v2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-iam-v2/.toys.rb +++ b/google-iam-v2/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/Rakefile b/google-iam-v2/Rakefile index 5d810da58283..17091d3aff5d 100644 --- a/google-iam-v2/Rakefile +++ b/google-iam-v2/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google-iam-v2.rb b/google-iam-v2/lib/google-iam-v2.rb index 71422612858f..976c5cee3515 100644 --- a/google-iam-v2/lib/google-iam-v2.rb +++ b/google-iam-v2/lib/google-iam-v2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2.rb b/google-iam-v2/lib/google/iam/v2.rb index fd1d09852f21..fc5ba38b2a63 100644 --- a/google-iam-v2/lib/google/iam/v2.rb +++ b/google-iam-v2/lib/google/iam/v2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies.rb b/google-iam-v2/lib/google/iam/v2/policies.rb index 1728e628d52a..7c30e2a1e284 100644 --- a/google-iam-v2/lib/google/iam/v2/policies.rb +++ b/google-iam-v2/lib/google/iam/v2/policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/client.rb b/google-iam-v2/lib/google/iam/v2/policies/client.rb index 6d4992d9c48e..9484b167af02 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/client.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/credentials.rb b/google-iam-v2/lib/google/iam/v2/policies/credentials.rb index 8ff86c2c03fa..99a803e1b8c6 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/credentials.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/operations.rb b/google-iam-v2/lib/google/iam/v2/policies/operations.rb index dc6511b82102..1f11efd8851b 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/operations.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest.rb b/google-iam-v2/lib/google/iam/v2/policies/rest.rb index eb50825e46b8..c1f6d1def0ec 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb index df3e617e2894..c440f4d15471 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb index 41b62d472c34..389d302a8513 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb index 318be1570c55..cfcc7003472b 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb b/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb index 73b0ffd93802..bd26fe57cd18 100644 --- a/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb +++ b/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v2/policy.proto for package 'google.iam.v2' # Original file comments: -# Copyright 2022 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/rest.rb b/google-iam-v2/lib/google/iam/v2/rest.rb index b5b30961f6ac..d430e48053e6 100644 --- a/google-iam-v2/lib/google/iam/v2/rest.rb +++ b/google-iam-v2/lib/google/iam/v2/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/client.rb b/google-iam-v2/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-iam-v2/proto_docs/google/api/client.rb +++ b/google-iam-v2/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/field_behavior.rb b/google-iam-v2/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-iam-v2/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v2/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/launch_stage.rb b/google-iam-v2/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-iam-v2/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v2/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/resource.rb b/google-iam-v2/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-iam-v2/proto_docs/google/api/resource.rb +++ b/google-iam-v2/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/iam/v2/deny.rb b/google-iam-v2/proto_docs/google/iam/v2/deny.rb index 0c2ce0ba30c8..85ac06367665 100644 --- a/google-iam-v2/proto_docs/google/iam/v2/deny.rb +++ b/google-iam-v2/proto_docs/google/iam/v2/deny.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/iam/v2/policy.rb b/google-iam-v2/proto_docs/google/iam/v2/policy.rb index 8321f68954dc..917b870c27c0 100644 --- a/google-iam-v2/proto_docs/google/iam/v2/policy.rb +++ b/google-iam-v2/proto_docs/google/iam/v2/policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/longrunning/operations.rb b/google-iam-v2/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-iam-v2/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v2/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/any.rb b/google-iam-v2/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-iam-v2/proto_docs/google/protobuf/any.rb +++ b/google-iam-v2/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/duration.rb b/google-iam-v2/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-iam-v2/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v2/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/empty.rb b/google-iam-v2/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-iam-v2/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v2/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/timestamp.rb b/google-iam-v2/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-iam-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v2/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v2/proto_docs/google/rpc/status.rb b/google-iam-v2/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-iam-v2/proto_docs/google/rpc/status.rb +++ b/google-iam-v2/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/type/expr.rb b/google-iam-v2/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-iam-v2/proto_docs/google/type/expr.rb +++ b/google-iam-v2/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/Gemfile b/google-iam-v2/snippets/Gemfile index 1d6df5db4ae8..0b586e897f32 100644 --- a/google-iam-v2/snippets/Gemfile +++ b/google-iam-v2/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/create_policy.rb b/google-iam-v2/snippets/policies/create_policy.rb index b02534bfcc54..992efa4ac456 100644 --- a/google-iam-v2/snippets/policies/create_policy.rb +++ b/google-iam-v2/snippets/policies/create_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/delete_policy.rb b/google-iam-v2/snippets/policies/delete_policy.rb index 5a43cee41e38..97dbcb650132 100644 --- a/google-iam-v2/snippets/policies/delete_policy.rb +++ b/google-iam-v2/snippets/policies/delete_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/get_policy.rb b/google-iam-v2/snippets/policies/get_policy.rb index 23f23517a196..6820282d9a3b 100644 --- a/google-iam-v2/snippets/policies/get_policy.rb +++ b/google-iam-v2/snippets/policies/get_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/list_policies.rb b/google-iam-v2/snippets/policies/list_policies.rb index d60e0fd73e6a..d7d580e8441f 100644 --- a/google-iam-v2/snippets/policies/list_policies.rb +++ b/google-iam-v2/snippets/policies/list_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/update_policy.rb b/google-iam-v2/snippets/policies/update_policy.rb index 8b35eb2879c9..417fd211883b 100644 --- a/google-iam-v2/snippets/policies/update_policy.rb +++ b/google-iam-v2/snippets/policies/update_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_operations_test.rb b/google-iam-v2/test/google/iam/v2/policies_operations_test.rb index 95364be51e23..7dcd32b68c5f 100644 --- a/google-iam-v2/test/google/iam/v2/policies_operations_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_rest_test.rb b/google-iam-v2/test/google/iam/v2/policies_rest_test.rb index 9183773f09c7..fbecbeaf511a 100644 --- a/google-iam-v2/test/google/iam/v2/policies_rest_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_test.rb b/google-iam-v2/test/google/iam/v2/policies_test.rb index 0ef27f69d7a0..8a3804aaab70 100644 --- a/google-iam-v2/test/google/iam/v2/policies_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/helper.rb b/google-iam-v2/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-iam-v2/test/helper.rb +++ b/google-iam-v2/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/.owlbot-manifest.json b/google-iam-v3/.owlbot-manifest.json index 83b1d53aa87e..b0428ea66cb1 100644 --- a/google-iam-v3/.owlbot-manifest.json +++ b/google-iam-v3/.owlbot-manifest.json @@ -110,6 +110,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v3/.toys.rb b/google-iam-v3/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-iam-v3/.toys.rb +++ b/google-iam-v3/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/Rakefile b/google-iam-v3/Rakefile index da3c53e686f3..0b6c7b75d2e4 100644 --- a/google-iam-v3/Rakefile +++ b/google-iam-v3/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google-iam-v3.rb b/google-iam-v3/lib/google-iam-v3.rb index 6c1a58df0c66..567b503c671b 100644 --- a/google-iam-v3/lib/google-iam-v3.rb +++ b/google-iam-v3/lib/google-iam-v3.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3.rb b/google-iam-v3/lib/google/iam/v3.rb index fa8b613fd431..b4c095ee8854 100644 --- a/google-iam-v3/lib/google/iam/v3.rb +++ b/google-iam-v3/lib/google/iam/v3.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings.rb index d8346e8142e0..89b89d81de14 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb index 24cb49570866..cafa48df11dd 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb index 0095b12dd99c..a3f91a0fb8fe 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb index cd8184edc0f5..c0c1fbc2d13c 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb index 85471d25b127..cc9e0c46ea72 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb index b643f3248156..102093998bd5 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb index 5849f9314060..5b8aac9f4ccf 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb index 3f61fd8709e3..0856b3e5604d 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb index 60c639a138f3..ba0446cdb560 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb index 602063be1d12..dc8f9d8742f2 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.v3' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb index ff3c0bc1e3f0..74a5371b0372 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb index 420d48194940..48eb0922884c 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb index b5c3477aa5aa..84103a366146 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb index 4d9ad99df0b0..9d3205859719 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb index 34d254dc4005..d7fbd72948b5 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb index e5047274b26d..8e3308deab2f 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb index 79d07360c19b..0ee7f3632d2b 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb index be1112a0b445..7063c8a578e1 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb index e9e025a6d796..f1c525adbc3a 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb index afa8d5bef116..4b3c7a40557b 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.v3' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/rest.rb b/google-iam-v3/lib/google/iam/v3/rest.rb index 4ad39170e62c..05510520f427 100644 --- a/google-iam-v3/lib/google/iam/v3/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/client.rb b/google-iam-v3/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-iam-v3/proto_docs/google/api/client.rb +++ b/google-iam-v3/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/field_behavior.rb b/google-iam-v3/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-iam-v3/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v3/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/field_info.rb b/google-iam-v3/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-iam-v3/proto_docs/google/api/field_info.rb +++ b/google-iam-v3/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/launch_stage.rb b/google-iam-v3/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-iam-v3/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v3/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/resource.rb b/google-iam-v3/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-iam-v3/proto_docs/google/api/resource.rb +++ b/google-iam-v3/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb index 75a8c26f41e3..42ec222a1f98 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb index a996d679fe81..129656c0a2bd 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb index 1411139f24e7..57bd8a00aca7 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb index 584d72346274..bd02495524b4 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb index 4eb29953f90b..40b6170b1a17 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/longrunning/operations.rb b/google-iam-v3/proto_docs/google/longrunning/operations.rb index f2d9d79d9da4..7a757f512165 100644 --- a/google-iam-v3/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v3/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/any.rb b/google-iam-v3/proto_docs/google/protobuf/any.rb index 9e9bdbb09ea4..58691995f02e 100644 --- a/google-iam-v3/proto_docs/google/protobuf/any.rb +++ b/google-iam-v3/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/duration.rb b/google-iam-v3/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-iam-v3/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v3/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/empty.rb b/google-iam-v3/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-iam-v3/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v3/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/field_mask.rb b/google-iam-v3/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-iam-v3/proto_docs/google/protobuf/field_mask.rb +++ b/google-iam-v3/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/timestamp.rb b/google-iam-v3/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-iam-v3/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v3/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v3/proto_docs/google/rpc/status.rb b/google-iam-v3/proto_docs/google/rpc/status.rb index 3f61f95b2587..c1a1c07eb2db 100644 --- a/google-iam-v3/proto_docs/google/rpc/status.rb +++ b/google-iam-v3/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/type/expr.rb b/google-iam-v3/proto_docs/google/type/expr.rb index 9505eeb8657e..53e7733b6592 100644 --- a/google-iam-v3/proto_docs/google/type/expr.rb +++ b/google-iam-v3/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/Gemfile b/google-iam-v3/snippets/Gemfile index 214ba6d19151..1ae54b711716 100644 --- a/google-iam-v3/snippets/Gemfile +++ b/google-iam-v3/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb index b558468ae2b1..df4ee7219d1d 100644 --- a/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb index 27101528820d..55f3efffd3e3 100644 --- a/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb index 259a4a87b3d6..94c0c21f6316 100644 --- a/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb index 45bd65891b69..2dbb442b3771 100644 --- a/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb +++ b/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb index 72a081083f04..46f121f588f0 100644 --- a/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb +++ b/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb index 614ab928ce51..10cbd400a9ef 100644 --- a/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb index 60ed48b3d5c5..b4700ad72f99 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb index 22d06bd2d9b0..85f48ef8c04a 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb index 9e4a6c491536..ac50d60e307f 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb index e80417eb866d..b3c624c9b24f 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb index e95e7ad59221..7a39b0874454 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb index 73a318b9bcdc..0b6bc521c7f0 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json index b5392ce930ef..4de150daa1d4 100644 --- a/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json +++ b/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-iam-v3", - "version": "0.5.0", + "version": "0.6.0", "language": "RUBY", "apis": [ { diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb index a9edf4797ca5..e943464fa885 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb index a7593af69182..e21017f180db 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb index 6a1c92bd95e2..b5dc95e769d7 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb index 1dc88fa68fd2..4b213c2a9bdc 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb index 293f38b2e097..0a55e6e6e754 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb index 71260a293a4f..28fb979db795 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb index 3f035adb61f5..49521b2824c3 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb index 83f0c2566bf4..414ee9e0e6e3 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/helper.rb b/google-iam-v3/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-iam-v3/test/helper.rb +++ b/google-iam-v3/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/.owlbot-manifest.json b/google-iam-v3beta/.owlbot-manifest.json index 4f1d9c226c81..2991878e35ff 100644 --- a/google-iam-v3beta/.owlbot-manifest.json +++ b/google-iam-v3beta/.owlbot-manifest.json @@ -110,6 +110,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v3beta/.toys.rb b/google-iam-v3beta/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-iam-v3beta/.toys.rb +++ b/google-iam-v3beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/Rakefile b/google-iam-v3beta/Rakefile index 4a9e37b0746d..14994400cce6 100644 --- a/google-iam-v3beta/Rakefile +++ b/google-iam-v3beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta.rb b/google-iam-v3beta/lib/google/iam/v3beta.rb index c316f69bc6d0..890afcf2e734 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb index 14760bb14ac2..8c10eab801a6 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb index 0dea55bf9069..efd04847fb73 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb index 455f2ca87209..8544d9e0da3c 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb index 69f25c462396..197b5f7d66e3 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb index decc3855603a..b4c61be97d31 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb index a419663fb807..8d9da90d458b 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb index aa89472f6a2f..a05a7bfd27eb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb index 81437a9a553a..256b9190eee3 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb index 3ac79d45f367..ce126e354617 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb index 6756bfa36dc0..3261714f198e 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb index abbc7442e148..131df2f35581 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb index 5a04264de9a2..5097171067eb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb index f83aa0ec5154..faa2a134d021 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb index 107dc42f68ea..b253552560cb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb index 75075477f428..5c221ecd1178 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb index bc4a47b973f1..a46c2f64c9d5 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb index 9e62a3820415..8e08e9ccc17f 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb index f915c921b5f1..22c3e05a5278 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb index b747742b615a..e36e1d4e8f56 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb index 0ee7d8797ccf..3789b868b8e2 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/rest.rb index 3a7e0a2564b3..99f3c20b6549 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/client.rb b/google-iam-v3beta/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-iam-v3beta/proto_docs/google/api/client.rb +++ b/google-iam-v3beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/field_behavior.rb b/google-iam-v3beta/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-iam-v3beta/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v3beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/field_info.rb b/google-iam-v3beta/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-iam-v3beta/proto_docs/google/api/field_info.rb +++ b/google-iam-v3beta/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/launch_stage.rb b/google-iam-v3beta/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-iam-v3beta/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v3beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/resource.rb b/google-iam-v3beta/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-iam-v3beta/proto_docs/google/api/resource.rb +++ b/google-iam-v3beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb index 3311cad89c6b..4e4463d9171f 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb index 2d9c21ec07d3..c46446dc0080 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb index 6032552361e9..4ff232b4471d 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb index 31e5c37c7dd9..565de307d98b 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb index 61631482354f..a01db22285ba 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/google-iam-v3beta/proto_docs/google/longrunning/operations.rb index f2d9d79d9da4..7a757f512165 100644 --- a/google-iam-v3beta/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v3beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/any.rb b/google-iam-v3beta/proto_docs/google/protobuf/any.rb index 9e9bdbb09ea4..58691995f02e 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/any.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/duration.rb b/google-iam-v3beta/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/empty.rb b/google-iam-v3beta/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v3beta/proto_docs/google/rpc/status.rb b/google-iam-v3beta/proto_docs/google/rpc/status.rb index 3f61f95b2587..c1a1c07eb2db 100644 --- a/google-iam-v3beta/proto_docs/google/rpc/status.rb +++ b/google-iam-v3beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/type/expr.rb b/google-iam-v3beta/proto_docs/google/type/expr.rb index 9505eeb8657e..53e7733b6592 100644 --- a/google-iam-v3beta/proto_docs/google/type/expr.rb +++ b/google-iam-v3beta/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/Gemfile b/google-iam-v3beta/snippets/Gemfile index 5202fc1b4ae1..c2385cbb7f70 100644 --- a/google-iam-v3beta/snippets/Gemfile +++ b/google-iam-v3beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb index e3fab0eea56e..71d915589110 100644 --- a/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb index ab62ed68bf29..71f4b669183c 100644 --- a/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb index 7800b2ae8319..95a37b3bd52d 100644 --- a/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb index cecd9a027d16..0f7e29a87412 100644 --- a/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb +++ b/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb index 218a20c61c97..f27b0677d25b 100644 --- a/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb +++ b/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb index fe565e46b786..135862214560 100644 --- a/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb index b105e95426b6..5adbcf4dcc27 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb index c804fdb27011..80a3f6830daa 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb index 8a8b901fb749..a6c6b2d32724 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb index 4a7a4b89530d..6d15a7805873 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb index 720b7f13ee39..f55151327579 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb index 4fcb2625e6ae..821e090ddea2 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb index 65333bc988d5..83ecbb1d59e0 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb index ea6041ccd8b4..25795739b50c 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb index 9d9a78ea8f27..eb4938bac615 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb index 3fa49da6610c..b9c3eb2c9954 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb index 42f2b4db4389..6e46e310ad0b 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb index 605293aa14d5..e7a89396ed57 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb index 040da95a3314..3eab77f7e378 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb index 852107e967f3..a1ff3c50bada 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/helper.rb b/google-iam-v3beta/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-iam-v3beta/test/helper.rb +++ b/google-iam-v3beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/.owlbot-manifest.json b/google-identity-access_context_manager-v1/.owlbot-manifest.json index 2f3cee55da3e..2e13ece93581 100644 --- a/google-identity-access_context_manager-v1/.owlbot-manifest.json +++ b/google-identity-access_context_manager-v1/.owlbot-manifest.json @@ -90,6 +90,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-identity-access_context_manager-v1/.toys.rb b/google-identity-access_context_manager-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-identity-access_context_manager-v1/.toys.rb +++ b/google-identity-access_context_manager-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/Rakefile b/google-identity-access_context_manager-v1/Rakefile index 5ba1b98b9457..4d845f513939 100644 --- a/google-identity-access_context_manager-v1/Rakefile +++ b/google-identity-access_context_manager-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb index 35caceab7996..5d4eaa9b5df6 100644 --- a/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb +++ b/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb index bf8a626e9200..c51f7bf61440 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb index ea35c114cfc0..557344644e3e 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb index de4898d7f884..3a8c8320a0f6 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb index 8d742ace017e..776e70b9d2b2 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb index a08e09b60943..1fdaf89aae95 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb index dc87ec041884..11645e15c66f 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb index 87b1f783a8b5..db852d4c1c3e 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb index f5564060bd89..3f2ec497d8d9 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb index 66f8dfdfba65..484cf2ada2d9 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb index 6449760c44c2..2eba8ab83681 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb index 70543e8f56c3..b85e8d3b9a1c 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb index 5e322fd0b5df..5d40fe4c565a 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.V1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb index 447ba2367b16..5445c77f8258 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb index 79dae8815aca..60713d995b86 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb index 49cc5ebe1a2d..999575b797df 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb index c2f677020e30..98103f9a8eb2 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb index 26aa6087ad8d..0a4ef8552281 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb index 0054b09958d9..263cc28aa3d0 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb index eab0af3a3ffb..b034d49fe22d 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb index 95e69a1bfd15..bbd9b110d43b 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb index e554c952ac7c..be4e39e46ef2 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb index 650a5ad04e68..53e7733b6592 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/Gemfile b/google-identity-access_context_manager-v1/snippets/Gemfile index 88da91e4e317..7c4756c28a3a 100755 --- a/google-identity-access_context_manager-v1/snippets/Gemfile +++ b/google-identity-access_context_manager-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb index ad1f55920824..8df7e306a7f2 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb index 4a33ea6e03aa..7ad25cd17d4d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb index a643581435d1..a9f9d7289673 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb index a302b4ad528a..f1020626f742 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb index 410112fd69f7..412e217d7849 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb index d089b119b184..00c5232fc6d1 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb index 183a67d64fe7..eee4a031ae6e 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb index 9e6716b9cc4d..dd965cf499c5 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb index dd2b21232de3..983eda52bacc 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb index 412d4bbfc528..0597699fa439 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb index b29e78968efc..0531cf3580ad 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb index 9123fdf9ff2a..d732c416d5c8 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb index 6f74279325df..b134f682cf0c 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb index bd9e6bfb85e8..fd5e1db7b14d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb index 237ab6ad4927..a5bf8a3cae59 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb index 667022cf2993..8244d0f6948b 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb index a0a8a784e592..933198ef288d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb index 85d972e9c566..7e6aab1e29ef 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb index 0ba99b7d2f9f..8c5a3d228fae 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb index 5a18d7727dca..0bb1d425f50d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb index 6a3c66ab56df..47743b7f9b84 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb index 908788d32aa2..780f1b93ba1a 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb index 47657f547a0a..0c0f947da7b7 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb index 3995b69fb62a..a29a2622b29f 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb index abc3e08aa336..48d03cc216bc 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb index cf2e2ba1f565..a751242211b5 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb index ad2d309f5f66..07584e8a3272 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb index 193b13bf35ea..d60902c54e76 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb index 2110da31a10b..f15c7327d6fe 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb index 566a896e640a..ef2427c12a7c 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/helper.rb b/google-identity-access_context_manager-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-identity-access_context_manager-v1/test/helper.rb +++ b/google-identity-access_context_manager-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json b/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json index 626cd823e9fa..ed3787fa7efa 100644 --- a/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json +++ b/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json @@ -70,6 +70,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-maps-fleet_engine-delivery-v1/.toys.rb b/google-maps-fleet_engine-delivery-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-maps-fleet_engine-delivery-v1/.toys.rb +++ b/google-maps-fleet_engine-delivery-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/Rakefile b/google-maps-fleet_engine-delivery-v1/Rakefile index 8a69b60d5333..cd9e87b75d54 100644 --- a/google-maps-fleet_engine-delivery-v1/Rakefile +++ b/google-maps-fleet_engine-delivery-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb index 3234cb8cc922..cd1ad7559d55 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb index cd989415dd89..bf548f559e81 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb index 0162b8dd49be..3f52ddd3345e 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb index 1fcce8828d4e..57a447f2b08f 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb index e008277b6dae..8665c263a506 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb index 3d8b197732b1..dddaace08010 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb index 66a91ff5dc35..c3e0d58b6ef6 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb index 02d73f1bf2e8..3d36d73469a4 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb index a673935972d0..b1a86959625c 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb index e125b0975e6e..8bc23bd54948 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb index e0c7fc540ca1..4a755e067426 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/delivery/v1/delivery_api.proto for package 'Google.Maps.FleetEngine.Delivery.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb index 497560392276..6d71a9430253 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb index fe0ee05cff16..f387552a7073 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb index 68ca054427ee..1feab364a2dd 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb index c7271fc20bed..8c9bb733f9ef 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb index 8a82d5885f63..815ff7ffd128 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb index 88612273bff2..8475ff84935a 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb index 8968c28b4600..3a110fdb32d7 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb index 553dac53500d..0bb1c3f6a05b 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb index 13c904cd662e..593314b4cde5 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/Gemfile b/google-maps-fleet_engine-delivery-v1/snippets/Gemfile index 439a18a97a9b..30533202706d 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/Gemfile +++ b/google-maps-fleet_engine-delivery-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb index 7010b3247d8e..14782a4848c5 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb index 6a0fe81aab15..4e414ecb6e94 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb index 8e25a5d300cc..786f6ae89625 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb index 4b7caf107870..0a42a3ea4d16 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb index efd3ffb59ee6..7839b4fc3aa0 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb index 2208fb1f955e..ac4be0811ccf 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb index c23dda7faa9a..51530e7ea2a7 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb index ba53a2eaed06..50c6fcfcbe4c 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb index f271d3d21afb..06025d2f85f2 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb index 87ebb9b9f62c..f5751c045373 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb index 2d0d5bae808f..54d6bfef390a 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb index f8223a66b079..6413dfeaa315 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb index cabc6470aa85..8d3d04d6c721 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb index ff6502e3b5a7..df0109912e9d 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb index aefbf3101b69..d08154229fd8 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/helper.rb b/google-maps-fleet_engine-delivery-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-maps-fleet_engine-delivery-v1/test/helper.rb +++ b/google-maps-fleet_engine-delivery-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/.owlbot-manifest.json b/google-maps-fleet_engine-v1/.owlbot-manifest.json index 56f42e677f4a..05808b29e1b5 100644 --- a/google-maps-fleet_engine-v1/.owlbot-manifest.json +++ b/google-maps-fleet_engine-v1/.owlbot-manifest.json @@ -84,6 +84,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-maps-fleet_engine-v1/.toys.rb b/google-maps-fleet_engine-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-maps-fleet_engine-v1/.toys.rb +++ b/google-maps-fleet_engine-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/Rakefile b/google-maps-fleet_engine-v1/Rakefile index 1be78ed47b55..3919676d82cf 100644 --- a/google-maps-fleet_engine-v1/Rakefile +++ b/google-maps-fleet_engine-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb index d5f1338c965d..d09ab3bdc03a 100644 --- a/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb +++ b/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb index 873be0a04496..b9e04593edfe 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb index d499cdbcb365..a0010e1c40d9 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb index a02084ecb010..cb3cd45ab109 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb index e0a646dd1e65..18ea9bb63065 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb index 11e25c9e624e..4377df747ce3 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb index 63bd3b95cc5e..7de4a91f901d 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb index 1804c8ca49a5..8f43dcd60e6b 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb index 0072458bcf2c..78114c5d13b2 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb index 1ee77e88fcf2..989dd713b15c 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb index cd87307f4079..8a9893ae0e60 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb index 25d5e87d74df..c1b48e95c452 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb index 54606bcca23f..fa225faa2e96 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb index beb4f49d5813..55fd593ff4b1 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb index 279b68928e3f..c638416560e4 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb index 90fae2ef24e2..6f30d8a08b7c 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb index 6cc202e26ef2..ab5b0c346f64 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb index f4ba40054f10..39026e91ba88 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb index c38eb5da7a44..31ee1908cafc 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb index 497560392276..6d71a9430253 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb index fe0ee05cff16..f387552a7073 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb index 57a3b013af54..9855fd75847c 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb index aa64b10c4abe..dbc08c7760c6 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb index 69cc7a18e0bb..024d9a7221d4 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb index b677517131c2..4bf45f469f13 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb index 4bc45542041a..e5dd08d4fdac 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb index ce955adbc1cf..501bd43c50a3 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb index 39cec795913e..59703d2da0b2 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb index 13c904cd662e..593314b4cde5 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/Gemfile b/google-maps-fleet_engine-v1/snippets/Gemfile index 8408c1f115ef..1a35fc6011c5 100644 --- a/google-maps-fleet_engine-v1/snippets/Gemfile +++ b/google-maps-fleet_engine-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb index f1b47274850b..471ee490d00d 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb index 80bc031adf5e..892398e76959 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb index fc38592390b8..d02ae4f6720c 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb index 84b7892710fc..66c560dccfb5 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb index 6920b8e0c20f..213ca35edfd8 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb index f8dd8e796946..caca64f14dad 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb index 969010178e89..70db086501d6 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb index eb4029f584f5..c040d402cb0b 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb index a7a56290df04..4872490fa433 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb index 486532e1bcee..1119502e68a1 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb index 45699c855c63..e28a620bb8ef 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb index 7167eb19d8b9..87e5b21b85ad 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb index dfabf7c8b084..abf97493f162 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb index 28fb6028936d..f1ddb3264a50 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb index 2a5f92c6bcbc..a6042f765747 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb index 93a52630d3d9..38356c41018f 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb index dc95545932ba..104283f54a4c 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb index 40c8975abb5c..e5e9ed6215e7 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb index 88fa71a00e13..f20a91100c3a 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/helper.rb b/google-maps-fleet_engine-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-maps-fleet_engine-v1/test/helper.rb +++ b/google-maps-fleet_engine-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/.owlbot-manifest.json b/google-shopping-css-v1/.owlbot-manifest.json index f161dcdeb4b6..eefaaf21cd23 100644 --- a/google-shopping-css-v1/.owlbot-manifest.json +++ b/google-shopping-css-v1/.owlbot-manifest.json @@ -112,6 +112,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-css-v1/.toys.rb b/google-shopping-css-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-css-v1/.toys.rb +++ b/google-shopping-css-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/Rakefile b/google-shopping-css-v1/Rakefile index 029f2bd284f0..635d913938d1 100644 --- a/google-shopping-css-v1/Rakefile +++ b/google-shopping-css-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/google-shopping-css-v1/lib/google-shopping-css-v1.rb index 31bc0c3fadd9..a93e9af0be45 100644 --- a/google-shopping-css-v1/lib/google-shopping-css-v1.rb +++ b/google-shopping-css-v1/lib/google-shopping-css-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/google-shopping-css-v1/lib/google/shopping/css/v1.rb index ff622d2fd00a..d1249eab068b 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb index 901944542f9e..bd9585d09cc4 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb index 083255d267c4..f12cbcd80856 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb index 8688d205f360..0e7c2cfdd5da 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb index 64582404452c..2f421e27577b 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb index f245618b15b3..728b66d6ac46 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb index d4a7177a734d..0a653f5e9a25 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb index 9ea3611de97f..a9b8cb91fe84 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb index 5366d4fe2814..1d0c4f3552e2 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb index 9b3307675e1d..cbe6be04f569 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb index 282fc55956ec..da91d95b8f0c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb index af0cbd74836d..4584fe4873de 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb index ec0ec0c50ea2..e069680bdb33 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb index 54c93c31b314..996c51dd8cec 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb index 8c7df4e34c52..8a279b8f7067 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb index 75d7924a535c..afe5123dbfaa 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb index c682d7053b86..6528ad62148c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb index 11f8f806c9ce..d9b82213398f 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb index 23ca63ba4996..79c357cee408 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb index 09f1c65b86ae..066f5ca9210d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb index d3affcac0d30..b71796db1d3e 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb index 976414ca6f87..06be63d42390 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb index efcddaf68c38..42512d523193 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb index 3fdf986eeb0a..3eb2aa0f1884 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb index 3e4af2598fc6..a872c72a6951 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb index 9b03245690dd..ace56839641d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb index 925b6a297a7b..5f43148a4403 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb index cc7aca1c3bcd..5656f955c92c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb index cd2a35d4a2d8..e311ef6467e0 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb index 6cdba6705170..6c5a8ef0a46d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb index 75a038241065..ca2c12860121 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb index 702aaf33a558..d7eea4bfc0da 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb index 2ee9a4942917..50ec396539bb 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb index 1c361a522438..8318f2e1b7a3 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb index 66ac63a5806d..cb7d6d1fe847 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb index e47db4e7ecb4..300c3137cdf6 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb index 4bd5602ff301..d6952334dd8d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb index 69e816934a58..d008263afad8 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb index e470c1f70b16..becee6c58f15 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb index da17d02b3764..0104aec48d94 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb index 0758c83a12b0..2176f57358bf 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb index 158cc5510157..2cc3b855b50d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/client.rb b/google-shopping-css-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-css-v1/proto_docs/google/api/client.rb +++ b/google-shopping-css-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/resource.rb b/google-shopping-css-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-css-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-css-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb index 74086749a897..eba13c9a7aad 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb index d1ee1421865b..055f23e04511 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb index cd981b51aaf4..c00f0c3460d5 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb index 4a3c026d0c56..c6945a0046a9 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb index 8794e665ce04..d61414008787 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb index 02721c5df52d..d0d83c380b21 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/Gemfile b/google-shopping-css-v1/snippets/Gemfile index 7cad76eb1aa7..64af0f406f42 100644 --- a/google-shopping-css-v1/snippets/Gemfile +++ b/google-shopping-css-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb index 2640cdb1b8a1..3e0da7936320 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb index 63799fa17dfd..37acf2da6b88 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb index 00ee171c02a0..b6e45b80ec3f 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb index 41031474cdde..3a87e7d4688c 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/google-shopping-css-v1/snippets/accounts_service/get_account.rb index 4ae53f38710b..99a758913d47 100644 --- a/google-shopping-css-v1/snippets/accounts_service/get_account.rb +++ b/google-shopping-css-v1/snippets/accounts_service/get_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb index 536c79475d46..56b92aa4cccf 100644 --- a/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb +++ b/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/google-shopping-css-v1/snippets/accounts_service/update_labels.rb index 904f128be76c..d5f667ab066e 100644 --- a/google-shopping-css-v1/snippets/accounts_service/update_labels.rb +++ b/google-shopping-css-v1/snippets/accounts_service/update_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb index 2c7cd36a0914..006857df17cf 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb index 95aee279b384..1acf0e41e05a 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb index 7b5fcfe8185d..b0f42257db06 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb index 39dd2d347f1e..859163887d62 100644 --- a/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb +++ b/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb index 0a2468f7c9de..e65a9a1d0a0a 100644 --- a/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb +++ b/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb index d8072dbe2edc..3efd74d00a2a 100644 --- a/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb +++ b/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb index 69233c1433e9..06be5bd23520 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb index 247c4acc04ad..0b1bb88d645a 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb index 8f89bc62fd2a..309bc3a0ae62 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb index c1fd6a621260..5958f212e0cf 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb index 5b44d052182e..292ecc543790 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb index 89173d351480..6abde8ec7b17 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb index d6aa4efc99c3..6f08e5fdf404 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb index 2eb831d74902..2e9aedae5c1b 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb index 285b12a19bc6..cae9bfab46aa 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb index 95806c97e1e3..7e9ac41a013e 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb index 6b13b452188f..8482e96080f6 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb index 880997ace109..693ba1506589 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb index f80515dae680..ebdbed9d44c1 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb index a7b7da70c038..a8c80cc10365 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb index 478860133425..5454c9c25375 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/helper.rb b/google-shopping-css-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-css-v1/test/helper.rb +++ b/google-shopping-css-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json index 2800bbb14cde..a38d666eeaa1 100644 --- a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json @@ -375,6 +375,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-accounts-v1beta/.toys.rb b/google-shopping-merchant-accounts-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-accounts-v1beta/.toys.rb +++ b/google-shopping-merchant-accounts-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/Rakefile b/google-shopping-merchant-accounts-v1beta/Rakefile index 4ba241983ce6..dc4519177094 100644 --- a/google-shopping-merchant-accounts-v1beta/Rakefile +++ b/google-shopping-merchant-accounts-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb index 70d9c54980cc..c0b2d7879e0c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb index 8e6d4b997cba..e10eb5ebc89c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb index 63e648ba67f6..b613248a4cd9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb index 3f883e91d2e9..43a790ecc274 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb index 822d3c10c7e5..bec671601e38 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb index 6fd99f57526b..71d24f829fad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb index 965fcdbc71b7..3b76683c97dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb index 1bae85163265..83ae8b227f30 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb index a59e8c585307..625c0f5e9a9c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb index 11f45584b92c..fe883ee6aa6c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb index 7f7e0c473358..e854d0f8fc83 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb index e4b7a26c3834..fdecfb93cd56 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb index 1e4c7de13b23..327a514a749b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb index 90fff6e5108e..539c364b6e47 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb index 48be41dfd527..82f756ae1010 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb index 7f847ffa35c4..1793880416fc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb index b81fe97a8b32..91544da451e6 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb index beb0389991ad..c925c068fe0e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb index 18f1e2339d92..1db2def8535c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb index 59245f647c93..cfa723ef8c94 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb index 22e14b80f71b..d2510c2f46bd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb index a6bf7fb49145..2be49373540a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb index 08b13a530f7d..0d514d6bb48c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb index 1aa8790661af..cdf36e4c6b04 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb index 647f879a4e6a..d62c09e78506 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb index a2f2a6691923..df57e5bd28dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb index 2748191a09be..2d2bb35eeb25 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb index a32666f2a9ef..6b3c5f535190 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb index c59b3293494b..2ebbb8b964ad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb index 90043b9f86ef..4e13a4e879c1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb index 979e00c5e2d1..089d4e01e4f1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb index 5b1e06a377f9..21ef0349a01e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb index b169f5837ec8..31c104de3eab 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb index 4caf656e00d2..700b9a9139ef 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb index 9ba686701f71..f49e147087f1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb index f1643e6a7415..954914055c6e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb index fcfe4a615abd..f8387a866b10 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb index c4de672d6fdb..9450fc09a397 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb index 3a22e8d90f62..351bcf6d3b94 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb index 5798c7d7fee4..771dbbb7ade0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb index eb243e708657..3b8079dd1fa9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb index 41f73b473560..d43f48202612 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb index 2f0ca863b6f4..6cd2a1560400 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb index 5950a8fac1ae..411d0a8452ca 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb index 6e2fab9b3345..684dbc65841c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb index 682080fc9043..d1f0814edc5c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb index 9b5102487cd4..c3efad2cf64d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb index c4f479298443..650d5181843f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb index b64f8c7fe773..6bc1a26ad17a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb index ed11ef1a2d0b..a58943d63128 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb index 95026b624c5b..0308f8a5ad24 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb index fcc6491afebe..0a2e4aaaee0b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb index 20d4007227f3..1a834ba1e2c0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb index 72d4c1984674..04bf182d6111 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb index 9a9bb2f972a5..b7cc0315c746 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb index 958a16f2b7d7..91a6e86252b1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb index e7446d2284e7..b69a18296f1e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb index c8bd47bdedad..6510004f596a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb index 3d3326de92a7..16ed9683aad9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb index de0fe6106bd1..59b479846819 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb index f0c859768654..c2ce599e591d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb index eeb5c23f267a..88121fed97ac 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb index 3bc5efee86b2..ea68b31ea7d8 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb index 5520f5dd55b2..ab727cfeab6f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb index c18219ca6abc..d06d098a05ba 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb index 0d38b3fb5188..6bb8c12c7625 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb index f2603469d9e9..720eb9a879d7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb index 216b33432035..fd9c9497e227 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb index d492079bce0f..b2676240e767 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb index d343e09bc8e8..9e62fc5d7d5c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb index 50d276525000..9193d3947fc0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb index 49f7b65346bd..4d4ab5d746e5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb index 3b7b7afdb5ab..cdcf6b1c5dfd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb index e2401d4ab93c..e66a0c58044a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb index 393680086ea5..293bf2160f68 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb index d3cc45aa1d61..a10be9d7033a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb index 25faee848d31..e9b645d1dcbe 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb index d361cda54bda..e50f06e555cd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb index e488f9cea4af..d969d96d14e1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb index 2798bac25afb..d3c47366408e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb index 0e98c625d7e8..79e2601a3950 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb index 87c879493f7e..cd945b510c57 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb index d212dc95d103..58d7b7105437 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb index 86b7e83e1782..87039ee3847c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb index d2ce13e41532..5c6975a7e0d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb index 50317de1fc21..9c3d3c797d7d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb index 4bc136946199..9767309ba008 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb index ffbe09957794..058cc57bb288 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb index e9690c91ca04..5b337c8254dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb index 165281f7273f..4e45d13facbf 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb index 4a4f768dad52..668327ff63dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb index 3dc9237addd5..501c902dee0b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb index e5b398854842..6a4e33bf15c3 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb index 520159b397bc..490af09ca942 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb index b7351d32d5d2..a05a5462fd00 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb index aa2d6c0df6e0..50ace30f1702 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb index e23e844cecb0..b68c12fb3003 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb index b84ecd706cd3..e50d1ca4f146 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb index 554a8464adfe..263f2eb40bce 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb index 11ca797e44d9..072ffc5c5e3c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb index 3f84d1bf971c..6ceefbcd5ee9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb index ee9c578d4813..d1dc65cf7331 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb index 73e5b36cb2e1..3d6fa0134f03 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb index 0f21bbb51fbc..65cce8eedd0a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb index 6427f273c11a..99da2a7379d2 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb index 22e78dfc88db..aae7187d3bc3 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb index d7914533b0e1..444f346f95aa 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb index ed98099405b7..dedd98287a41 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb index dc6fa57dda92..0fe2ffb749d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb index aaee3267a54b..5c31844c5c2f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb index 5b963718e944..361868712e90 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb index 4c4206817b11..2935731c5fc6 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb index 9b0d4f310390..3b9b815133bd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb index df679dc8a592..ffbd61628a98 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb index f4bf3526b679..13115347e581 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb index fcc7a44b9df3..bb7144364d14 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb index 0e8e8c092895..8282a0f080fc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb index e58e24faaaa2..a6f7d439e86b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb index 700dee7c59df..a240185dfa7d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb index 690d5a69e022..536fce1bdfaf 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb index f279f6252ae8..b6f5e812e70d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb index b35660815568..f359bf4bc293 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb index 759f715eb4a2..2068a53a1b70 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb index f0db7e5f99a5..2705002746ab 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb index 75c51b7653d6..dcb5e918d1ad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb index 7502aa52e7bc..7a948b075dea 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb index c48a6b337e59..883a132363a8 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb index f4617137ac2c..98d6c89c513f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb index 4383546f8dd2..b3b8b543ed1a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb index 7189a5fb9764..29bb68e960e2 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb index d7e6a65e5f8d..0d14c8f4c394 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb index 4c402fe81b9e..cbb1cb183061 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb index 01f76ce89588..40faa8e51671 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb index c104c49ee7a9..87ef1c4fb84e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/shippingsettings.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb index 0b9e3de8749f..604128e638f4 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb index cb57e9a40f26..d1b2f02819fd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb index 18d34d40a98e..08f405184324 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb index c00da5bd22a5..8f1f50a9834f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb index 2ad8d30c4059..33c9185e4e0a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb index 95d7f3ae4c28..f99ed2289e41 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb index a854289164f9..c0a226adbfbc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb index 52a35d3fbf35..7147a2323140 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb index b57affeef72d..8ab3d9adf00f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb index edd918629f9b..46f3c20085d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb index 6f84bd71bdca..cbc86885e96c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb index 70c6bc912605..45348f1253e5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb index 819c307272b7..4a0c6f76ea19 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb index 1e86d0c76b4e..e44a62b60c86 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb index 39854de674c1..f300591e6416 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb index f083fda56793..edbccf383c55 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb index 51ac9a6431b9..64065f29308c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb index c72b55138d30..bd71f6b81cea 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb index c8a665edc908..b280d41b5a54 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb index 35ba76bcac5d..e0b82b1f8295 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb index eb03ba11cbb3..485719a9a0b7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb index 75ab1ce45670..5c14f5af0f01 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb index 13de86557cc3..c297a2b417f7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb index 3513243cf7e0..54dabf37a72e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb index 72ae8df16f22..d51673a9fd9a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb index 52456ab00414..fb5a0c3c1f9b 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb index c993acf07859..5cce1309c12e 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb index 14bcd4e6e8c4..573b329cfd2a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb index 7fe43e92f70e..19cff87b2479 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb index 7c95306305c1..e321368804c4 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb index 621fad05ed8b..08941d3f76aa 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb index e75d5d98c31c..0e7e0a4c0677 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb index e43503df009c..3546fd5ee3a5 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb index 5c3ea7d5c47a..1acb59925679 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb index e15f26099a53..5a79025d60ca 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb index 466fe41e6de1..540f0e3bee48 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb index 633741c5dbfc..b8c64f5452ff 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb index 9591d48c85ef..24696e1e3b3f 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb index dcbd42baa58a..f4a962b34c31 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb index d2fd6e1bee73..17d29142b0ff 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb index 1a94c0383167..7e1e51be1a93 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb index 97bf0c4255df..8dd1d729cfe1 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb index c6fc6e8b6e4c..7a16e89b6c29 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb index 368b58789bac..6757ee510eca 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb index 4c865d2b6b09..e5456e04275e 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb index 72f950c4baa7..5cbe635b16ed 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb index 015be9f3a772..1b414fd1bccf 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb index 656ab40bbec6..0390b017c401 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb index ff1c02a9eb4c..636da0a3420a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb index 1362050a0481..549b2ff4eff2 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb index e0495b2ffe70..50aab1617c36 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb index 5b5320d61a17..f4ad43686e83 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb index 0598d6b697b3..10625864f3dd 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb index ba88575c495d..9350ca479005 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb index 0c803c153838..109db1a50c89 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb index 16f55f4acc3e..e49308966533 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/Gemfile b/google-shopping-merchant-accounts-v1beta/snippets/Gemfile index a7f73a403b3c..1661c67a33c0 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-accounts-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb index 803670836afb..d2c2f5b7044e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb index 47f311a4bfdd..a6ee5c5ad6a3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb index 393588ae0a4c..05f1f64c9431 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb index d369099b2c44..eac84cb07759 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb index 3e48a32e7d1f..c4b1730282e8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb index 86c4e87272c7..be1e82db0406 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb index 3554900fd0bc..ce0c105100dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb index 1cf38d046c1a..507751cb8634 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb index dc943b676771..8db5c917e70c 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb index 345bd09c7136..d17466b32f14 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb index 93c788a4a622..74c288fe1afe 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb index 6d1573fc1e4a..fdcde06c5e91 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb index fcc35c73a7e8..aae1e325fdef 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb index 171ab793ed04..846c9557c5b8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb index 03e516e753fa..b23cc7bee95a 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb index c6a31cf864ca..b6b4835aabd4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb index 18e45e3f1cb4..7c8d4345e227 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb index d31cd42784fd..cd34a45a3abd 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb index 432da470f1b7..ea2f979f5cd7 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb index 7a43e09e5a15..b7b8c95e0bf3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb index eee50a9ad25d..c7b80b5590d4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb index 81b2d1a31617..4bdc2f2116dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb index 1ef7c40b4ed2..f1cfbb47c184 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb index c43a41a42c21..efce339f0560 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb index ee36b7e4d978..cb5845dd1e9e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb index 050de54dc489..db5611b0eb27 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb index 514ec60fad9a..5d6017d56856 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb index 8eb031e27f9c..b371da4cfb57 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb index eb739e8bc234..7119627b9aeb 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb index 5a380ce71a8d..19c3e42071a9 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb index 1a21182c1c8e..e093657726da 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb index 153bf3157830..0e786754f919 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb index f04e7ea894e6..925b54971955 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb index 649600a3832f..f41ee01542d3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb index 2ad1a87a4dc7..3b764f8ff84d 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb index a721ff65ffeb..61b421be1805 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb index 37957e8c2e0a..c9ab04368e53 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb index aaefeb79cf29..83bc00b2c1df 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb index b76787b97a49..642b3bdcdc00 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb index f27d8326cfed..2105a2c947a5 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb index 7f4cd1cdb609..f9a0b2b0a844 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb index 7f0ec0d5e809..4034ff554461 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb index e89bf3cafae7..775a998697dd 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb index b9c032c2c807..d1bdf22bfbc7 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb index 57f292103016..ca8e55bfb1f4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb index ada29e397f48..f3249c03a812 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb index 6202655807c6..8b0ad849b120 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb index 76e51d641c61..97ee0432dab6 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb index 6ef45b60617e..6929030f8c97 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb index 540caa00776f..390e2d0f9420 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb index b0c6a6bd7fab..ef1e556cc578 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb index fe533fe10c2e..e6cbd703b4dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb index 4fca2591ee80..592e8881b30b 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb index 0fc5744a5775..6002493fa06e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb index 88374fd77851..fce83e3ae057 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb index a0b07367d5a0..b1e3c65fd56f 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb index b5a82fb1b1ba..72780fd192f1 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb index 6865f3b900cf..e0039a91db2f 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb index de258e98d4c3..99337d55834e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb index 18abf463c0c5..07a8a692be99 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb index b92da10aba97..7e279d65f5b8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb index af6283104665..17dca433a258 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb index e48659573536..a39e0c84162a 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb index d317d1105e8d..d759cbee13e3 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb index 065475394d66..3b4c93312537 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb index b27b6e2ee89b..1762325f7744 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb index feec5fb8c53d..f72de9504a1c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb index a40dda2f36a6..2448c1d9965f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb index 087cf074de0f..fb9595c10ef5 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb index 4a17933ed27c..62d77fd98b02 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb index 9cfc801291d0..007709ef9bbc 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb index 8320d93c3448..b804a96086a9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb index 1f8e1210d404..0d03f7e27cbf 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb index 296549d22367..e568de354b9e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb index 01f488af508e..81bf70221d6e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb index ba6bcd518665..5432846fad2e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb index 953e5676b607..3661fc4b5cb9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb index 5e2846aa60d9..e1e55704cfc9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb index 657001f8f1ac..20f3daac2d1a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb index 351aa14568e3..d8cf55cffb39 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb index 420eb5e11a56..3ba57bd06fbd 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb index bbfbea38a1f9..128cf717a145 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb index 464fd0942e23..1e3541aadd85 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb index ebd5da6a1b56..cd6e3250647c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb index 31f67948a63b..4f838dc12447 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb index 74b051db43e3..d1109975a30a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb index 8fbcf7ee9df2..238e43a52a09 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb index ae338190c936..a4b6db6efe0f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb index 9f55e3ddf80b..abdc1010bd13 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb index 43f09716760a..31103ff9a7aa 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb index 9163512e3630..28b36c651b32 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb index 892f65d041d2..7d9ec650854d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb index 0712e0b73d94..0a94b37e7a87 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb index 9e703ded4aaa..61d80f67f1a5 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb index 1f789df40975..24f5f703463f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb index e0c69303b185..541f4c4af0ec 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb index 161a38d87d22..40c4e008e3f6 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb index 2a6c49e2a75c..9441edd6a6fd 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb index 6f26318c7d09..95a5bb2889f3 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb index abc687dfd5cc..fda485c81acf 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb index 378c84ece4f4..4e97a17d0072 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb index 5f279aeb90cd..54fe923feebb 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb index 72be71f6caa4..c8399e11c1e1 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb index 76d380d92851..9d60cb71c44e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb index 677d4b46b7b1..0cbc348828d4 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb index 7b67ce9c40a4..380202e72500 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb index 2dde69788fb5..91c368ce6958 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb index e5f19bc8920f..5d47d7fdf72c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb index 33e18ca53f2d..698e3d23528b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb index 5190cb7e0f0e..7a80d1a66e9b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb index 6a642717ebf8..b8d04e0ec14d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb index 853c49ee65bb..555555c1a601 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb index 0a21c1d41bf9..12786998e452 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb index 6ed0a997c97a..a07f02f18b17 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb index e7306e68d20d..eecca8da77a7 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb index cb739a124a49..aa3c6d3f45be 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb index c7dbb758abfa..f42810b4c121 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb index 8a8f81607af3..cecc22896b0b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb index 62e1580ad356..881bf00a9a36 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb index 6c3faf88b05f..2e8bb0f3b620 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb index 9573dbad646c..e71cf60afd5d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb index 03016c82d896..55c4d6896e48 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb index 271283c5e765..21191fcbe518 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/helper.rb b/google-shopping-merchant-accounts-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-accounts-v1beta/test/helper.rb +++ b/google-shopping-merchant-accounts-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/.owlbot-manifest.json b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json index 748e7f6a2b7e..da32f68bba00 100644 --- a/google-shopping-merchant-conversions-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json @@ -50,6 +50,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-conversions-v1/.toys.rb b/google-shopping-merchant-conversions-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-conversions-v1/.toys.rb +++ b/google-shopping-merchant-conversions-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/Rakefile b/google-shopping-merchant-conversions-v1/Rakefile index 9df3e94cb106..09036b63c7b4 100644 --- a/google-shopping-merchant-conversions-v1/Rakefile +++ b/google-shopping-merchant-conversions-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb index cd4a31efc2cc..2992146c576e 100644 --- a/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb +++ b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb index f4bc3897ae40..d3e68a85ea00 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb index c601ef34743d..ec823442ad31 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb index 2235349300b2..db5605285d85 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb index 8e576f7418f8..c408f4a3e17b 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb index 494efd8f88cc..58f06044072d 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb index cf4f77c3738a..c4ae00d76953 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb index 3c08f8019fc9..172557541b57 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb index 8ceec5b5d088..cba0818d9244 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb index 61a880c91d9a..851e5c7243ac 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb index 1649a61e00ab..f308c62c77bc 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/Gemfile b/google-shopping-merchant-conversions-v1/snippets/Gemfile index fba3696ae69b..f46fb0f94950 100644 --- a/google-shopping-merchant-conversions-v1/snippets/Gemfile +++ b/google-shopping-merchant-conversions-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb index b2fa0d3d4065..827b4a926e65 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb index fc019cac403d..ba6b1ac8bfc2 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb index 362205bbc193..d9f971d44b48 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb index bbf5190715dd..658a5ab951e4 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb index 9141cef101f7..22afe1c1ac8b 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb index 591509a31096..67c6808b8b3c 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb index 36ff7b84e6cb..58ab80ed3978 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb index 7b273d792f3d..31c68180521e 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb index 444c5e31ac23..407eedb71e02 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/helper.rb b/google-shopping-merchant-conversions-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-conversions-v1/test/helper.rb +++ b/google-shopping-merchant-conversions-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json b/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json index cf2324bcdeae..bc907b98bfdd 100644 --- a/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json @@ -50,6 +50,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-conversions-v1beta/.toys.rb b/google-shopping-merchant-conversions-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-conversions-v1beta/.toys.rb +++ b/google-shopping-merchant-conversions-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/Rakefile b/google-shopping-merchant-conversions-v1beta/Rakefile index 9c4210d3bb53..df7ec62e5251 100644 --- a/google-shopping-merchant-conversions-v1beta/Rakefile +++ b/google-shopping-merchant-conversions-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb index 2baad10c91e5..8aae5f49f6d7 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb index ee46088797be..efa027bc825f 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb index 133e73ea5992..ec937b0d20dd 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb index 831933f58873..5b66e173552d 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb index 0af8d7fa257d..fc78775e84b1 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb index f4f9fd7ec5b1..0957b8b6c5be 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb index 27fae40d67a2..050042f123cb 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb index b8a4a49c9c0a..36efb49acdb8 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb index afbc6bd2fb69..fe73baae518b 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb index d1487011bed2..f25fc3f2e077 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.v1beta' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb index 76096c886662..9238cbdb5b76 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb index 41a92125707f..f44123837180 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/google-shopping-merchant-conversions-v1beta/snippets/Gemfile index 1581ecc2beb1..6a2aef3b6555 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-conversions-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb index 00d2bb51f8ba..8081af021563 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb index 33baf235f812..67d343214d62 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb index 13a423f81d28..6c928140a9a8 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb index b6e2f4c2ddc8..45183543d605 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb index 8950cd559583..88a2acac8a2f 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb index 440d8b6b77bc..e65690f44b15 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb index 657f9e040e90..ac9354d66391 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb index 8b9a3c199f66..dce67f4f09e7 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb index b75bf55a3053..67b1bc0f16d7 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/helper.rb b/google-shopping-merchant-conversions-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-conversions-v1beta/test/helper.rb +++ b/google-shopping-merchant-conversions-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 1feb0d2af605..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 1b2942f8b010..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 29f093951a00..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,1723 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_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 59b89648ea0d..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,1589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_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 300dbef56aa1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb +++ /dev/null @@ -1,21 +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 -pool.add_serialized_file(descriptor_data) - -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 d039df3934ca..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb +++ /dev/null @@ -1,27 +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 -pool.add_serialized_file(descriptor_data) - -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 1a3b0059d4ea..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb +++ /dev/null @@ -1,24 +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 -pool.add_serialized_file(descriptor_data) - -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 136678f8b4cc..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb +++ /dev/null @@ -1,21 +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 -pool.add_serialized_file(descriptor_data) - -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 56270c4fa739..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb +++ /dev/null @@ -1,22 +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 -pool.add_serialized_file(descriptor_data) - -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 c5a7d84f453f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/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 -pool.add_serialized_file(descriptor_data) - -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 08dfdde3eaf9..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,24 +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 -pool.add_serialized_file(descriptor_data) - -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 d0c56927e4c0..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb +++ /dev/null @@ -1,28 +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 -pool.add_serialized_file(descriptor_data) - -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 98c499519688..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,22 +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 -pool.add_serialized_file(descriptor_data) - -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 1c1b2e5600fd..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb +++ /dev/null @@ -1,50 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 967f3a73832e..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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_scan_config parent: parent, scan_config: scan_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.start_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.stop_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_finding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_finding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_finding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_finding_type_stats({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_finding_type_stats parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 8d7b2344ec03..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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.stop_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.stop_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_finding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_finding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_finding_type_stats({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_finding_type_stats parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 8ade84c6e045..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 bb6157657854..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 ea2a952f4319..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb +++ /dev/null @@ -1,804 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 c95d43b8e04d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb +++ /dev/null @@ -1,733 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 58e6055652da..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb +++ /dev/null @@ -1,46 +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. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 0f90ae8cb19d..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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.create_execution({ parent: parent, execution: execution }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_execution name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_execution({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.cancel_execution({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.cancel_execution name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.cancel_execution({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 d372ed41a44a..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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 fdd0f2f49588..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 9d5c4fa29f8a..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 d4fb4d8aa377..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb +++ /dev/null @@ -1,791 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 240d00363b7a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb +++ /dev/null @@ -1,37 +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. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 578052bdc7b5..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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 2a49b1ac8710..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 6733ad725cad..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 63a66d7d6400..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb +++ /dev/null @@ -1,1076 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 f1ff4db6066f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 766c6a240c0e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb +++ /dev/null @@ -1,999 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 d1fc051655e0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, 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 0ccabf5cfd2d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb +++ /dev/null @@ -1,44 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 16718a9ef007..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 cf13cbce88dc..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workflow({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workflow name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 c48d4214d226..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 2a111a564bdc..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 30b765800a41..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 5a3b0e5fa1ca..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 293530077430..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 ccbb62fed292..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +++ /dev/null @@ -1,884 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 7269c2d1da8f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 7b8323216f07..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb +++ /dev/null @@ -1,38 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 0f0081e8d9d0..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 fc962295d47a..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 0c4369c49b95..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore b/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json deleted file mode 100644 index 93f834b12343..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "workloadmanager.googleapis.com", - "api_shortname": "workloadmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest", - "distribution_name": "google-cloud-workload_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "workloadmanager", - "name_pretty": "Workload Manager V1 API", - "product_documentation": "https://docs.cloud.google.com/workload-manager/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/workload-manager/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml deleted file mode 100644 index 0ebb64223e6c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workload_manager-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-workload_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts b/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts deleted file mode 100644 index e0b5e42eaf09..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workload Manager V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 2337734059a9..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workload_manager-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-workload_manager-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/workload_manager/v1" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workload_manager/v1" - -::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/workload_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/README.md b/owl-bot-staging/google-cloud-workload_manager-v1/README.md deleted file mode 100644 index 0789ec3bca6c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workload Manager V1 API - -Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. - -Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workload Manager V1 API. Most users should consider using -the main client gem, -[google-cloud-workload_manager](https://rubygems.org/gems/google-cloud-workload_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workload_manager-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/workloadmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workload_manager/v1" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new -request = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new # (request fields as keyword arguments...) -response = client.list_evaluations request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/workload-manager/docs) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/workload_manager/v1" -require "logger" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workload_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workload_manager-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-workload_manager`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-workload_manager-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile b/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile deleted file mode 100644 index aed0a0615aca..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-workload_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workload_manager/v1/workload_manager/credentials" - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-workload_manager-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-workload_manager-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-workload_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workload_manager-v1" - header "google-cloud-workload_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workload_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workload_manager-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-workload_manager-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-workload_manager-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json deleted file mode 100644 index 856bd67ef541..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.workloadmanager.v1", - "libraryPackage": "::Google::Cloud::WorkloadManager::V1", - "services": { - "WorkloadManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client", - "rpcs": { - "ListEvaluations": { - "methods": [ - "list_evaluations" - ] - }, - "GetEvaluation": { - "methods": [ - "get_evaluation" - ] - }, - "CreateEvaluation": { - "methods": [ - "create_evaluation" - ] - }, - "UpdateEvaluation": { - "methods": [ - "update_evaluation" - ] - }, - "DeleteEvaluation": { - "methods": [ - "delete_evaluation" - ] - }, - "ListExecutions": { - "methods": [ - "list_executions" - ] - }, - "GetExecution": { - "methods": [ - "get_execution" - ] - }, - "RunEvaluation": { - "methods": [ - "run_evaluation" - ] - }, - "DeleteExecution": { - "methods": [ - "delete_execution" - ] - }, - "ListExecutionResults": { - "methods": [ - "list_execution_results" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "ListScannedResources": { - "methods": [ - "list_scanned_resources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec b/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec deleted file mode 100644 index 0a9c127541cd..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workload_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workload_manager-v1" - gem.version = Google::Cloud::WorkloadManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details." - gem.summary = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb deleted file mode 100644 index f9223fbaf153..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/workload_manager/v1" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb deleted file mode 100644 index 7db86331d30c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workload_manager/v1/workload_manager" -require "google/cloud/workload_manager/v1/version" - -module Google - module Cloud - module WorkloadManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workload_manager/v1" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workload_manager/v1" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/workload_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb deleted file mode 100644 index cf11c29b7951..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module WorkloadManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workload_manager/v1/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WorkloadManager"] - parent_config = while namespace.any? - parent_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-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb deleted file mode 100644 index 3704093c98dd..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workload_manager/v1/workload_manager/rest" -require "google/cloud/workload_manager/v1/bindings_override" -require "google/cloud/workload_manager/v1/version" - -module Google - module Cloud - module WorkloadManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workload_manager/v1/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb deleted file mode 100644 index 7ebe4521c164..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb deleted file mode 100644 index f0fd4e71a36c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.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/workload_manager/v1/version" - -require "google/cloud/workload_manager/v1/workload_manager/credentials" -require "google/cloud/workload_manager/v1/workload_manager/paths" -require "google/cloud/workload_manager/v1/workload_manager/operations" -require "google/cloud/workload_manager/v1/workload_manager/client" -require "google/cloud/workload_manager/v1/workload_manager/rest" - -module Google - module Cloud - module WorkloadManager - module V1 - ## - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workload_manager/v1/workload_manager" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workload_manager/v1/workload_manager/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module WorkloadManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "workload_manager", "helpers.rb" -require "google/cloud/workload_manager/v1/workload_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb deleted file mode 100644 index 50a0dcbe1129..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb +++ /dev/null @@ -1,1774 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - ## - # Client for the WorkloadManager service. - # - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workload_manager_stub - - ## - # Configure the WorkloadManager Client class. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WorkloadManager clients - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WorkloadManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_evaluations.timeout = 60.0 - default_config.rpcs.list_evaluations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_evaluation.timeout = 60.0 - default_config.rpcs.get_evaluation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_evaluation.timeout = 60.0 - - default_config.rpcs.update_evaluation.timeout = 60.0 - - default_config.rpcs.delete_evaluation.timeout = 60.0 - - default_config.rpcs.list_executions.timeout = 60.0 - default_config.rpcs.list_executions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_execution.timeout = 60.0 - default_config.rpcs.get_execution.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.run_evaluation.timeout = 60.0 - - default_config.rpcs.delete_execution.timeout = 60.0 - - default_config.rpcs.list_execution_results.timeout = 60.0 - default_config.rpcs.list_execution_results.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 60.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_scanned_resources.timeout = 60.0 - default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workload_manager_stub.universe_domain - end - - ## - # Create a new WorkloadManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WorkloadManager 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/workloadmanager/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @workload_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @workload_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @workload_manager_stub.endpoint - config.universe_domain = @workload_manager_stub.universe_domain - config.logger = @workload_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.logger - end - - # Service calls - - ## - # Lists Evaluations in a given project and location. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEvaluationsRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter to be applied when listing the evaluation results. - # @param order_by [::String] - # Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :get_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Evaluation in a given project and location. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @param evaluation_id [::String] - # Required. Id of the requesting object. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :create_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.evaluation&.name - header_params["evaluation.name"] = request.evaluation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :update_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_evaluation(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-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/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :delete_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Executions in a given project and location. - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @workload_manager_stub.call_rpc :list_executions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_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 - - ## - # Gets details of a single Execution. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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) - # 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 resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @workload_manager_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 - - ## - # Creates a new Execution in a given project and location. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param execution_id [::String] - # Required. ID of the execution which will be created. - # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :run_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Execution. - # - # @overload delete_execution(request, options = nil) - # Pass arguments to `delete_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_execution(name: nil, request_id: nil) - # Pass arguments to `delete_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 resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - # - # # Call the delete_execution method. - # result = client.delete_execution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :delete_execution, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the result of a single evaluation. - # - # @overload list_execution_results(request, options = nil) - # Pass arguments to `list_execution_results` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_execution_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - # - # # Call the list_execution_results method. - # result = client.list_execution_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - # p item - # end - # - def list_execution_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_execution_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_execution_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_execution_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_execution_results, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules in a given project. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter based on primary_category, secondary_category. - # @param custom_rules_bucket [::String] - # The Cloud Storage bucket name for custom rules. - # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - # p result - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_rules, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all scanned resources for a single Execution. - # - # @overload list_scanned_resources(request, options = nil) - # Pass arguments to `list_scanned_resources` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent for ListScannedResourcesRequest. - # @param rule [::String] - # Rule name. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - # - # # Call the list_scanned_resources method. - # result = client.list_scanned_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - # p item - # end - # - def list_scanned_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scanned_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scanned_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_scanned_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the WorkloadManager API. - # - # This class represents the configuration for WorkloadManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_evaluations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the WorkloadManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `delete_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_execution - ## - # RPC-specific configuration for `list_execution_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_execution_results - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `list_scanned_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scanned_resources - - # @private - def initialize parent_rpcs = nil - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution - @delete_execution = ::Gapic::Config::Method.new delete_execution_config - list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results - @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources - @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb deleted file mode 100644 index 3a15fec5e622..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Credentials for the WorkloadManager 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb deleted file mode 100644 index fcc635313813..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb deleted file mode 100644 index d9be17987e55..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Path helper methods for the WorkloadManager 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 Evaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/evaluations/{evaluation}` - # - # @param project [String] - # @param location [String] - # @param evaluation [String] - # - # @return [::String] - def evaluation_path project:, location:, evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/evaluations/#{evaluation}" - end - - ## - # Create a fully-qualified Execution resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}` - # - # @param project [String] - # @param location [String] - # @param evaluation [String] - # @param execution [String] - # - # @return [::String] - def execution_path project:, location:, evaluation:, execution: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" - - "projects/#{project}/locations/#{location}/evaluations/#{evaluation}/executions/#{execution}" - 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb deleted file mode 100644 index 402e8abf697d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/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/workload_manager/v1/version" -require "google/cloud/workload_manager/v1/bindings_override" - -require "google/cloud/workload_manager/v1/workload_manager/credentials" -require "google/cloud/workload_manager/v1/workload_manager/paths" -require "google/cloud/workload_manager/v1/workload_manager/rest/operations" -require "google/cloud/workload_manager/v1/workload_manager/rest/client" - -module Google - module Cloud - module WorkloadManager - module V1 - ## - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workload_manager/v1/workload_manager/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module WorkloadManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workload_manager/v1/workload_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb deleted file mode 100644 index 205758884d6f..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb +++ /dev/null @@ -1,1655 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - ## - # REST client for the WorkloadManager service. - # - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workload_manager_stub - - ## - # Configure the WorkloadManager Client class. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WorkloadManager clients - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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", "WorkloadManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_evaluations.timeout = 60.0 - default_config.rpcs.list_evaluations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_evaluation.timeout = 60.0 - default_config.rpcs.get_evaluation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_evaluation.timeout = 60.0 - - default_config.rpcs.update_evaluation.timeout = 60.0 - - default_config.rpcs.delete_evaluation.timeout = 60.0 - - default_config.rpcs.list_executions.timeout = 60.0 - default_config.rpcs.list_executions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_execution.timeout = 60.0 - default_config.rpcs.get_execution.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.run_evaluation.timeout = 60.0 - - default_config.rpcs.delete_execution.timeout = 60.0 - - default_config.rpcs.list_execution_results.timeout = 60.0 - default_config.rpcs.list_execution_results.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 60.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_scanned_resources.timeout = 60.0 - default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.universe_domain - end - - ## - # Create a new WorkloadManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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 - - @workload_manager_stub = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workload_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @workload_manager_stub.endpoint - config.universe_domain = @workload_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workload_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.logger - end - - # Service calls - - ## - # Lists Evaluations in a given project and location. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEvaluationsRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter to be applied when listing the evaluation results. - # @param order_by [::String] - # Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_evaluations, "evaluations", request, result, 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 Evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.get_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Evaluation in a given project and location. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @param evaluation_id [::String] - # Required. Id of the requesting object. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.create_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.update_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_evaluation(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-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/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.delete_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Executions in a given project and location. - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @workload_manager_stub.list_executions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_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 - - ## - # Gets details of a single Execution. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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) - # 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 resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @workload_manager_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 - - ## - # Creates a new Execution in a given project and location. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param execution_id [::String] - # Required. ID of the execution which will be created. - # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.run_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Execution. - # - # @overload delete_execution(request, options = nil) - # Pass arguments to `delete_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_execution(name: nil, request_id: nil) - # Pass arguments to `delete_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 resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - # - # # Call the delete_execution method. - # result = client.delete_execution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.delete_execution request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the result of a single evaluation. - # - # @overload list_execution_results(request, options = nil) - # Pass arguments to `list_execution_results` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_execution_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - # - # # Call the list_execution_results method. - # result = client.list_execution_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - # p item - # end - # - def list_execution_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_execution_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_execution_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_execution_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_execution_results, "execution_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules in a given project. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter based on primary_category, secondary_category. - # @param custom_rules_bucket [::String] - # The Cloud Storage bucket name for custom rules. - # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - # p result - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_rules request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all scanned resources for a single Execution. - # - # @overload list_scanned_resources(request, options = nil) - # Pass arguments to `list_scanned_resources` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent for ListScannedResourcesRequest. - # @param rule [::String] - # Rule name. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - # - # # Call the list_scanned_resources method. - # result = client.list_scanned_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - # p item - # end - # - def list_scanned_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scanned_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scanned_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_scanned_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, "scanned_resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the WorkloadManager REST API. - # - # This class represents the configuration for WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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_evaluations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 WorkloadManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `delete_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_execution - ## - # RPC-specific configuration for `list_execution_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_execution_results - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `list_scanned_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scanned_resources - - # @private - def initialize parent_rpcs = nil - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution - @delete_execution = ::Gapic::Config::Method.new delete_execution_config - list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results - @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources - @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb deleted file mode 100644 index f2106f7965b4..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb deleted file mode 100644 index d0a00c830b48..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb +++ /dev/null @@ -1,816 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workloadmanager/v1/service_pb" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - ## - # REST service stub for the WorkloadManager 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_evaluations REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] - # A result object deserialized from the server's reply - def list_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # A result object deserialized from the server's reply - def get_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::Evaluation.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_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_executions REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::ListExecutionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 get_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 run_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_execution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_execution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_execution_results REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] - # A result object deserialized from the server's reply - def list_execution_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_execution_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_execution_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_rules REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scanned_resources REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] - # A result object deserialized from the server's reply - def list_scanned_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scanned_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_scanned_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.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_evaluations REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/evaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/evaluations", - body: "evaluation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{evaluation.name}", - body: "evaluation", - matches: [ - ["evaluation.name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_executions REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}/executions:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_execution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_execution_results REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_execution_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/results", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scanned_resources REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scanned_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scannedResources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb deleted file mode 100644 index 33d6b9a3ce93..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workloadmanager/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/workloadmanager/v1/service.proto\x12\x1fgoogle.cloud.workloadmanager.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\"\xd0\x07\n\nEvaluation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12H\n\x0fresource_filter\x18\x03 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceFilter\x12\x12\n\nrule_names\x18\x04 \x03(\t\x12M\n\x0fresource_status\x18\x06 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.workloadmanager.v1.Evaluation.LabelsEntry\x12\x15\n\x08schedule\x18\n \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x0b \x01(\t\x12S\n\x0f\x65valuation_type\x18\x0c \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationType\x12X\n\x15\x62ig_query_destination\x18\r \x01(\x0b\x32\x34.google.cloud.workloadmanager.v1.BigQueryDestinationB\x03\xe0\x41\x01\x12:\n\x07kms_key\x18\x0f \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SAP\x10\x01\x12\x0e\n\nSQL_SERVER\x10\x02\x12\t\n\x05OTHER\x10\x03:\x8a\x01\xea\x41\x86\x01\n)workloadmanager.googleapis.com/Evaluation\x12@projects/{project}/locations/{location}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x0b\n\t_schedule\"\xa7\x02\n\x0eResourceFilter\x12\x0e\n\x06scopes\x18\x01 \x03(\t\x12\x1c\n\x14resource_id_patterns\x18\x02 \x03(\t\x12^\n\x10inclusion_labels\x18\x03 \x03(\x0b\x32\x44.google.cloud.workloadmanager.v1.ResourceFilter.InclusionLabelsEntry\x12O\n\x13gce_instance_filter\x18\x04 \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.GceInstanceFilter\x1a\x36\n\x14InclusionLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"-\n\x11GceInstanceFilter\x12\x18\n\x10service_accounts\x18\x04 \x03(\t\"\x9e\x01\n\x0eResourceStatus\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ResourceStatus.State\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\"^\n\x13\x42igQueryDestination\x12 \n\x13\x64\x65stination_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x63reate_new_results_table\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa4\x01\n\x16ListEvaluationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x89\x01\n\x17ListEvaluationsResponse\x12@\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x14GetEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\"\xd7\x01\n\x17\x43reateEvaluationRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x03 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x17UpdateEvaluationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x02 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17\x44\x65leteEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x0c\n\tExecution\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x37\n\x0einventory_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\x05state\x18\x05 \x01(\x0e\x32\x30.google.cloud.workloadmanager.v1.Execution.StateB\x03\xe0\x41\x03\x12\x1a\n\revaluation_id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.cloud.workloadmanager.v1.Execution.LabelsEntry\x12\x41\n\x08run_type\x18\x08 \x01(\x0e\x32/.google.cloud.workloadmanager.v1.Execution.Type\x12O\n\x0crule_results\x18\t \x03(\x0b\x32\x34.google.cloud.workloadmanager.v1.RuleExecutionResultB\x03\xe0\x41\x03\x12\x62\n\x15\x65xternal_data_sources\x18\n \x03(\x0b\x32>.google.cloud.workloadmanager.v1.Execution.ExternalDataSourcesB\x03\xe0\x41\x01\x12G\n\x07notices\x18\x0b \x03(\x0b\x32\x31.google.cloud.workloadmanager.v1.Execution.NoticeB\x03\xe0\x41\x03\x12\x46\n\x06\x65ngine\x18\x0c \x01(\x0e\x32\x31.google.cloud.workloadmanager.v1.Execution.EngineB\x03\xe0\x41\x01\x12O\n\x0eresult_summary\x18\r \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.Execution.SummaryB\x03\xe0\x41\x03\x1a\xde\x01\n\x13\x45xternalDataSources\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x04type\x18\x03 \x01(\x0e\x32\x43.google.cloud.workloadmanager.v1.Execution.ExternalDataSources.TypeB\x03\xe0\x41\x02\x12\x17\n\nasset_type\x18\x04 \x01(\tB\x03\xe0\x41\x02\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42IG_QUERY_TABLE\x10\x01\x1a\x1e\n\x06Notice\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1aS\n\x07Summary\x12\x15\n\x08\x66\x61ilures\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cnew_failures\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tnew_fixes\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"9\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_TIME\x10\x01\x12\r\n\tSCHEDULED\x10\x02\"<\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45NGINE_SCANNER\x10\x01\x12\x06\n\x02V2\x10\x02:\x9e\x01\xea\x41\x9a\x01\n(workloadmanager.googleapis.com/Execution\x12Wprojects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}*\nexecutions2\texecution\"\x93\x02\n\x13RuleExecutionResult\x12\x0c\n\x04rule\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.RuleExecutionResult.StateB\x03\xe0\x41\x03\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x14\n\x0cresult_count\x18\x04 \x01(\x03\x12\x1e\n\x16scanned_resource_count\x18\x05 \x01(\x03\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_SUCCESS\x10\x01\x12\x11\n\rSTATE_FAILURE\x10\x02\x12\x11\n\rSTATE_SKIPPED\x10\x03\"\xa2\x01\n\x15ListExecutionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(workloadmanager.googleapis.com/Execution\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x86\x01\n\x16ListExecutionsResponse\x12>\n\nexecutions\x18\x01 \x03(\x0b\x32*.google.cloud.workloadmanager.v1.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\"\xcf\x01\n\x14RunEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x19\n\x0c\x65xecution_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\texecution\x18\x03 \x01(\x0b\x32*.google.cloud.workloadmanager.v1.ExecutionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x16\x44\x65leteExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"i\n\x1bListExecutionResultsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x84\x01\n\x1cListExecutionResultsResponse\x12K\n\x11\x65xecution_results\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ExecutionResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x03\n\x0f\x45xecutionResult\x12\x19\n\x11violation_message\x18\x01 \x01(\t\x12\x10\n\x08severity\x18\x02 \x01(\t\x12\x36\n\x04rule\x18\x03 \x01(\tB(\xfa\x41%\n#workloadmanager.googleapis.com/Rule\x12\x19\n\x11\x64ocumentation_url\x18\x04 \x01(\t\x12;\n\x08resource\x18\x05 \x01(\x0b\x32).google.cloud.workloadmanager.v1.Resource\x12L\n\x11violation_details\x18\x06 \x01(\x0b\x32\x31.google.cloud.workloadmanager.v1.ViolationDetails\x12:\n\x08\x63ommands\x18\x07 \x03(\x0b\x32(.google.cloud.workloadmanager.v1.Command\x12\x43\n\x04type\x18\x08 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ExecutionResult.Type\"@\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_PASSED\x10\x01\x12\x11\n\rTYPE_VIOLATED\x10\x02\"\xa9\x01\n\x07\x43ommand\x12\x46\n\ragent_command\x18\x01 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.AgentCommandH\x00\x12\x46\n\rshell_command\x18\x02 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.ShellCommandH\x00\x42\x0e\n\x0c\x63ommand_type\"\xa5\x01\n\x0c\x41gentCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12Q\n\nparameters\x18\x02 \x03(\x0b\x32=.google.cloud.workloadmanager.v1.AgentCommand.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x0cShellCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x02 \x01(\t\x12\x17\n\x0ftimeout_seconds\x18\x03 \x01(\x05\"\xa2\x01\n\nRuleOutput\x12N\n\x07\x64\x65tails\x18\x01 \x03(\x0b\x32\x38.google.cloud.workloadmanager.v1.RuleOutput.DetailsEntryB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x02\n\x10ViolationDetails\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12Q\n\x08observed\x18\x03 \x03(\x0b\x32?.google.cloud.workloadmanager.v1.ViolationDetails.ObservedEntry\x12\x45\n\x0brule_output\x18\x04 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.RuleOutputB\x03\xe0\x41\x03\x1a/\n\rObservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"?\n\x08Resource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x17\n\x0fservice_account\x18\x03 \x01(\t\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xed\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x18\n\x10primary_category\x18\x06 \x01(\t\x12\x1a\n\x12secondary_category\x18\x07 \x01(\t\x12\x15\n\rerror_message\x18\x08 \x01(\t\x12\x0b\n\x03uri\x18\t \x01(\t\x12\x13\n\x0bremediation\x18\n \x01(\t\x12\x0c\n\x04tags\x18\x0b \x03(\t\x12\x41\n\trule_type\x18\x0c \x01(\x0e\x32..google.cloud.workloadmanager.v1.Rule.RuleType\x12\x12\n\nasset_type\x18\r \x01(\t\"?\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41SELINE\x10\x01\x12\n\n\x06\x43USTOM\x10\x02:k\xea\x41h\n#workloadmanager.googleapis.com/Rule\x12\x34projects/{project}/locations/{location}/rules/{rule}*\x05rules2\x04rule\"\xfd\x01\n\x10ListRulesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#workloadmanager.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x05 \x01(\t\x12X\n\x0f\x65valuation_type\x18\x06 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationTypeB\x03\xe0\x41\x01\"I\n\x11ListRulesResponse\x12\x34\n\x05rules\x18\x01 \x03(\x0b\x32%.google.cloud.workloadmanager.v1.Rule\"\x89\x01\n\x1bListScannedResourcesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04rule\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x84\x01\n\x1cListScannedResourcesResponse\x12K\n\x11scanned_resources\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ScannedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"1\n\x0fScannedResource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t2\xb5\x15\n\x0fWorkloadManager\x12\xc6\x01\n\x0fListEvaluations\x12\x37.google.cloud.workloadmanager.v1.ListEvaluationsRequest\x1a\x38.google.cloud.workloadmanager.v1.ListEvaluationsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/evaluations\x12\xb3\x01\n\rGetEvaluation\x12\x35.google.cloud.workloadmanager.v1.GetEvaluationRequest\x1a+.google.cloud.workloadmanager.v1.Evaluation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/evaluations/*}\x12\xf5\x01\n\x10\x43reateEvaluation\x12\x38.google.cloud.workloadmanager.v1.CreateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x1fparent,evaluation,evaluation_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/evaluations:\nevaluation\x12\xf7\x01\n\x10UpdateEvaluation\x12\x38.google.cloud.workloadmanager.v1.UpdateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{evaluation.name=projects/*/locations/*/evaluations/*}:\nevaluation\x12\xd8\x01\n\x10\x44\x65leteEvaluation\x12\x38.google.cloud.workloadmanager.v1.DeleteEvaluationRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/evaluations/*}\x12\xd0\x01\n\x0eListExecutions\x12\x36.google.cloud.workloadmanager.v1.ListExecutionsRequest\x1a\x37.google.cloud.workloadmanager.v1.ListExecutionsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12/v1/{name=projects/*/locations/*/evaluations/*}/executions:run:\x01*\x12\xe3\x01\n\x0f\x44\x65leteExecution\x12\x37.google.cloud.workloadmanager.v1.DeleteExecutionRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>*] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb deleted file mode 100644 index 29a56647dbcf..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb +++ /dev/null @@ -1,991 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - # Represents a Workload Manager Evaluation configuration. - # An Evaluation defines a set of rules to be validated against a scope - # of Cloud resources. - # @!attribute [rw] name - # @return [::String] - # Name of resource that has the form - # `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`. - # @!attribute [rw] description - # @return [::String] - # Description of the Evaluation. - # @!attribute [rw] resource_filter - # @return [::Google::Cloud::WorkloadManager::V1::ResourceFilter] - # Resource filter for an evaluation defining the scope of resources to be - # evaluated. - # @!attribute [rw] rule_names - # @return [::Array<::String>] - # The names of the rules used for this evaluation. - # @!attribute [r] resource_status - # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus] - # Output only. [Output only] The current lifecycle state of the evaluation - # resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] schedule - # @return [::String] - # Crontab format schedule for scheduled evaluation, currently only supports - # the following fixed schedules: - # * `0 */1 * * *` # Hourly - # * `0 */6 * * *` # Every 6 hours - # * `0 */12 * * *` # Every 12 hours - # * `0 0 */1 * *` # Daily - # * `0 0 */7 * *` # Weekly - # * `0 0 */14 * *` # Every 14 days - # * `0 0 1 */1 *` # Monthly - # @!attribute [rw] custom_rules_bucket - # @return [::String] - # The Cloud Storage bucket name for custom rules. - # @!attribute [rw] evaluation_type - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Evaluation type. - # @!attribute [rw] big_query_destination - # @return [::Google::Cloud::WorkloadManager::V1::BigQueryDestination] - # Optional. The BigQuery destination for detailed evaluation results. - # If this field is specified, the results of each evaluation execution are - # exported to BigQuery. - # @!attribute [rw] kms_key - # @return [::String] - # Optional. Immutable. Customer-managed encryption key name, in the format - # projects/*/locations/*/keyRings/*/cryptoKeys/*. - # The key will be used for CMEK encryption of the evaluation resource. - class Evaluation - 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 - - # Possible types of workload evaluations like SAP, SQL Server, etc. - module EvaluationType - # Not specified. - EVALUATION_TYPE_UNSPECIFIED = 0 - - # SAP best practices. - SAP = 1 - - # SQL best practices. - SQL_SERVER = 2 - - # Customized best practices. - OTHER = 3 - end - end - - # Resource filter for an evaluation defining the scope of resources to be - # evaluated. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of evaluation resource. - # Format: - # * `projects/{project_id}` - # * `folders/{folder_id}` - # * `organizations/{organization_id}` - # @!attribute [rw] resource_id_patterns - # @return [::Array<::String>] - # The pattern to filter resources by their id - # For example, a pattern of ".*prod-cluster.*" will match all resources that - # contain "prod-cluster" in their ID. - # @!attribute [rw] inclusion_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to filter resources by. Each key-value pair in the map must exist - # on the resource for it to be included (e.g. VM instance labels). - # For example, specifying `{ "env": "prod", "database": "nosql" }` will only - # include resources that have labels `env=prod` and `database=nosql`. - # @!attribute [rw] gce_instance_filter - # @return [::Google::Cloud::WorkloadManager::V1::GceInstanceFilter] - # Filter compute engine resources. - class ResourceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InclusionLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A filter for matching Compute Engine instances. - # @!attribute [rw] service_accounts - # @return [::Array<::String>] - # If non-empty, only Compute Engine instances associated with at least one of - # the provided service accounts will be included in the evaluation. - class GceInstanceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The lifecycle status of an Evaluation resource. - # @!attribute [rw] state - # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus::State] - # State of the Evaluation resource. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of an evaluation, such as CREATING, ACTIVE, and DELETING. - module State - # The state has not been populated in this message. - STATE_UNSPECIFIED = 0 - - # Resource has an active Create operation. - CREATING = 1 - - # Resource has no outstanding operations on it or has active Update - # operations. - ACTIVE = 2 - - # Resource has an active Delete operation. - DELETING = 3 - end - end - - # BigQuery destination for evaluation results. - # @!attribute [rw] destination_dataset - # @return [::String] - # Optional. Destination dataset to save evaluation results. - # @!attribute [rw] create_new_results_table - # @return [::Boolean] - # Optional. Determines if a new results table will be created when an - # Execution is created. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListEvaluations RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListEvaluationsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filter to be applied when listing the evaluation results. - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results. - class ListEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListEvaluations RPC. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # The list of evaluations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateEvaluation RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @!attribute [rw] evaluation_id - # @return [::String] - # Required. Id of the requesting object. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateEvaluation RPC. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-delete. - class DeleteEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution that represents a single run of an Evaluation. - # @!attribute [rw] name - # @return [::String] - # The name of execution resource. The format is - # projects/\\{project}/locations/\\{location}/evaluations/\\{evaluation}/executions/\\{execution}. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Start time stamp. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] End time stamp. - # @!attribute [r] inventory_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Inventory time stamp. - # @!attribute [r] state - # @return [::Google::Cloud::WorkloadManager::V1::Execution::State] - # Output only. [Output only] State. - # @!attribute [r] evaluation_id - # @return [::String] - # Output only. [Output only] Evaluation ID. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] run_type - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Type] - # Type which represents whether the execution executed directly by user or - # scheduled according to the `Evaluation.schedule` field. - # @!attribute [r] rule_results - # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleExecutionResult>] - # Output only. Execution result summary per rule. - # @!attribute [rw] external_data_sources - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources>] - # Optional. External data sources. - # @!attribute [r] notices - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::Notice>] - # Output only. Additional information generated by the execution. - # @!attribute [rw] engine - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Engine] - # Optional. Engine. - # @!attribute [r] result_summary - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Summary] - # Output only. [Output only] Result summary for the execution. - class Execution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # External data sources for an execution. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of external data source. The name will be used inside the - # rego/sql to refer the external data. - # @!attribute [rw] uri - # @return [::String] - # Required. URI of external data source. example of bq table - # \\{project_ID}.\\{dataset_ID}.\\{table_ID}. - # @!attribute [rw] type - # @return [::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources::Type] - # Required. Type of external data source. - # @!attribute [rw] asset_type - # @return [::String] - # Required. The asset type of the external data source. - # This can be a supported Cloud Asset Inventory asset type - # (see https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # to override the default asset type, or it can be a custom type defined by - # the user. - class ExternalDataSources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of external data sources like BigQuery table, etc. - module Type - # Unknown type. - TYPE_UNSPECIFIED = 0 - - # BigQuery table. - BIG_QUERY_TABLE = 1 - end - end - - # Additional information generated by an execution. - # @!attribute [r] message - # @return [::String] - # Output only. Message of the notice. - class Notice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution summary. - # @!attribute [r] failures - # @return [::Integer] - # Output only. Number of failures. - # @!attribute [r] new_failures - # @return [::Integer] - # Output only. Number of new failures compared to the previous execution. - # @!attribute [r] new_fixes - # @return [::Integer] - # Output only. Number of new fixes compared to the previous execution. - class Summary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc. - module State - # State of execution is unspecified. - STATE_UNSPECIFIED = 0 - - # The execution is running in backend service. - RUNNING = 1 - - # The execution run succeeded. - SUCCEEDED = 2 - - # The execution run failed. - FAILED = 3 - end - - # The type of execution, could be on demand execute or scheduled execute. - module Type - # Type of execution is unspecified. - TYPE_UNSPECIFIED = 0 - - # Type of execution is one time. - ONE_TIME = 1 - - # Type of execution is scheduled. - SCHEDULED = 2 - end - - # The engine used for the execution. - module Engine - # The original CG. - ENGINE_UNSPECIFIED = 0 - - # SlimCG / Scanner. - ENGINE_SCANNER = 1 - - # Evaluation Engine V2. - V2 = 2 - end - end - - # Execution result summary per rule. - # @!attribute [rw] rule - # @return [::String] - # Rule name as plain text like `sap-hana-configured`. - # @!attribute [r] state - # @return [::Google::Cloud::WorkloadManager::V1::RuleExecutionResult::State] - # Output only. The execution status. - # @!attribute [rw] message - # @return [::String] - # Execution message, if any. - # @!attribute [rw] result_count - # @return [::Integer] - # Number of violations. - # @!attribute [rw] scanned_resource_count - # @return [::Integer] - # Number of total scanned resources. - class RuleExecutionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a rule execution like SUCCESS, FAILURE, etc. - module State - # Unknown state - STATE_UNSPECIFIED = 0 - - # Execution completed successfully - STATE_SUCCESS = 1 - - # Execution completed with failures - STATE_FAILURE = 2 - - # Execution was not executed - STATE_SKIPPED = 3 - end - end - - # Request message for the ListExecutions RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - class ListExecutionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListExecutions RPC. - # @!attribute [rw] executions - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution>] - # The list of Execution. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListExecutionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetExecution RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RunEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @!attribute [rw] execution_id - # @return [::String] - # Required. ID of the execution which will be created. - # @!attribute [rw] execution - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class RunEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteExecution RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListExecutionResults RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - class ListExecutionResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListExecutionResults RPC. - # @!attribute [rw] execution_results - # @return [::Array<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # The versions from the specified publisher. - # @!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 ListExecutionResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of an execution. - # @!attribute [rw] violation_message - # @return [::String] - # The violation message of an execution. - # @!attribute [rw] severity - # @return [::String] - # The severity of violation. - # @!attribute [rw] rule - # @return [::String] - # The rule that is violated in an evaluation. - # @!attribute [rw] documentation_url - # @return [::String] - # The URL for the documentation of the rule. - # @!attribute [rw] resource - # @return [::Google::Cloud::WorkloadManager::V1::Resource] - # The resource that violates the rule. - # @!attribute [rw] violation_details - # @return [::Google::Cloud::WorkloadManager::V1::ViolationDetails] - # The details of violation in an evaluation result. - # @!attribute [rw] commands - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Command>] - # The commands to remediate the violation. - # @!attribute [rw] type - # @return [::Google::Cloud::WorkloadManager::V1::ExecutionResult::Type] - # Execution result type of the scanned resource. - class ExecutionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum of execution result type. - module Type - # Unknown state. - TYPE_UNSPECIFIED = 0 - - # Resource successfully passed the rule. - TYPE_PASSED = 1 - - # Resource violated the rule. - TYPE_VIOLATED = 2 - end - end - - # Command specifies the type of command to execute. - # @!attribute [rw] agent_command - # @return [::Google::Cloud::WorkloadManager::V1::AgentCommand] - # AgentCommand specifies a one-time executable program for the agent to - # run. - # - # Note: The following fields are mutually exclusive: `agent_command`, `shell_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] shell_command - # @return [::Google::Cloud::WorkloadManager::V1::ShellCommand] - # ShellCommand is invoked via the agent's command line executor. - # - # Note: The following fields are mutually exclusive: `shell_command`, `agent_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Command - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AgentCommand specifies a one-time executable program for the agent to run. - # @!attribute [rw] command - # @return [::String] - # The name of the agent one-time executable that will be invoked. - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of key/value pairs that can be used to specify - # additional one-time executable settings. - class AgentCommand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A ShellCommand is invoked via the agent's command line executor. - # @!attribute [rw] command - # @return [::String] - # The name of the command to be executed. - # @!attribute [rw] args - # @return [::String] - # Arguments to be passed to the command. - # @!attribute [rw] timeout_seconds - # @return [::Integer] - # Optional. If not specified, the default timeout is 60 seconds. - class ShellCommand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule output of the violation. - # @!attribute [r] details - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Violation details generated by rule. - # @!attribute [r] message - # @return [::String] - # Output only. The message generated by rule. - class RuleOutput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DetailsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The violation in an evaluation result. - # @!attribute [rw] asset - # @return [::String] - # The name of the asset. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the resource. - # @!attribute [rw] observed - # @return [::Google::Protobuf::Map{::String => ::String}] - # Details of the violation. - # @!attribute [r] rule_output - # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleOutput>] - # Output only. The rule output of the violation. - class ViolationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ObservedEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource in execution result. - # @!attribute [rw] type - # @return [::String] - # The type of resource. - # @!attribute [rw] name - # @return [::String] - # The name of the resource. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the resource. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule to be evaluated. - # @!attribute [rw] name - # @return [::String] - # Rule name. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The version of the rule. - # @!attribute [rw] display_name - # @return [::String] - # The name display in UI. - # @!attribute [rw] description - # @return [::String] - # Describe rule in plain language. - # @!attribute [rw] severity - # @return [::String] - # The severity of the rule. - # @!attribute [rw] primary_category - # @return [::String] - # The primary category. - # @!attribute [rw] secondary_category - # @return [::String] - # The secondary category. - # @!attribute [rw] error_message - # @return [::String] - # The message template for rule. - # @!attribute [rw] uri - # @return [::String] - # The document url for the rule. - # @!attribute [rw] remediation - # @return [::String] - # The remediation for the rule. - # @!attribute [rw] tags - # @return [::Array<::String>] - # List of user-defined tags. - # @!attribute [rw] rule_type - # @return [::Google::Cloud::WorkloadManager::V1::Rule::RuleType] - # The type of the rule. - # @!attribute [rw] asset_type - # @return [::String] - # The CAI asset type of the rule is evaluating, for joined asset types, it - # will be the corresponding primary asset types. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the rule. - module RuleType - # Not specified. - RULE_TYPE_UNSPECIFIED = 0 - - # Baseline rules. - BASELINE = 1 - - # Custom rules. - CUSTOM = 2 - end - end - - # Request message for the ListRules RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filter based on primary_category, secondary_category. - # @!attribute [rw] custom_rules_bucket - # @return [::String] - # The Cloud Storage bucket name for custom rules. - # @!attribute [rw] evaluation_type - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListRules RPC. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Rule>] - # All rules in response. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListScannedResources RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent for ListScannedResourcesRequest. - # @!attribute [rw] rule - # @return [::String] - # Rule name. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - class ListScannedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListScannedResources RPC. - # @!attribute [rw] scanned_resources - # @return [::Array<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # All scanned resources in response. - # @!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 ListScannedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A scanned resource. - # @!attribute [rw] resource - # @return [::String] - # Resource name. - # @!attribute [rw] type - # @return [::String] - # Resource type. - class ScannedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile deleted file mode 100644 index 3f57a4f6919e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-workload_manager-v1", path: "../" -else - gem "google-cloud-workload_manager-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json deleted file mode 100644 index c3535bc37380..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workload_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workloadmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync", - "title": "Snippet for the list_evaluations call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations.", - "file": "workload_manager/list_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluations", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListEvaluations", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListEvaluations", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync", - "title": "Snippet for the get_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation.", - "file": "workload_manager/get_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::Evaluation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "GetEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync", - "title": "Snippet for the create_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation.", - "file": "workload_manager/create_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "CreateEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.CreateEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync", - "title": "Snippet for the update_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation.", - "file": "workload_manager/update_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "UpdateEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.UpdateEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync", - "title": "Snippet for the delete_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation.", - "file": "workload_manager/delete_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "DeleteEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync", - "title": "Snippet for the list_executions call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions.", - "file": "workload_manager/list_executions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_executions", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListExecutions", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutions", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetExecution_sync", - "title": "Snippet for the get_execution call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution.", - "file": "workload_manager/get_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_execution", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::GetExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::Execution", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "GetExecution", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetExecution", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync", - "title": "Snippet for the run_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation.", - "file": "workload_manager/run_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "RunEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.RunEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync", - "title": "Snippet for the delete_execution call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution.", - "file": "workload_manager/delete_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_execution", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "DeleteExecution", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteExecution", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync", - "title": "Snippet for the list_execution_results call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results.", - "file": "workload_manager/list_execution_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_execution_results", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListExecutionResults", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutionResults", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListRules_sync", - "title": "Snippet for the list_rules call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules.", - "file": "workload_manager/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListRulesResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListRules", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync", - "title": "Snippet for the list_scanned_resources call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources.", - "file": "workload_manager/list_scanned_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scanned_resources", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListScannedResources", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListScannedResources", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "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-workload_manager-v1/snippets/workload_manager/create_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb deleted file mode 100644 index 1aece099b45d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the create_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation. -# -def create_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - - # Call the create_evaluation method. - result = client.create_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb deleted file mode 100644 index 2f6820fedd08..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the delete_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation. -# -def delete_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - - # Call the delete_evaluation method. - result = client.delete_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb deleted file mode 100644 index a2da1aba213e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the delete_execution call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution. -# -def delete_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - - # Call the delete_execution method. - result = client.delete_execution request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb deleted file mode 100644 index ccff71e21d6a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the get_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation. -# -def get_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - - # Call the get_evaluation method. - result = client.get_evaluation request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb deleted file mode 100644 index 27bb4d344b9d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the get_execution call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution. -# -def get_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - - # Call the get_execution method. - result = client.get_execution request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::Execution. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb deleted file mode 100644 index 68603a1e8d5d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_evaluations call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations. -# -def list_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - - # Call the list_evaluations method. - result = client.list_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb deleted file mode 100644 index 51f4ecec13ca..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_execution_results call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results. -# -def list_execution_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - - # Call the list_execution_results method. - result = client.list_execution_results request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb deleted file mode 100644 index ad283aac7f33..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_executions call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions. -# -def list_executions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb deleted file mode 100644 index 39185ada886f..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListRules_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_rules call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb deleted file mode 100644 index bdf68829dd9a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_scanned_resources call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources. -# -def list_scanned_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - - # Call the list_scanned_resources method. - result = client.list_scanned_resources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb deleted file mode 100644 index 7ebbf41e7974..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the run_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation. -# -def run_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - - # Call the run_evaluation method. - result = client.run_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb deleted file mode 100644 index 5ba82a6abaec..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the update_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation. -# -def update_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - - # Call the update_evaluation method. - result = client.update_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb deleted file mode 100644 index 728a1dca8d8c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workloadmanager/v1/service_services_pb" -require "google/cloud/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb deleted file mode 100644 index 1bce9f8de208..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_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/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_path project: "value0", location: "value1", evaluation: "value2" - assert_equal "projects/value0/locations/value1/evaluations/value2", path - 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.execution_path project: "value0", location: "value1", evaluation: "value2", execution: "value3" - assert_equal "projects/value0/locations/value1/evaluations/value2/executions/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb deleted file mode 100644 index 6e2379af24a6..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb +++ /dev/null @@ -1,779 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager/rest" - - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new - http_response = OpenStruct.new 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_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_count - end - end - end - - def test_get_evaluation - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::Evaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_client_stub.call_count - end - end - end - - def test_create_evaluation - # Create test objects. - 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" - evaluation_id = "hello world" - evaluation = {} - request_id = "hello world" - - create_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_create_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_count - end - end - end - - def test_update_evaluation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - evaluation = {} - request_id = "hello world" - - update_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_update_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_count - end - end - end - - def test_delete_evaluation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_evaluation name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_evaluation({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_count - end - end - end - - def test_list_executions - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::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" - 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_executions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_executions_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_count - end - end - end - - def test_get_execution - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::Execution.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_execution({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_execution name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_execution({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation - # Create test objects. - 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" - execution_id = "hello world" - execution = {} - request_id = "hello world" - - run_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_run_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_evaluation_client_stub.call_count - end - end - end - - def test_delete_execution - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_execution({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_execution name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_execution({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_execution_client_stub.call_count - end - end - end - - def test_list_execution_results - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_execution_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_execution_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_execution_results_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_execution_results_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - custom_rules_bucket = "hello world" - evaluation_type = :EVALUATION_TYPE_UNSPECIFIED - - list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_list_scanned_resources - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_scanned_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_scanned_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scanned_resources_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb deleted file mode 100644 index bbb1a73f506a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb +++ /dev/null @@ -1,923 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluations, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, 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_evaluations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_rpc_count - end - end - - def test_get_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::Evaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_evaluation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_evaluation_client_stub.call_rpc_count - end - end - - def test_create_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - evaluation_id = "hello world" - evaluation = {} - request_id = "hello world" - - create_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["evaluation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_rpc_count - end - end - - def test_update_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - evaluation = {} - request_id = "hello world" - - update_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_rpc_count - end - end - - def test_delete_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_evaluation name: name, request_id: request_id, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_evaluation({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_rpc_count - end - end - - def test_list_executions - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::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" - 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::WorkloadManager::V1::ListExecutionsRequest, 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_executions_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_rpc_count - end - end - - def test_get_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::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" - - get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_execution, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_execution({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - execution_id = "hello world" - execution = {} - request_id = "hello world" - - run_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["execution_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Execution), request["execution"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_evaluation_client_stub.call_rpc_count - end - end - - def test_delete_execution - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_execution, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_execution({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_execution name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_execution({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_execution_client_stub.call_rpc_count - end - end - - def test_list_execution_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_execution_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_execution_results, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_execution_results_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_execution_results_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - custom_rules_bucket = "hello world" - evaluation_type = :EVALUATION_TYPE_UNSPECIFIED - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListRulesRequest, 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["custom_rules_bucket"] - assert_equal :EVALUATION_TYPE_UNSPECIFIED, request["evaluation_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_rpc_count - end - end - - def test_list_scanned_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_scanned_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scanned_resources, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rule"] - 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_scanned_resources_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.gitignore b/owl-bot-staging/google-cloud-workstations-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 6db623fc6fde..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 58a485375923..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-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 85f95a678c11..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ /dev/null @@ -1,2620 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 2087f38ccf61..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 aa208259fcfa..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ /dev/null @@ -1,2445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 c6115b5ff1ff..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 67ef7e156c15..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb +++ /dev/null @@ -1,85 +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/field_info_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\x1bgoogle/api/field_info.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\"\xf1\x0c\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12Y\n\rdomain_config\x18\x11 \x01(\x0b\x32=.google.cloud.workstations.v1.WorkstationCluster.DomainConfigB\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\x12S\n\x04tags\x18\x14 \x03(\x0b\x32:.google.cloud.workstations.v1.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12[\n\x0egateway_config\x18\x15 \x01(\x0b\x32>.google.cloud.workstations.v1.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\xea*\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12\x66\n\x15\x65phemeral_directories\x18\x16 \x03(\x0b\x32\x42.google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectoryB\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\x12\x1f\n\x12\x65nable_audit_agent\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\rallowed_ports\x18\x19 \x03(\x0b\x32\x39.google.cloud.workstations.v1.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x1a\x85\x0e\n\x04Host\x12X\n\x0cgce_instance\x18\x01 \x01(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstanceH\x00\x1a\x98\r\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\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12h\n\rboost_configs\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x07vm_tags\x18\x0e \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12v\n\x11instance_metadata\x18\x1b \x03(\x0b\x32V.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x85\x02\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xe3\x08\n\x13PersistentDirectory\x12o\n\x06gce_pd\x18\x02 \x01(\x0b\x32].google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12z\n\x06gce_hd\x18\x03 \x01(\x0b\x32h.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa4\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x8c\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x93\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32v.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\xa5\x02\n\x12\x45phemeralDirectory\x12\x66\n\x06gce_pd\x18\x03 \x01(\x0b\x32T.google.cloud.workstations.v1.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\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\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\x9b\r\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12m\n\x16persistent_directories\x18\x19 \x03(\x0b\x32H.google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectoryB\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\x12\x44\n\x03\x65nv\x18\x0c \x03(\x0b\x32\x32.google.cloud.workstations.v1.Workstation.EnvEntryB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12S\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x35.google.cloud.workstations.v1.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd1\x01\n\x0bRuntimeHost\x12\x62\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32\x45.google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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 -pool.add_serialized_file(descriptor_data) - -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 - WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.DomainConfig").msgclass - WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.GatewayConfig").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::Host::GceInstance::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.Accelerator").msgclass - WorkstationConfig::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfig").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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass - WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicy").enummodule - WorkstationConfig::EphemeralDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory").msgclass - WorkstationConfig::EphemeralDirectory::GcePersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory.GcePersistentDisk").msgclass - 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 - WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PortRange").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation").msgclass - Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectory").msgclass - Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost").msgclass - Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHost").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 792cd03236da..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb +++ /dev/null @@ -1,88 +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 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - 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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 6047b249e889..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb +++ /dev/null @@ -1,1678 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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] - # Identifier. 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 [rw] domain_config - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::DomainConfig] - # Optional. Configuration options for a custom domain. - # @!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. The - # {::Google::Cloud::Workstations::V1::WorkstationCluster#conditions conditions} - # field contains detailed information about the status of the cluster. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - # @!attribute [rw] gateway_config - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::GatewayConfig] - # Optional. Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] workstation_authorization_url - # @return [::String] - # Optional. Specifies the redirect URL for unauthorized requests received by - # workstation VMs in this cluster. - # - # Redirects to this endpoint will send a base64 encoded `state` query param - # containing the target workstation name and original request hostname. The - # endpoint is responsible for retrieving a token using `GenerateAccessToken` - # and redirecting back to the original hostname with the token. - # @!attribute [rw] workstation_launch_url - # @return [::String] - # Optional. Specifies the launch URL for workstations in this cluster. - # Requests sent to unstarted workstations will be redirected to this URL. - # - # Requests redirected to the launch endpoint will be sent with a - # `workstation` and `project` query parameter containing the full workstation - # resource name and project ID, respectively. The launch endpoint is - # responsible for starting the workstation, polling it until it reaches - # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. - 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 attachment 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 - - # Configuration options for a custom domain. - # @!attribute [rw] domain - # @return [::String] - # Immutable. Domain used by Workstations for HTTP ingress. - class DomainConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] http2_enabled - # @return [::Boolean] - # Optional. Whether HTTP/2 is enabled for this workstation cluster. - # Defaults to false. - class GatewayConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - 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] - # Identifier. 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] max_usable_workstations - # @return [::Integer] - # Optional. Maximum number of workstations under this configuration a user - # can have `workstations.workstation.use` permission on. - # - # Only enforced on CreateWorkstation API calls on the user issuing the API - # request. Can be overridden by: - # - # - granting a user - # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, - # or - # - having a user with that permission create a workstation and - # granting another user `workstations.workstation.use` permission on - # that workstation. - # - # If not specified, defaults to `0`, which indicates unlimited. - # @!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] ephemeral_directories - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory>] - # Optional. Ephemeral directories which won't 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 workstation configuration is in degraded mode, in - # which case it may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1::WorkstationConfig#conditions conditions} - # field contains detailed information about the status of the configuration. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation configuration's - # current state. - # @!attribute [rw] enable_audit_agent - # @return [::Boolean] - # Optional. Whether to enable Linux `auditd` logging on the workstation. When - # enabled, a - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#service_account service_account} - # must also be specified that has `roles/logging.logWriter` and - # `roles/monitoring.metricWriter` on the project. Operating system audit - # logging is distinct from [Cloud Audit - # Logs](https://cloud.google.com/workstations/docs/audit-logging) and - # [Container output - # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). - # Operating system audit logs are available in the - # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: - # - # resource.type="gce_instance" - # log_name:"/logs/linux-auditd" - # @!attribute [rw] disable_tcp_connections - # @return [::Boolean] - # Optional. Disables support for plain TCP connections in the workstation. - # By default the service supports TCP connections through a websocket relay. - # Setting this option to true disables that relay, which prevents the usage - # of services that require plain TCP connections, such as SSH. - # When enabled, all communication must occur over HTTPS or WSS. - # @!attribute [rw] allowed_ports - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange>] - # Optional. A list of - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange PortRange}s - # specifying single ports or ranges of ports that are externally accessible - # in the workstation. Allowed ports must be one of 22, 80, or within range - # 1024-65535. If not specified defaults to ports 22, 80, and ports - # 1024-65535. - # @!attribute [rw] grant_workstation_admin_role_on_create - # @return [::Boolean] - # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` - # role along with `roles/workstations.user` role on the workstation created - # by them. This allows workstation users to share access to either their - # entire workstation, or individual ports. Defaults to false. - 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 `logging.logEntries.create` and - # `monitoring.timeSeries.create` permissions on the project so it can - # write logs out to Cloud Logging. If using a custom container image, the - # service account must have [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # permission 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}. - # 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 using this workstation configuration. - # - # Defaults to false. - # - # 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. - # @!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. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] - # Optional. A list of the type and count of accelerator cards attached to - # the instance. - # @!attribute [rw] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig>] - # Optional. A list of the boost configurations that workstations created - # using this workstation configuration are allowed to use. If specified, - # users will have the option to choose from the list of boost configs - # when starting a workstation. - # @!attribute [rw] disable_ssh - # @return [::Boolean] - # Optional. Whether to disable SSH access to the VM. - # @!attribute [rw] vm_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to this instance. - # Tag keys and values have the same definition as [resource manager - # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). - # Keys must be in the format `tagKeys/{tag_key_id}`, and - # values are in the format `tagValues/456`. - # @!attribute [rw] startup_script_uri - # @return [::String] - # Optional. Link to the startup script stored in Cloud Storage. This - # script will be run on the host workstation VM when the VM is created. - # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If - # specifying a startup script, the service account must have [Permission - # to access the bucket and script file in Cloud - # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). - # Otherwise, the script must be publicly accessible. - # Note that the service regularly updates the OS version of the host VM, - # and it is the responsibility of the user to ensure the script stays - # compatible with the OS version. - # @!attribute [rw] instance_metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Custom metadata to apply to Compute Engine instances. - 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 - - # A boost configuration is a set of resources that a workstation can use - # to increase its performance. If you specify a boost configuration, upon - # startup, workstation users can choose to use a VM provisioned under the - # boost config by passing the boost config ID in the start request. If - # the workstation user does not provide a boost config ID in the start - # request, the system will choose a VM from the pool provisioned under - # the default config. - # @!attribute [rw] id - # @return [::String] - # Required. The ID to be used for the boost configuration. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine that boosted VM instances will use—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). - # Defaults to `e2-standard-4`. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] - # Optional. A list of the type and count of accelerator cards attached - # to the boost instance. Defaults to `none`. - # @!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] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on boosted Cloud - # Workstations VMs running using this boost configuration. - # - # Defaults to false. - # - # 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 - # boost configurations that specify a - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} - # in the N1 or N2 machine series. - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of boost VMs that the system should keep idle so - # that workstations can be boosted quickly. Defaults to `0`. - class BoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VmTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InstanceMetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. Updates to this field - # will not update existing workstations and will only take effect on new - # workstations. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # - # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gce_hd - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] - # A PersistentDirectory backed by a Compute Engine hyperdisk high - # availability disk. - # - # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!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 Persistent Directory 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] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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. Must be formatted as ext4 file system with no - # partitions. - # @!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`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - 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 - - # A Persistent Directory backed by a Compute Engine - # [Hyperdisk Balanced High Availability - # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). - # This is a high-availability block storage solution that offers a balance - # between performance and cost for most general-purpose workloads. - # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. - # @!attribute [rw] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} - # must be empty. Must be formatted as ext4 file system with no - # partitions. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - class GceHyperdiskBalancedHighAvailability - 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::V1::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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # is set. Must be empty if - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} - # is false. Updating - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, see - # [the filesystems available in Container-Optimized - # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # is set. Updating - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, please - # refer to the [COS - # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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::V1::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. - # If using a custom container image, the service account must have - # [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # 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 - - # A PortRange defines a range of ports. Both - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} are - # inclusive. - # To specify a single port, both - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} - # should be the same. - # @!attribute [rw] first - # @return [::Integer] - # Required. Starting port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - # @!attribute [rw] last - # @return [::Integer] - # Required. Ending port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - class PortRange - 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] - # Identifier. 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 [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1::Workstation::WorkstationPersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!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}`. - # @!attribute [rw] env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Environment variables passed to the workstation container's - # entrypoint. - # @!attribute [r] kms_key - # @return [::String] - # Output only. The name of the Google Cloud KMS encryption key used to - # encrypt this workstation. The KMS key can only be configured in the - # WorkstationConfig. The expected format is - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [rw] source_workstation - # @return [::String] - # Optional. The source workstation from which this workstation's persistent - # directories were cloned on creation. - # @!attribute [r] runtime_host - # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost] - # Optional. Output only. Runtime host for the workstation when in - # STATE_RUNNING. - class Workstation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A directory to persist across workstation sessions. Updates to this field - # will only take effect on this workstation after it is restarted. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. The mount path of the persistent directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. Size of the persistent directory in GB. If specified in an - # update request, this is the desired size of the directory. - class WorkstationPersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Runtime host for the workstation. - # @!attribute [rw] gce_instance_host - # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost::GceInstanceHost] - # Specifies a Compute Engine instance as the host. - class RuntimeHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Compute Engine instance host. - # @!attribute [r] name - # @return [::String] - # Optional. Output only. The name of the Compute Engine instance. - # @!attribute [r] id - # @return [::String] - # Optional. Output only. The ID of the Compute Engine instance. - # @!attribute [r] zone - # @return [::String] - # Optional. Output only. The zone of the Compute Engine instance. - class GceInstanceHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - 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 - - # @!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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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 result, 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. Workstation configuration to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. - # @!attribute [rw] boost_config - # @return [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - 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 result, 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. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 52bdf0f508ad..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 - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 cc8f0344b566..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb +++ /dev/null @@ -1,1225 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - boost_config = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - port = 42 - - 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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 545fb10d714e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb +++ /dev/null @@ -1,1451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstations_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - boost_config = "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"] - assert_equal "hello world", request["boost_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - port = 42 - - 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"] - assert_equal 42, request["port"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 4f31bc6c1e9e..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 141653bdb44a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.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" - ] - }, - "PushCredentials": { - "methods": [ - "push_credentials" - ] - } - } - } - } - } - } -} 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 b0bd3f899607..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-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 7aa5892babd9..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ /dev/null @@ -1,2728 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # - # @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 - - ## - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - # - # @overload push_credentials(request, options = nil) - # Pass arguments to `push_credentials` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload push_credentials(workstation: nil, application_default_credentials: nil) - # Pass arguments to `push_credentials` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::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::PushCredentialsRequest.new - # - # # Call the push_credentials method. - # result = client.push_credentials request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def push_credentials request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.push_credentials.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"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.push_credentials.timeout, - metadata: metadata, - retry_policy: @config.rpcs.push_credentials.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :push_credentials, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 - ## - # RPC-specific configuration for `push_credentials` - # @return [::Gapic::Config::Method] - # - attr_reader :push_credentials - - # @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 - push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials - @push_credentials = ::Gapic::Config::Method.new push_credentials_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 620b2be83356..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 c39d1909ad91..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ /dev/null @@ -1,2546 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # @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 - - ## - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - # - # @overload push_credentials(request, options = nil) - # Pass arguments to `push_credentials` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload push_credentials(workstation: nil, application_default_credentials: nil) - # Pass arguments to `push_credentials` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @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::PushCredentialsRequest.new - # - # # Call the push_credentials method. - # result = client.push_credentials request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def push_credentials request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.push_credentials.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"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.push_credentials.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.push_credentials.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.push_credentials request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 - ## - # RPC-specific configuration for `push_credentials` - # @return [::Gapic::Config::Method] - # - attr_reader :push_credentials - - # @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 - push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials - @push_credentials = ::Gapic::Config::Method.new push_credentials_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 a100147caf77..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 1af97769fe62..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +++ /dev/null @@ -1,1372 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 - - ## - # Baseline implementation for the push_credentials REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def push_credentials request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_push_credentials_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "push_credentials", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_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 - - ## - # @private - # - # GRPC transcoding helper method for the push_credentials REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_push_credentials_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{workstation}:pushCredentials", - 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 7c7e03bcb3f3..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb +++ /dev/null @@ -1,92 +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/field_info_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\x1bgoogle/api/field_info.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\"\xc1\r\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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]\n\rdomain_config\x18\x11 \x01(\x0b\x32\x41.google.cloud.workstations.v1beta.WorkstationCluster.DomainConfigB\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\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x04tags\x18\x14 \x03(\x0b\x32>.google.cloud.workstations.v1beta.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12_\n\x0egateway_config\x18\x15 \x01(\x0b\x32\x42.google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\x9d\x32\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12Z\n\x0chttp_options\x18\x15 \x01(\x0b\x32?.google.cloud.workstations.v1beta.WorkstationConfig.HttpOptionsB\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12Y\n\rallowed_ports\x18\x19 \x03(\x0b\x32=.google.cloud.workstations.v1beta.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_pushing_credentials\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x1a\xc6\x12\n\x04Host\x12\\\n\x0cgce_instance\x18\x01 \x01(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstanceH\x00\x1a\xd5\x11\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\x12l\n\rboost_configs\x18\x19 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x07vm_tags\x18\x0e \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x0f \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12z\n\x11instance_metadata\x18\x1b \x03(\x0b\x32Z.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x86\x03\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12k\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x06 \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x1a\xa4\x02\n\x13ReservationAffinity\x12\x84\x01\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32].google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xf3\x08\n\x13PersistentDirectory\x12s\n\x06gce_pd\x18\x02 \x01(\x0b\x32\x61.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12~\n\x06gce_hd\x18\x03 \x01(\x0b\x32l.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa8\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x90\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x97\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32z.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1aw\n\x0bHttpOptions\x12<\n/allowed_unauthenticated_cors_preflight_requests\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1d\x64isable_localhost_replacement\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x32\n\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\xd6\x0f\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12q\n\x16persistent_directories\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectoryB\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\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12`\n\rboost_configs\x18\x10 \x03(\x0b\x32\x44.google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfigB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x39.google.cloud.workstations.v1beta.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x12\x15\n\x08\x64\x65graded\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x18 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a?\n\x16WorkstationBoostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07running\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xd5\x01\n\x0bRuntimeHost\x12\x66\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32I.google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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\"\xda\x02\n\x16PushCredentialsRequest\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12q\n\x1f\x61pplication_default_credentials\x18\x02 \x01(\x0b\x32\x43.google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthTokenB\x03\xe0\x41\x01\x1a\x86\x01\n\nOAuthToken\x12\x12\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06scopes\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61\x63\x63\x65ss_token\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x19\n\x17PushCredentialsMetadata\"\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\x87.\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*\x12\xa5\x02\n\x0fPushCredentials\x12\x38.google.cloud.workstations.v1beta.PushCredentialsRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41&\n\x0bWorkstation\x12\x17PushCredentialsMetadata\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02{\"v/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:pushCredentials:\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 -pool.add_serialized_file(descriptor_data) - -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 - WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.DomainConfig").msgclass - WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfig").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::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfig").msgclass - WorkstationConfig::Host::GceInstance::ReservationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity").msgclass - WorkstationConfig::Host::GceInstance::ReservationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.Type").enummodule - 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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass - WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.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 - WorkstationConfig::HttpOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.HttpOptions").msgclass - WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PortRange").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation").msgclass - Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectory").msgclass - Workstation::WorkstationBoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfig").msgclass - Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost").msgclass - Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHost").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 - PushCredentialsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest").msgclass - PushCredentialsRequest::OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthToken").msgclass - PushCredentialsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsMetadata").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 bddade12446d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +++ /dev/null @@ -1,92 +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 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - rpc :PushCredentials, ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Google::Longrunning::Operation - 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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 b9791493eed8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb +++ /dev/null @@ -1,1874 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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] - # Identifier. 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 [rw] domain_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::DomainConfig] - # Optional. Configuration options for a custom domain. - # @!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. The - # {::Google::Cloud::Workstations::V1beta::WorkstationCluster#conditions conditions} - # field contains detailed information about the status of the cluster. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - # @!attribute [rw] gateway_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::GatewayConfig] - # Optional. Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] workstation_authorization_url - # @return [::String] - # Optional. Specifies the redirect URL for unauthorized requests received by - # workstation VMs in this cluster. - # - # Redirects to this endpoint will send a base64 encoded `state` query param - # containing the target workstation name and original request hostname. The - # endpoint is responsible for retrieving a token using `GenerateAccessToken` - # and redirecting back to the original hostname with the token. - # @!attribute [rw] workstation_launch_url - # @return [::String] - # Optional. Specifies the launch URL for workstations in this cluster. - # Requests sent to unstarted workstations will be redirected to this URL. - # - # Requests redirected to the launch endpoint will be sent with a - # `workstation` and `project` query parameter containing the full workstation - # resource name and project ID, respectively. The launch endpoint is - # responsible for starting the workstation, polling it until it reaches - # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. - 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 attachment 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 - - # Configuration options for a custom domain. - # @!attribute [rw] domain - # @return [::String] - # Immutable. Domain used by Workstations for HTTP ingress. - class DomainConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] http2_enabled - # @return [::Boolean] - # Optional. Whether HTTP/2 is enabled for this workstation cluster. - # Defaults to false. - class GatewayConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - 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] - # Identifier. 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] max_usable_workstations - # @return [::Integer] - # Optional. Maximum number of workstations under this configuration a user - # can have `workstations.workstation.use` permission on. - # - # Only enforced on CreateWorkstation API calls on the user issuing the API - # request. Can be overridden by: - # - # - granting a user - # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, - # or - # - having a user with that permission create a workstation and - # granting another user `workstations.workstation.use` permission on - # that workstation. - # - # If not specified, defaults to `0`, which indicates unlimited. - # @!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 workstation configuration is in degraded mode, in - # which case it may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#conditions conditions} - # field contains detailed information about the status of the configuration. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation configuration's - # current state. - # @!attribute [rw] enable_audit_agent - # @return [::Boolean] - # Optional. Whether to enable Linux `auditd` logging on the workstation. When - # enabled, a - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#service_account service_account} - # must also be specified that has `roles/logging.logWriter` and - # `roles/monitoring.metricWriter` on the project. Operating system audit - # logging is distinct from [Cloud Audit - # Logs](https://cloud.google.com/workstations/docs/audit-logging) and - # [Container output - # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). - # Operating system audit logs are available in the - # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: - # - # resource.type="gce_instance" - # log_name:"/logs/linux-auditd" - # @!attribute [rw] http_options - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::HttpOptions] - # Optional. HTTP options that customize the behavior of the workstation - # service's HTTP proxy. - # @!attribute [rw] disable_tcp_connections - # @return [::Boolean] - # Optional. Disables support for plain TCP connections in the workstation. - # By default the service supports TCP connections through a websocket relay. - # Setting this option to true disables that relay, which prevents the usage - # of services that require plain TCP connections, such as SSH. - # When enabled, all communication must occur over HTTPS or WSS. - # @!attribute [rw] allowed_ports - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange>] - # Optional. A list of - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange PortRange}s - # specifying single ports or ranges of ports that are externally accessible - # in the workstation. Allowed ports must be one of 22, 80, or within range - # 1024-65535. If not specified defaults to ports 22, 80, and ports - # 1024-65535. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] grant_workstation_admin_role_on_create - # @return [::Boolean] - # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` - # role along with `roles/workstations.user` role on the workstation created - # by them. This allows workstation users to share access to either their - # entire workstation, or individual ports. Defaults to false. - # @!attribute [rw] enable_pushing_credentials - # @return [::Boolean] - # Optional. Enables pushing user provided credentials to Workstations by - # calling workstations.pushCredentials. If application_default_credentials - # are supplied to pushCredentials, the provided token is returned when tools - # and applications running in the user container make a request for Default - # Application Credentials. Please note that any credentials supplied are made - # available to all users with access to the workstation. - 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 `logging.logEntries.create` and - # `monitoring.timeSeries.create` permissions on the project so it can - # write logs out to Cloud Logging. If using a custom container image, the - # service account must have [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # permission 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}. - # 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 using this workstation configuration. - # - # Defaults to false. - # - # 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. - # @!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. - # @!attribute [rw] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig>] - # Optional. A list of the boost configurations that workstations created - # using this workstation configuration are allowed to use. If specified, - # users will have the option to choose from the list of boost configs - # when starting a workstation. - # @!attribute [rw] disable_ssh - # @return [::Boolean] - # Optional. Whether to disable SSH access to the VM. - # @!attribute [rw] vm_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to this instance. - # Tag keys and values have the same definition as [resource manager - # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). - # Keys must be in the format `tagKeys/{tag_key_id}`, and - # values are in the format `tagValues/456`. - # @!attribute [rw] reservation_affinity - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] - # Optional. - # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - # specifies a reservation that can be consumed to create VM - # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations - # will only create VMs in the zone where the reservation is located. - # This would affect availability since the service will no longer be - # resilient to zonal outages. If ANY_RESERVATION is specified, creating - # reservations in both zones that the config creates VMs in will ensure - # higher availability. - # **Important Considerations for Reservation Affinity:** - # - # * This feature is intended for advanced users and requires - # familiarity with Google Compute Engine reservations. - # * Using reservations incurs charges, regardless of utilization. - # * The resources in the pool will consume the specified - # reservation. Take this into account when setting the - # pool size. - # @!attribute [rw] startup_script_uri - # @return [::String] - # Optional. Link to the startup script stored in Cloud Storage. This - # script will be run on the host workstation VM when the VM is created. - # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If - # specifying a startup script, the service account must have [Permission - # to access the bucket and script file in Cloud - # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). - # Otherwise, the script must be publicly accessible. - # Note that the service regularly updates the OS version of the host VM, - # and it is the responsibility of the user to ensure the script stays - # compatible with the OS version. - # @!attribute [rw] instance_metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Custom metadata to apply to Compute Engine instances. - 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 - - # A boost configuration is a set of resources that a workstation can use - # to increase its performance. If you specify a boost configuration, upon - # startup, workstation users can choose to use a VM provisioned under the - # boost config by passing the boost config ID in the start request. If - # the workstation user does not provide a boost config ID in the start - # request, the system will choose a VM from the pool provisioned under - # the default config. - # @!attribute [rw] id - # @return [::String] - # Required. The ID to be used for the boost configuration. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine that boosted VM instances will use—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). - # Defaults to `e2-standard-4`. - # @!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 boost instance. Defaults to `none`. - # @!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] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on boosted Cloud - # Workstations VMs running using this boost configuration. - # - # Defaults to false. - # - # 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 - # boost configurations that specify a - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} - # in the N1 or N2 machine series. - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of boost VMs that the system should keep idle so - # that workstations can be boosted quickly. Defaults to `0`. - # @!attribute [rw] reservation_affinity - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] - # Optional. - # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - # specifies a reservation that can be consumed to create boost VM - # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations - # will only create VMs in the zone where the reservation is located. - # This would affect availability since the service will no longer be - # resilient to zonal outages. If ANY_RESERVATION is specified, creating - # reservations in both zones that the config creates VMs in will ensure - # higher availability. - # **Important Considerations for Reservation Affinity:** - # - # * This feature is intended for advanced users and requires - # familiarity with Google Compute Engine reservations. - # * Using reservations incurs charges, regardless of utilization. - # * The resources in the pool will consume the specified - # reservation. Take this into account when setting the - # pool size. - class BoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReservationAffinity is the configuration of the desired reservation - # from which instances can consume resources. - # @!attribute [rw] consume_reservation_type - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity::Type] - # Optional. Corresponds to the type of reservation consumption. - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of reservation resource. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of reservation resources. - # Valid values are either the name of a reservation in the same project - # or "projects/\\{project}/reservations/\\{reservation}" to target a shared - # reservation in the same zone but in a different project. - class ReservationAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether to consume capacity from a reservation or not. - module Type - # Default value. This should not be used. - TYPE_UNSPECIFIED = 0 - - # Do not consume from any reserved capacity. - NO_RESERVATION = 1 - - # Consume any reservation available. - ANY_RESERVATION = 2 - - # Must consume from a specific reservation. Must specify key value - # fields for specifying the reservations. - SPECIFIC_RESERVATION = 3 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VmTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InstanceMetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. Updates to this field - # will not update existing workstations and will only take effect on new - # workstations. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # - # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gce_hd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] - # A PersistentDirectory backed by a Compute Engine hyperdisk high - # availability disk. - # - # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!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 Persistent Directory 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] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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. Must be formatted as ext4 file system with no - # partitions. - # @!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`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - 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 - - # A Persistent Directory backed by a Compute Engine - # [Hyperdisk Balanced High Availability - # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). - # This is a high-availability block storage solution that offers a balance - # between performance and cost for most general-purpose workloads. - # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. - # @!attribute [rw] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} - # must be empty. Must be formatted as ext4 file system with no - # partitions. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - class GceHyperdiskBalancedHighAvailability - 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. Must be empty if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} - # is false. Updating - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, see - # [the filesystems available in Container-Optimized - # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, please - # refer to the [COS - # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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. - # If using a custom container image, the service account must have - # [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # 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 - - # HTTP options for the running workstations. - # @!attribute [rw] allowed_unauthenticated_cors_preflight_requests - # @return [::Boolean] - # Optional. By default, the workstations service makes sure that all - # requests to the workstation are authenticated. CORS preflight requests do - # not include cookies or custom headers, and so are considered - # unauthenticated and blocked by the workstations service. Enabling this - # option allows these unauthenticated CORS preflight requests through to - # the workstation, where it becomes the responsibility of the destination - # server in the workstation to validate the request. - # @!attribute [rw] disable_localhost_replacement - # @return [::Boolean] - # Optional. By default, the workstations service replaces references to - # localhost, 127.0.0.1, and 0.0.0.0 with the workstation's hostname in http - # responses from the workstation so that applications under development run - # properly on the workstation. This may intefere with some applications, - # and so this option allows that behavior to be disabled. - class HttpOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A PortRange defines a range of ports. Both - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} - # are inclusive. To specify a single port, both - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} - # should be the same. - # @!attribute [rw] first - # @return [::Integer] - # Required. Starting port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - # @!attribute [rw] last - # @return [::Integer] - # Required. Ending port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - class PortRange - 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] - # Identifier. 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 [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationPersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!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. - # @!attribute [r] kms_key - # @return [::String] - # Output only. The name of the Google Cloud KMS encryption key used to - # encrypt this workstation. The KMS key can only be configured in the - # WorkstationConfig. The expected format is - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [r] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationBoostConfig>] - # Output only. List of available boost configuration IDs that this - # workstation can be boosted up to. - # @!attribute [rw] source_workstation - # @return [::String] - # Optional. The source workstation from which this workstation's persistent - # directories were cloned on creation. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] runtime_host - # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost] - # Optional. Output only. Runtime host for the workstation when in - # STATE_RUNNING. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this workstation is in degraded mode, in which case it - # may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1beta::Workstation#conditions conditions} field - # contains detailed information about the status of the workstation. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation's current state. - class Workstation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A directory to persist across workstation sessions. Updates to this field - # will only take effect on this workstation after it is restarted. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. The mount path of the persistent directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. Size of the persistent directory in GB. If specified in an - # update request, this is the desired size of the directory. - class WorkstationPersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Boost configuration for this workstation. This object is populated from the - # parent workstation configuration. - # @!attribute [r] id - # @return [::String] - # Output only. Boost configuration ID. - # @!attribute [r] running - # @return [::Boolean] - # Output only. Whether or not the current workstation is actively boosted - # with this id. - class WorkstationBoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Runtime host for the workstation. - # @!attribute [rw] gce_instance_host - # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost::GceInstanceHost] - # Specifies a Compute Engine instance as the host. - class RuntimeHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Compute Engine instance host. - # @!attribute [r] name - # @return [::String] - # Optional. Output only. The name of the Compute Engine instance. - # @!attribute [r] id - # @return [::String] - # Optional. Output only. The ID of the Compute Engine instance. - # @!attribute [r] zone - # @return [::String] - # Optional. Output only. The zone of the Compute Engine instance. - class GceInstanceHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - 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 - - # @!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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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 result, 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. Workstation configuration to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. - # @!attribute [rw] boost_config - # @return [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - 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 result, 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. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - 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 - - # Request message for PushCredentials. - # @!attribute [rw] workstation - # @return [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @!attribute [rw] application_default_credentials - # @return [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - class PushCredentialsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # OAuth token. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address encapsulated in the OAuth token. - # @!attribute [rw] scopes - # @return [::String] - # Optional. The scopes encapsulated in the OAuth token. - # See https://developers.google.com/identity/protocols/oauth2/scopes for - # more information. - # @!attribute [rw] access_token - # @return [::String] - # Required. The OAuth token. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time the OAuth access token will expire. This should be the - # time the access token was generated plus the expires_in offset returned - # from the Access Token Response. - class OAuthToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metadata message for PushCredentials. - class PushCredentialsMetadata - 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 2f6ae6f951ca..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json +++ /dev/null @@ -1,855 +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" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_PushCredentials_sync", - "title": "Snippet for the push_credentials call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials.", - "file": "workstations/push_credentials.rb", - "language": "RUBY", - "client_method": { - "short_name": "push_credentials", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::PushCredentialsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "PushCredentials", - "full_name": "google.cloud.workstations.v1beta.Workstations.PushCredentials", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "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-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/push_credentials.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb deleted file mode 100644 index a2f4b5c117f8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_PushCredentials_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the push_credentials 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#push_credentials. -# -def push_credentials - # 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::PushCredentialsRequest.new - - # Call the push_credentials method. - result = client.push_credentials request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to 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_PushCredentials_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 af5378e9c6a7..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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 2484c4f4930c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb +++ /dev/null @@ -1,1280 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - boost_config = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - port = 42 - - 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials - # Create test objects. - 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 = "hello world" - application_default_credentials = {} - - push_credentials_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-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_push_credentials_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, push_credentials_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, push_credentials_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 b76165c92c75..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb +++ /dev/null @@ -1,1516 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstations_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - boost_config = "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"] - assert_equal "hello world", request["boost_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - port = 42 - - 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"] - assert_equal 42, request["port"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" - application_default_credentials = {} - - push_credentials_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :push_credentials, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, request - assert_equal "hello world", request["workstation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken), request["application_default_credentials"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, push_credentials_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, push_credentials_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore b/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json deleted file mode 100644 index b76a2b576cdf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "developerknowledge.googleapis.com", - "api_shortname": "developerknowledge", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest", - "distribution_name": "google-developers-developer_knowledge-v1", - "is_cloud": true, - "language": "ruby", - "name": "developerknowledge", - "name_pretty": "Developer Knowledge V1 API", - "product_documentation": "https://developers.google.com/knowledge", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/knowledge", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml b/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml deleted file mode 100644 index eca990fb3b4d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-developers-developer_knowledge-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-developers-developer_knowledge-v1.rb" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/.yardopts b/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts deleted file mode 100644 index 029e31f7886d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Developer Knowledge 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-developers-developer_knowledge-v1/AUTHENTICATION.md b/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md deleted file mode 100644 index cb46050750cd..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/developers/developer_knowledge/v1" - -::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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/developers/developer_knowledge/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-v1/CHANGELOG.md b/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md b/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/README.md deleted file mode 100644 index b4b5340b19fc..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Developer Knowledge V1 API - -The Developer Knowledge API provides access to Google's developer knowledge. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Developer Knowledge V1 API. Most users should consider using -the main client gem, -[google-developers-developer_knowledge](https://rubygems.org/gems/google-developers-developer_knowledge). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-developers-developer_knowledge-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/developerknowledge.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/developers/developer_knowledge/v1" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new -request = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new # (request fields as keyword arguments...) -response = client.search_document_chunks request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/knowledge) -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/developers/developer_knowledge/v1" -require "logger" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-developers-developer_knowledge`, -and lower-level _versioned_ client libraries with names such as -`google-developers-developer_knowledge-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-developers-developer_knowledge`. -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-developers-developer_knowledge-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-developers-developer_knowledge-v1/Rakefile b/owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile deleted file mode 100644 index ca756f3b2f8a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1/developer_knowledge/credentials" - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-developers-developer_knowledge-v1" - header "google-developers-developer_knowledge-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-developers-developer_knowledge-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1/gapic_metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json deleted file mode 100644 index 37fb4a1b5f6d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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.developers.knowledge.v1", - "libraryPackage": "::Google::Developers::DeveloperKnowledge::V1", - "services": { - "DeveloperKnowledge": { - "clients": { - "grpc": { - "libraryClient": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client", - "rpcs": { - "SearchDocumentChunks": { - "methods": [ - "search_document_chunks" - ] - }, - "GetDocument": { - "methods": [ - "get_document" - ] - }, - "BatchGetDocuments": { - "methods": [ - "batch_get_documents" - ] - }, - "AnswerQuery": { - "methods": [ - "answer_query" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec b/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec deleted file mode 100644 index ff236befee57..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/developers/developer_knowledge/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-developers-developer_knowledge-v1" - gem.version = Google::Developers::DeveloperKnowledge::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details." - gem.summary = "The Developer Knowledge API provides access to Google's developer knowledge." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb deleted file mode 100644 index b1e644ed99d8..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-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/developers/developer_knowledge/v1" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb deleted file mode 100644 index d9cee294ec23..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge" -require "google/developers/developer_knowledge/v1/version" - -module Google - module Developers - module DeveloperKnowledge - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/developers/developer_knowledge/v1" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/developers/developer_knowledge/v1" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/developers/developer_knowledge/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb deleted file mode 100644 index e18de241d98e..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/developers/developer_knowledge/v1/version" - -require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" -require "google/developers/developer_knowledge/v1/developer_knowledge/paths" -require "google/developers/developer_knowledge/v1/developer_knowledge/client" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - -module Google - module Developers - module DeveloperKnowledge - module V1 - ## - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/developers/developer_knowledge/v1/developer_knowledge" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module DeveloperKnowledge - end - end - end - end -end - -helper_path = ::File.join __dir__, "developer_knowledge", "helpers.rb" -require "google/developers/developer_knowledge/v1/developer_knowledge/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb deleted file mode 100644 index 5b31292cee99..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb +++ /dev/null @@ -1,847 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/developers/knowledge/v1/developerknowledge_pb" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - ## - # Client for the DeveloperKnowledge service. - # - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_knowledge_stub - - ## - # Configure the DeveloperKnowledge Client class. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperKnowledge clients - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_documents.timeout = 60.0 - default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @developer_knowledge_stub.universe_domain - end - - ## - # Create a new DeveloperKnowledge client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperKnowledge 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/developers/knowledge/v1/developerknowledge_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 - - @developer_knowledge_stub = ::Gapic::ServiceStub.new( - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @developer_knowledge_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 - @developer_knowledge_stub.logger - end - - # Service calls - - ## - # Searches for developer knowledge across Google's developer documentation. - # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s - # based on the user's query. There may be many chunks from the same - # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full - # documents, use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # with the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # returned in the - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. - # - # @overload search_document_chunks(request, options = nil) - # Pass arguments to `search_document_chunks` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_document_chunks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @param page_size [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - # - # # Call the search_document_chunks method. - # result = client.search_document_chunks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - # p item - # end - # - def search_document_chunks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest - - # Converts hash and nil to 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_document_chunks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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_document_chunks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_document_chunks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :search_document_chunks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single document with its full Markdown content. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_document(name: nil, view: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :get_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves multiple documents, each with its full Markdown content. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_get_documents(names: nil, view: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param names [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method. - # result = client.batch_get_documents request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - # p result - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.batch_get_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :batch_get_documents, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Answers a query using grounded generation. - # - # @overload answer_query(request, options = nil) - # Pass arguments to `answer_query` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload answer_query(query: nil) - # Pass arguments to `answer_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. The query to answer. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - # - # # Call the answer_query method. - # result = client.answer_query request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - # p result - # - def answer_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.answer_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.answer_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.answer_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :answer_query, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DeveloperKnowledge API. - # - # This class represents the configuration for DeveloperKnowledge, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search_document_chunks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DeveloperKnowledge API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search_document_chunks` - # @return [::Gapic::Config::Method] - # - attr_reader :search_document_chunks - ## - # RPC-specific configuration for `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `answer_query` - # @return [::Gapic::Config::Method] - # - attr_reader :answer_query - - # @private - def initialize parent_rpcs = nil - search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks - @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query - @answer_query = ::Gapic::Config::Method.new answer_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb deleted file mode 100644 index 4d6b73d55cf7..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # Credentials for the DeveloperKnowledge 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-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb deleted file mode 100644 index 6389c8f3c5e6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # Path helper methods for the DeveloperKnowledge API. - module Paths - ## - # Create a fully-qualified Document resource string. - # - # The resource will be in the following format: - # - # `documents/{document}` - # - # @param document [String] - # - # @return [::String] - def document_path document: - "documents/#{document}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb deleted file mode 100644 index 6b7630f75bd6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/developers/developer_knowledge/v1/version" - -require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" -require "google/developers/developer_knowledge/v1/developer_knowledge/paths" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/client" - -module Google - module Developers - module DeveloperKnowledge - module V1 - ## - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - # To load this service and instantiate a REST client: - # - # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module DeveloperKnowledge - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb deleted file mode 100644 index a0c05ad489da..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb +++ /dev/null @@ -1,800 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - module Rest - ## - # REST client for the DeveloperKnowledge service. - # - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_knowledge_stub - - ## - # Configure the DeveloperKnowledge Client class. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperKnowledge clients - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_documents.timeout = 60.0 - default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 - @developer_knowledge_stub.universe_domain - end - - ## - # Create a new DeveloperKnowledge REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperKnowledge 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 - - @developer_knowledge_stub = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @developer_knowledge_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 - @developer_knowledge_stub.logger - end - - # Service calls - - ## - # Searches for developer knowledge across Google's developer documentation. - # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s - # based on the user's query. There may be many chunks from the same - # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full - # documents, use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # with the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # returned in the - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. - # - # @overload search_document_chunks(request, options = nil) - # Pass arguments to `search_document_chunks` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_document_chunks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @param page_size [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - # - # # Call the search_document_chunks method. - # result = client.search_document_chunks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - # p item - # end - # - def search_document_chunks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest - - # Converts hash and nil to an 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_document_chunks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document_chunks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_document_chunks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.search_document_chunks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, "results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single document with its full Markdown content. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_document(name: nil, view: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.get_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves multiple documents, each with its full Markdown content. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_get_documents(names: nil, view: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param names [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method. - # result = client.batch_get_documents request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - # p result - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.batch_get_documents request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Answers a query using grounded generation. - # - # @overload answer_query(request, options = nil) - # Pass arguments to `answer_query` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload answer_query(query: nil) - # Pass arguments to `answer_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. The query to answer. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - # - # # Call the answer_query method. - # result = client.answer_query request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - # p result - # - def answer_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.answer_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.answer_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.answer_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.answer_query request, 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 DeveloperKnowledge REST API. - # - # This class represents the configuration for DeveloperKnowledge 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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 - # # search_document_chunks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" - - config_attr :endpoint, nil, ::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 DeveloperKnowledge API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search_document_chunks` - # @return [::Gapic::Config::Method] - # - attr_reader :search_document_chunks - ## - # RPC-specific configuration for `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `answer_query` - # @return [::Gapic::Config::Method] - # - attr_reader :answer_query - - # @private - def initialize parent_rpcs = nil - search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks - @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query - @answer_query = ::Gapic::Config::Method.new answer_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb deleted file mode 100644 index 2b64ff55126a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/developers/knowledge/v1/developerknowledge_pb" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - module Rest - ## - # REST service stub for the DeveloperKnowledge 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 search_document_chunks REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] - # A result object deserialized from the server's reply - def search_document_chunks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_document_chunks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document_chunks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_document REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # A result object deserialized from the server's reply - def get_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::Document.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_get_documents REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # A result object deserialized from the server's reply - def batch_get_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_get_documents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the answer_query REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # A result object deserialized from the server's reply - def answer_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_answer_query_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "answer_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.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 search_document_chunks REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] - # 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_document_chunks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/documents:searchDocumentChunks", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_document REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^documents(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_documents REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_get_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/documents:batchGet", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the answer_query REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_answer_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1:answerQuery", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb deleted file mode 100644 index 564abffb5326..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge/rest" -require "google/developers/developer_knowledge/v1/version" - -module Google - module Developers - module DeveloperKnowledge - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/developers/developer_knowledge/v1/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb deleted file mode 100644 index 27f225b083b3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb deleted file mode 100644 index 1b5fb1c2dc8e..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/developers/knowledge/v1/developerknowledge.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 = "\n7google/developers/knowledge/v1/developerknowledge.proto\x12\x1egoogle.developers.knowledge.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x04view\x18\x08 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x03\x12!\n\x14\x63ontent_length_bytes\x18\t \x01(\x05\x42\x03\xe0\x41\x03:Z\xea\x41W\n*developerknowledge.googleapis.com/Document\x12\x14\x64ocuments/{document}*\tdocuments2\x08\x64ocument\"w\n\x1bSearchDocumentChunksRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"|\n\x1cSearchDocumentChunksResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.developers.knowledge.v1.DocumentChunk\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x12GetDocumentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"\x9e\x01\n\x18\x42\x61tchGetDocumentsRequest\x12\x41\n\x05names\x18\x01 \x03(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"X\n\x19\x42\x61tchGetDocumentsResponse\x12;\n\tdocuments\x18\x01 \x03(\x0b\x32(.google.developers.knowledge.v1.Document\"(\n\x12\x41nswerQueryRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\"M\n\x13\x41nswerQueryResponse\x12\x36\n\x06\x61nswer\x18\x01 \x01(\x0b\x32&.google.developers.knowledge.v1.Answer\"\xdb\x04\n\x06\x41nswer\x12\x13\n\x0b\x61nswer_text\x18\x01 \x01(\t\x12M\n\tcitations\x18\x02 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.AnswerCitationB\x03\xe0\x41\x03\x12O\n\nreferences\x18\x03 \x03(\x0b\x32\x36.google.developers.knowledge.v1.Answer.AnswerReferenceB\x03\xe0\x41\x03\x1a\x8f\x01\n\x0e\x41nswerCitation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.CitationSourceB\x03\xe0\x41\x03\x1a.\n\x0e\x43itationSource\x12\x1c\n\x0freference_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x1ay\n\x0f\x41nswerReference\x12[\n\x12\x64ocument_reference\x18\x01 \x01(\x0b\x32\x38.google.developers.knowledge.v1.Answer.DocumentReferenceB\x03\xe0\x41\x03H\x00\x42\t\n\x07\x63ontent\x1a_\n\x11\x44ocumentReference\x12J\n\x0e\x64ocument_chunk\x18\x01 \x01(\x0b\x32-.google.developers.knowledge.v1.DocumentChunkB\x03\xe0\x41\x03\"\xbb\x01\n\rDocumentChunk\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x08\x64ocument\x18\x04 \x01(\x0b\x32(.google.developers.knowledge.v1.DocumentB\x03\xe0\x41\x03*y\n\x0c\x44ocumentView\x12\x1d\n\x19\x44OCUMENT_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44OCUMENT_VIEW_BASIC\x10\x01\x12\x16\n\x12\x44OCUMENT_VIEW_FULL\x10\x02\x12\x19\n\x15\x44OCUMENT_VIEW_CONTENT\x10\x03\x32\x81\x06\n\x12\x44\x65veloperKnowledge\x12\xbd\x01\n\x14SearchDocumentChunks\x12;.google.developers.knowledge.v1.SearchDocumentChunksRequest\x1a<.google.developers.knowledge.v1.SearchDocumentChunksResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/documents:searchDocumentChunks\x12\x93\x01\n\x0bGetDocument\x12\x32.google.developers.knowledge.v1.GetDocumentRequest\x1a(.google.developers.knowledge.v1.Document\"&\xda\x41\x04name\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=documents/**}\x12\xa8\x01\n\x11\x42\x61tchGetDocuments\x12\x38.google.developers.knowledge.v1.BatchGetDocumentsRequest\x1a\x39.google.developers.knowledge.v1.BatchGetDocumentsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/documents:batchGet\x12\x92\x01\n\x0b\x41nswerQuery\x12\x32.google.developers.knowledge.v1.AnswerQueryRequest\x1a\x33.google.developers.knowledge.v1.AnswerQueryResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1:answerQuery:\x01*\x1aU\xca\x41!developerknowledge.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x02\n\"com.google.developers.knowledge.v1B\x17\x44\x65veloperKnowledgeProtoP\x01ZGgoogle.golang.org/genproto/googleapis/developers/knowledge/v1;knowledge\xaa\x02\'Google.Developers.DeveloperKnowledge.V1\xca\x02\'Google\\Developers\\DeveloperKnowledge\\V1\xea\x02*Google::Developers::DeveloperKnowledge::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Developers - module DeveloperKnowledge - module V1 - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Document").msgclass - SearchDocumentChunksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksRequest").msgclass - SearchDocumentChunksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksResponse").msgclass - GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.GetDocumentRequest").msgclass - BatchGetDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsRequest").msgclass - BatchGetDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsResponse").msgclass - AnswerQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryRequest").msgclass - AnswerQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryResponse").msgclass - Answer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer").msgclass - Answer::AnswerCitation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerCitation").msgclass - Answer::CitationSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.CitationSource").msgclass - Answer::AnswerReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerReference").msgclass - Answer::DocumentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.DocumentReference").msgclass - DocumentChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentChunk").msgclass - DocumentView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb deleted file mode 100644 index c89acbf572dd..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/developers/knowledge/v1/developerknowledge.proto for package 'Google.Developers.DeveloperKnowledge.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/developers/knowledge/v1/developerknowledge_pb' - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks] - # to find relevant page URIs based on a query, and then use - # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] - # or - # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.developers.knowledge.v1.DeveloperKnowledge' - - # Searches for developer knowledge across Google's developer documentation. - # Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s - # based on the user's query. There may be many chunks from the same - # [Document][google.developers.knowledge.v1.Document]. To retrieve full - # documents, use - # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] - # or - # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] - # with the - # [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] - # returned in the - # [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results]. - rpc :SearchDocumentChunks, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse - # Retrieves a single document with its full Markdown content. - rpc :GetDocument, ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Google::Developers::DeveloperKnowledge::V1::Document - # Retrieves multiple documents, each with its full Markdown content. - rpc :BatchGetDocuments, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse - # Answers a query using grounded generation. - rpc :AnswerQuery, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md deleted file mode 100644 index 76079269bdd8..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Developer Knowledge 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-developers-developer_knowledge-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb deleted file mode 100644 index 60e74d520a79..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb +++ /dev/null @@ -1,371 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Developers - module DeveloperKnowledge - module V1 - # A Document represents a piece of content from the Developer Knowledge corpus. - # @!attribute [rw] name - # @return [::String] - # Identifier. Contains the resource name of the document. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [r] uri - # @return [::String] - # Output only. Provides the URI of the content, such as - # `docs.cloud.google.com/storage/docs/creating-buckets`. - # @!attribute [r] content - # @return [::String] - # Output only. Contains the full content of the document in Markdown format. - # @!attribute [r] description - # @return [::String] - # Output only. Provides a description of the document. - # @!attribute [r] data_source - # @return [::String] - # Output only. Specifies the data source of the document. - # Example data source: `firebase.google.com` - # @!attribute [r] title - # @return [::String] - # Output only. Provides the title of the document. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Represents the timestamp when the content or metadata of the - # document was last updated. - # @!attribute [r] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Output only. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. - # @!attribute [r] content_length_bytes - # @return [::Integer] - # Output only. The length of the `content` field in bytes. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - # @!attribute [rw] query - # @return [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - class SearchDocumentChunksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - # @!attribute [rw] results - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # Contains the search results for the given query. Each - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk} in this list - # contains a snippet of content relevant to the search query. Use the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # field of each result with - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to retrieve the full document content. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. Provides a token that can be sent as `page_token` to retrieve the - # next page. If this field is omitted, there are no subsequent pages. - class SearchDocumentChunksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}. - # @!attribute [rw] name - # @return [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [rw] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - class GetDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [rw] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - class BatchGetDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [rw] documents - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Document>] - # Contains the documents requested. - class BatchGetDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. - # @!attribute [rw] query - # @return [::String] - # Required. The query to answer. - class AnswerQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. - # @!attribute [rw] answer - # @return [::Google::Developers::DeveloperKnowledge::V1::Answer] - # The answer to the query. - class AnswerQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An answer to a query. - # @!attribute [rw] answer_text - # @return [::String] - # Contains the text of the answer. - # @!attribute [r] citations - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerCitation>] - # Output only. Contains citations for the answer. - # @!attribute [r] references - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference>] - # Output only. Contains references for the answer. - class Answer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Citation info for a segment. - # @!attribute [r] start_index - # @return [::Integer] - # Output only. Indicates the start of the segment, measured in bytes (UTF-8 - # unicode), inclusive. If there are multi-byte characters, such as - # non-ASCII characters, the index measurement is longer than the string - # length. - # @!attribute [r] end_index - # @return [::Integer] - # Output only. Indicates the end of the segment, measured in bytes (UTF-8 - # unicode), exclusive. If there are multi-byte characters, such as - # non-ASCII characters, the index measurement is longer than the string - # length. - # @!attribute [r] sources - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::CitationSource>] - # Output only. Contains citation sources for the attributed segment. - class AnswerCitation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Citation source. - # @!attribute [r] reference_index - # @return [::Integer] - # Output only. Contains the index of the - # {::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference Answer.AnswerReference} - # in the `references` repeated field. - class CitationSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a source. - # @!attribute [r] document_reference - # @return [::Google::Developers::DeveloperKnowledge::V1::Answer::DocumentReference] - # Output only. The reference document. - class AnswerReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a document. - # @!attribute [r] document_chunk - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentChunk] - # Output only. Contains the document chunk. The `document_chunk.id` field - # is not set and will be empty. - class DocumentReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A DocumentChunk represents a piece of content from a - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} in the DeveloperKnowledge - # corpus. To fetch the entire document content, pass the `parent` to - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [r] parent - # @return [::String] - # Output only. Contains the resource name of the document this chunk is from. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [r] id - # @return [::String] - # Output only. Specifies the ID of this chunk within the document. The chunk - # ID is unique within a document, but not globally unique across documents. - # The chunk ID is not stable and may change over time. - # @!attribute [r] content - # @return [::String] - # Output only. Contains the content of the document chunk. - # @!attribute [r] document - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # Output only. Represents metadata about the - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} this chunk is from. The - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of this - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} message will be set to - # `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients - # do not need to call - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # if they only need the metadata fields. Otherwise, clients should use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full document content. - class DocumentChunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies which fields of the - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} are included. - module DocumentView - # The default / unset value. See each API method for its default value if - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} is not - # specified. - DOCUMENT_VIEW_UNSPECIFIED = 0 - - # Includes only the basic metadata fields: - # - # - `name` - # - `uri` - # - `data_source` - # - `title` - # - `description` - # - `update_time` - # - `view` - # - `content_length_bytes` - # - # This is the default of view for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - DOCUMENT_VIEW_BASIC = 1 - - # Includes all {::Google::Developers::DeveloperKnowledge::V1::Document Document} fields. - DOCUMENT_VIEW_FULL = 2 - - # Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. - # - # This is the default of view for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # and - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - DOCUMENT_VIEW_CONTENT = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile deleted file mode 100644 index c5326ddd4ac6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1", path: "../" -else - gem "google-developers-developer_knowledge-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-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb deleted file mode 100644 index 1da8579829f3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the answer_query call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query. -# -def answer_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - - # Call the answer_query method. - result = client.answer_query request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb deleted file mode 100644 index 6ea4b06d9af5..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the batch_get_documents call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents. -# -def batch_get_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - - # Call the batch_get_documents method. - result = client.batch_get_documents request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb deleted file mode 100644 index 8cee8fa202c9..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the get_document call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document. -# -def get_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - - # Call the get_document method. - result = client.get_document request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb deleted file mode 100644 index bccd09dd9fcf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the search_document_chunks call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks. -# -def search_document_chunks - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - - # Call the search_document_chunks method. - result = client.search_document_chunks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - p item - end -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json deleted file mode 100644 index 9a973865b831..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-developers-developer_knowledge-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.developers.knowledge.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync", - "title": "Snippet for the search_document_chunks call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks.", - "file": "developer_knowledge/search_document_chunks.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_document_chunks", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "SearchDocumentChunks", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync", - "title": "Snippet for the get_document call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document.", - "file": "developer_knowledge/get_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_document", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::Document", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "GetDocument", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.GetDocument", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync", - "title": "Snippet for the batch_get_documents call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents.", - "file": "developer_knowledge/batch_get_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_documents", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "BatchGetDocuments", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync", - "title": "Snippet for the answer_query call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query.", - "file": "developer_knowledge/answer_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "answer_query", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "AnswerQuery", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.AnswerQuery", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "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-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb deleted file mode 100644 index 025870f575c3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/developer_knowledge/v1/developer_knowledge" - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_document_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.document_path document: "value0" - assert_equal "documents/value0", path - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb deleted file mode 100644 index 9521d08dc860..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - query = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_document_chunks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_search_document_chunks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_document_chunks_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_document_chunks_client_stub.call_count - end - end - end - - def test_get_document - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::Document.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DOCUMENT_VIEW_UNSPECIFIED - - get_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_get_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_document_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_document({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_document name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_document({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_count - end - end - end - - def test_batch_get_documents - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - names = ["hello world"] - view = :DOCUMENT_VIEW_UNSPECIFIED - - batch_get_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_batch_get_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_documents_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_get_documents({ names: names, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_get_documents names: names, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_get_documents({ names: names, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_count - end - end - end - - def test_answer_query - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - query = "hello world" - - answer_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_answer_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, answer_query_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.answer_query({ query: query }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.answer_query query: query do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.answer_query({ query: query }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, answer_query_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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb deleted file mode 100644 index a43b73fefb45..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge" - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - query = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_document_chunks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_document_chunks, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, request - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_document_chunks_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_document_chunks_client_stub.call_rpc_count - end - end - - def test_get_document - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::Document.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = :DOCUMENT_VIEW_UNSPECIFIED - - get_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_document, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, request - assert_equal "hello world", request["name"] - assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_document_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_document({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_document name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_document({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_rpc_count - end - end - - def test_batch_get_documents - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - names = ["hello world"] - view = :DOCUMENT_VIEW_UNSPECIFIED - - batch_get_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_documents, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, request - assert_equal ["hello world"], request["names"] - assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_documents_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_get_documents({ names: names, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_get_documents names: names, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_get_documents({ names: names, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_rpc_count - end - end - - def test_answer_query - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - query = "hello world" - - answer_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :answer_query, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, request - assert_equal "hello world", request["query"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, answer_query_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.answer_query({ query: query }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.answer_query query: query do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.answer_query({ query: query }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, answer_query_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials-v1/.gitignore b/owl-bot-staging/google-iam-credentials-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 f135131dde2c..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-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 6165a018ba38..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - 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 e50c0aa546c8..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb +++ /dev/null @@ -1,33 +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 -pool.add_serialized_file(descriptor_data) - -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 e7e7c3b84421..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb +++ /dev/null @@ -1,856 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 00f36f66f3e4..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +++ /dev/null @@ -1,785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 e27e78574f32..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb +++ /dev/null @@ -1,24 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-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 3b870f137cb7..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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.sign_blob({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.sign_blob name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.sign_jwt name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 6fc2459f3e5f..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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v2/.gitignore b/owl-bot-staging/google-iam-v2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v2/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v2/.repo-metadata.json b/owl-bot-staging/google-iam-v2/.repo-metadata.json deleted file mode 100644 index f361454bbf48..000000000000 --- a/owl-bot-staging/google-iam-v2/.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-v2", - "distribution_name": "google-iam-v2", - "is_cloud": false, - "language": "ruby", - "name": "iam", - "name_pretty": "IAM V2 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. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v2/.rubocop.yml b/owl-bot-staging/google-iam-v2/.rubocop.yml deleted file mode 100644 index 34e52b136070..000000000000 --- a/owl-bot-staging/google-iam-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-iam-v2.rb" diff --git a/owl-bot-staging/google-iam-v2/.toys.rb b/owl-bot-staging/google-iam-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-iam-v2/.yardopts b/owl-bot-staging/google-iam-v2/.yardopts deleted file mode 100644 index 74817379a031..000000000000 --- a/owl-bot-staging/google-iam-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="IAM V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-iam-v2/AUTHENTICATION.md b/owl-bot-staging/google-iam-v2/AUTHENTICATION.md deleted file mode 100644 index 6a0825ac614f..000000000000 --- a/owl-bot-staging/google-iam-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-iam-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/iam/v2" - -client = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v2" - -::Google::Iam::V2::Policies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V2::Policies::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-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/iam/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V2::Policies::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-v2/CHANGELOG.md b/owl-bot-staging/google-iam-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v2/Gemfile b/owl-bot-staging/google-iam-v2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v2/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v2/LICENSE.md b/owl-bot-staging/google-iam-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-iam-v2/README.md b/owl-bot-staging/google-iam-v2/README.md deleted file mode 100644 index 52e492f214ea..000000000000 --- a/owl-bot-staging/google-iam-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the IAM V2 API - -Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. - -Manages identity and access control policies for Google Cloud Platform 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 IAM V2 API. Most users should consider using -the main client gem, -[google-iam-client](https://rubygems.org/gems/google-iam-client). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v2" - -client = ::Google::Iam::V2::Policies::Client.new -request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_policies request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-iam-v2) -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/v2" -require "logger" - -client = ::Google::Iam::V2::Policies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam-client`, -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-client`. -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-v2/Rakefile b/owl-bot-staging/google-iam-v2/Rakefile deleted file mode 100644 index 17091d3aff5d..000000000000 --- a/owl-bot-staging/google-iam-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-iam-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/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-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-iam-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-iam-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-iam-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v2" - header "google-iam-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-iam-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-iam-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-iam-v2/gapic_metadata.json b/owl-bot-staging/google-iam-v2/gapic_metadata.json deleted file mode 100644 index f9325ed5c881..000000000000 --- a/owl-bot-staging/google-iam-v2/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.iam.v2", - "libraryPackage": "::Google::Iam::V2", - "services": { - "Policies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V2::Policies::Client", - "rpcs": { - "ListPolicies": { - "methods": [ - "list_policies" - ] - }, - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "CreatePolicy": { - "methods": [ - "create_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "DeletePolicy": { - "methods": [ - "delete_policy" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec b/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec deleted file mode 100644 index e7bf97f93984..000000000000 --- a/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v2" - gem.version = Google::Iam::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control policies for Google Cloud Platform resources. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb b/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb deleted file mode 100644 index 976c5cee3515..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/iam/v2" diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb deleted file mode 100644 index fc5ba38b2a63..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v2/policies" -require "google/iam/v2/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v2" - # client = ::Google::Iam::V2::Policies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v2" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module V2 - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/iam/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb deleted file mode 100644 index 13a714e88610..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v2/deny.proto - -require 'google/protobuf' - -require 'google/type/expr_pb' - - -descriptor_data = "\n\x18google/iam/v2/deny.proto\x12\rgoogle.iam.v2\x1a\x16google/type/expr.proto\"\xab\x01\n\x08\x44\x65nyRule\x12\x19\n\x11\x64\x65nied_principals\x18\x01 \x03(\t\x12\x1c\n\x14\x65xception_principals\x18\x02 \x03(\t\x12\x1a\n\x12\x64\x65nied_permissions\x18\x03 \x03(\t\x12\x1d\n\x15\x65xception_permissions\x18\x04 \x03(\t\x12+\n\x10\x64\x65nial_condition\x18\x05 \x01(\x0b\x32\x11.google.type.ExprB{\n\x11\x63om.google.iam.v2B\rDenyRuleProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V2 - DenyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DenyRule").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb deleted file mode 100644 index 7c30e2a1e284..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v2/version" - -require "google/iam/v2/policies/credentials" -require "google/iam/v2/policies/operations" -require "google/iam/v2/policies/client" -require "google/iam/v2/policies/rest" - -module Google - module Iam - module V2 - ## - # An interface for managing Identity and Access Management (IAM) policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v2/policies" - # client = ::Google::Iam::V2::Policies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v2/policies/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module Policies - end - end - end -end - -helper_path = ::File.join __dir__, "policies", "helpers.rb" -require "google/iam/v2/policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb deleted file mode 100644 index 9484b167af02..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb +++ /dev/null @@ -1,989 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v2/policy_pb" - -module Google - module Iam - module V2 - module Policies - ## - # Client for the Policies service. - # - # An interface for managing Identity and Access Management (IAM) policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :policies_stub - - ## - # Configure the Policies Client class. - # - # See {::Google::Iam::V2::Policies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Policies clients - # ::Google::Iam::V2::Policies::Client.configure do |config| - # config.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", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_policies.timeout = 60.0 - default_config.rpcs.list_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_policy.timeout = 60.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_policy.timeout = 60.0 - default_config.rpcs.create_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy.timeout = 60.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_policy.timeout = 60.0 - default_config.rpcs.delete_policy.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 Policies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V2::Policies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policies_stub.universe_domain - end - - ## - # Create a new Policies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V2::Policies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V2::Policies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Policies 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/v2/policy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @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 - - @policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V2::Policies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policies_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::Iam::V2::Policies::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @policies_stub.logger - end - - # Service calls - - ## - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - # - # @overload list_policies(request, options = nil) - # Pass arguments to `list_policies` via a request object, either of type - # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param page_size [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @param page_token [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::ListPoliciesRequest.new - # - # # Call the list_policies method. - # result = client.list_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V2::Policy. - # p item - # end - # - def list_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :list_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policies_stub, :list_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V2::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V2::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Iam::V2::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :get_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a policy. - # - # @overload create_policy(request, options = nil) - # Pass arguments to `create_policy` via a request object, either of type - # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy(parent: nil, policy: nil, policy_id: nil) - # Pass arguments to `create_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to create. - # @param policy_id [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::CreatePolicyRequest.new - # - # # Call the create_policy method. - # result = client.create_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :create_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use {::Google::Iam::V2::Policies::Client#get_policy GetPolicy} to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :update_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy. This action is permanent. - # - # @overload delete_policy(request, options = nil) - # Pass arguments to `delete_policy` via a request object, either of type - # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy(name: nil, etag: nil) - # Pass arguments to `delete_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param etag [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `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/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::DeletePolicyRequest.new - # - # # Call the delete_policy method. - # result = client.delete_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :delete_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Policies API. - # - # This class represents the configuration for Policies, - # providing control 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::V2::Policies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V2::Policies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V2::Policies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V2::Policies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Policies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policies - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `create_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `delete_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy - - # @private - def initialize parent_rpcs = nil - list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies - @list_policies = ::Gapic::Config::Method.new list_policies_config - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy - @create_policy = ::Gapic::Config::Method.new create_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy - @delete_policy = ::Gapic::Config::Method.new delete_policy_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb deleted file mode 100644 index 99a803e1b8c6..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.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 "googleauth" - -module Google - module Iam - module V2 - module Policies - # Credentials for the Policies 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 diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb deleted file mode 100644 index 1f11efd8851b..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam - module V2 - module Policies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb deleted file mode 100644 index c1f6d1def0ec..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v2/version" - -require "google/iam/v2/policies/credentials" -require "google/iam/v2/policies/rest/operations" -require "google/iam/v2/policies/rest/client" - -module Google - module Iam - module V2 - ## - # An interface for managing Identity and Access Management (IAM) policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v2/policies/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module Policies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v2/policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb deleted file mode 100644 index c440f4d15471..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb +++ /dev/null @@ -1,911 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v2/policy_pb" -require "google/iam/v2/policies/rest/service_stub" - -module Google - module Iam - module V2 - module Policies - module Rest - ## - # REST client for the Policies service. - # - # An interface for managing Identity and Access Management (IAM) policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :policies_stub - - ## - # Configure the Policies Client class. - # - # See {::Google::Iam::V2::Policies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Policies clients - # ::Google::Iam::V2::Policies::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", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_policies.timeout = 60.0 - default_config.rpcs.list_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_policy.timeout = 60.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_policy.timeout = 60.0 - default_config.rpcs.create_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy.timeout = 60.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_policy.timeout = 60.0 - default_config.rpcs.delete_policy.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 Policies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V2::Policies::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 - @policies_stub.universe_domain - end - - ## - # Create a new Policies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Policies 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::Iam::V2::Policies::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 - - @policies_stub = ::Google::Iam::V2::Policies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policies_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::Iam::V2::Policies::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @policies_stub.logger - end - - # Service calls - - ## - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - # - # @overload list_policies(request, options = nil) - # Pass arguments to `list_policies` via a request object, either of type - # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param page_size [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @param page_token [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::ListPoliciesRequest.new - # - # # Call the list_policies method. - # result = client.list_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V2::Policy. - # p item - # end - # - def list_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.list_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policies_stub, :list_policies, "policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V2::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Iam::V2::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.get_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a policy. - # - # @overload create_policy(request, options = nil) - # Pass arguments to `create_policy` via a request object, either of type - # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy(parent: nil, policy: nil, policy_id: nil) - # Pass arguments to `create_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to create. - # @param policy_id [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::CreatePolicyRequest.new - # - # # Call the create_policy method. - # result = client.create_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest - - # Converts hash and nil to an 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_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.create_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use {::Google::Iam::V2::Policies::Rest::Client#get_policy GetPolicy} to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.update_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy. This action is permanent. - # - # @overload delete_policy(request, options = nil) - # Pass arguments to `delete_policy` via a request object, either of type - # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy(name: nil, etag: nil) - # Pass arguments to `delete_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param etag [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `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/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::DeletePolicyRequest.new - # - # # Call the delete_policy method. - # result = client.delete_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.delete_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Policies REST API. - # - # This class represents the configuration for Policies 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::V2::Policies::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_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V2::Policies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 Policies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policies - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `create_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `delete_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy - - # @private - def initialize parent_rpcs = nil - list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies - @list_policies = ::Gapic::Config::Method.new list_policies_config - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy - @create_policy = ::Gapic::Config::Method.new create_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy - @delete_policy = ::Gapic::Config::Method.new delete_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb deleted file mode 100644 index 389d302a8513..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam - module V2 - module Policies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb deleted file mode 100644 index cfcc7003472b..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb +++ /dev/null @@ -1,386 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v2/policy_pb" - -module Google - module Iam - module V2 - module Policies - module Rest - ## - # REST service stub for the Policies 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_policies REST call - # - # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V2::ListPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::ListPoliciesResponse] - # A result object deserialized from the server's reply - def list_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V2::ListPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy REST call - # - # @param request_pb [::Google::Iam::V2::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V2::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::Policy] - # A result object deserialized from the server's reply - def get_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V2::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_policy REST call - # - # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy REST call - # - # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy REST call - # - # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_policies REST call - # - # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}", - matches: [ - ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy REST call - # - # @param request_pb [::Google::Iam::V2::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_policy REST call - # - # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] - # 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_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}", - body: "policy", - matches: [ - ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy REST call - # - # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v2/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy REST call - # - # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb deleted file mode 100644 index ac1b3aaac015..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v2/policy.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/iam/v2/deny_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1agoogle/iam/v2/policy.proto\x12\rgoogle.iam.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/iam/v2/deny.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x03\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x11\n\x04kind\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12;\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32&.google.iam.v2.Policy.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12(\n\x05rules\x18\n \x03(\x0b\x32\x19.google.iam.v2.PolicyRule\x12\x1f\n\x12managing_authority\x18\x0b \x01(\tB\x03\xe0\x41\x05\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\nPolicyRule\x12,\n\tdeny_rule\x18\x02 \x01(\x0b\x32\x17.google.iam.v2.DenyRuleH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x06\n\x04kind\"Q\n\x13ListPoliciesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"X\n\x14ListPoliciesResponse\x12\'\n\x08policies\x18\x01 \x03(\x0b\x32\x15.google.iam.v2.Policy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"%\n\x10GetPolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"i\n\x13\x43reatePolicyRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\x12\x11\n\tpolicy_id\x18\x03 \x01(\t\"A\n\x13UpdatePolicyRequest\x12*\n\x06policy\x18\x01 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\";\n\x13\x44\x65letePolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"J\n\x17PolicyOperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xd0\x06\n\x08Policies\x12\x83\x01\n\x0cListPolicies\x12\".google.iam.v2.ListPoliciesRequest\x1a#.google.iam.v2.ListPoliciesResponse\"*\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{parent=policies/*/*}\x12m\n\tGetPolicy\x12\x1f.google.iam.v2.GetPolicyRequest\x1a\x15.google.iam.v2.Policy\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{name=policies/*/*/*}\x12\xba\x01\n\x0c\x43reatePolicy\x12\".google.iam.v2.CreatePolicyRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x17parent,policy,policy_id\x82\xd3\xe4\x93\x02#\"\x19/v2/{parent=policies/*/*}:\x06policy\x12\xa7\x01\n\x0cUpdatePolicy\x12\".google.iam.v2.UpdatePolicyRequest\x1a\x1d.google.longrunning.Operation\"T\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\x82\xd3\xe4\x93\x02*\x1a /v2/{policy.name=policies/*/*/*}:\x06policy\x12\x9f\x01\n\x0c\x44\x65letePolicy\x12\".google.iam.v2.DeletePolicyRequest\x1a\x1d.google.longrunning.Operation\"L\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v2/{name=policies/*/*/*}\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBy\n\x11\x63om.google.iam.v2B\x0bPolicyProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V2 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.Policy").msgclass - PolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyRule").msgclass - ListPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesRequest").msgclass - ListPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesResponse").msgclass - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.GetPolicyRequest").msgclass - CreatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.CreatePolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.UpdatePolicyRequest").msgclass - DeletePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DeletePolicyRequest").msgclass - PolicyOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyOperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb deleted file mode 100644 index bd26fe57cd18..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v2/policy.proto for package 'google.iam.v2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v2/policy_pb' - -module Google - module Iam - module V2 - module Policies - # An interface for managing Identity and Access Management (IAM) policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v2.Policies' - - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - rpc :ListPolicies, ::Google::Iam::V2::ListPoliciesRequest, ::Google::Iam::V2::ListPoliciesResponse - # Gets a policy. - rpc :GetPolicy, ::Google::Iam::V2::GetPolicyRequest, ::Google::Iam::V2::Policy - # Creates a policy. - rpc :CreatePolicy, ::Google::Iam::V2::CreatePolicyRequest, ::Google::Longrunning::Operation - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - rpc :UpdatePolicy, ::Google::Iam::V2::UpdatePolicyRequest, ::Google::Longrunning::Operation - # Deletes a policy. This action is permanent. - rpc :DeletePolicy, ::Google::Iam::V2::DeletePolicyRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb deleted file mode 100644 index d430e48053e6..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v2/policies/rest" -require "google/iam/v2/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v2/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module V2 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb deleted file mode 100644 index da9bc723e32d..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/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 V2 - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/README.md b/owl-bot-staging/google-iam-v2/proto_docs/README.md deleted file mode 100644 index 155a17d3cb7c..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# IAM V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb deleted file mode 100644 index 85ac06367665..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.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 Iam - module V2 - # A deny rule in an IAM deny policy. - # @!attribute [rw] denied_principals - # @return [::Array<::String>] - # The identities that are prevented from using one or more permissions on - # Google Cloud resources. This field can contain the following values: - # - # * `principalSet://goog/public:all`: A special identifier that represents - # any principal that is on the internet, even if they do not have a Google - # Account or are not logged in. - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - # the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # @!attribute [rw] exception_principals - # @return [::Array<::String>] - # The identities that are excluded from the deny rule, even if they are - # listed in the `denied_principals`. For example, you could add a Google - # group to the `denied_principals`, then exclude specific users who belong to - # that group. - # - # This field can contain the same values as the `denied_principals` field, - # excluding `principalSet://goog/public:all`, which represents all users on - # the internet. - # @!attribute [rw] denied_permissions - # @return [::Array<::String>] - # The permissions that are explicitly denied by this rule. Each permission - # uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - # is the fully qualified domain name for the service. For example, - # `iam.googleapis.com/roles.list`. - # @!attribute [rw] exception_permissions - # @return [::Array<::String>] - # Specifies the permissions that this rule excludes from the set of denied - # permissions given by `denied_permissions`. If a permission appears in - # `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - # denied. - # - # The excluded permissions can be specified using the same syntax as - # `denied_permissions`. - # @!attribute [rw] denial_condition - # @return [::Google::Type::Expr] - # The condition that determines whether this deny rule applies to a request. - # If the condition expression evaluates to `true`, then the deny rule is - # applied; otherwise, the deny rule is not applied. - # - # Each deny rule is evaluated independently. If this deny rule does not apply - # to a request, other deny rules might still apply. - # - # The condition can use CEL functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - # functions and operators are not supported. - class DenyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb deleted file mode 100644 index 917b870c27c0..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V2 - # Data for an IAM policy. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the `Policy`, which must be unique. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, requests can use the alphanumeric or the numeric ID. - # Responses always contain the numeric ID. - # @!attribute [rw] uid - # @return [::String] - # Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - # `Policy` is created. - # @!attribute [r] kind - # @return [::String] - # Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - # @!attribute [rw] display_name - # @return [::String] - # A user-specified description of the `Policy`. This value can be up to 63 - # characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # A key-value map to store arbitrary metadata for the `Policy`. Keys - # can be up to 63 characters. Values can be up to 255 characters. - # @!attribute [rw] etag - # @return [::String] - # An opaque tag that identifies the current version of the `Policy`. IAM uses - # this value to help manage concurrent updates, so they do not cause one - # update to be overwritten by another. - # - # If this field is present in a [CreatePolicy][] request, the value is - # ignored. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V2::PolicyRule>] - # A list of rules that specify the behavior of the `Policy`. All of the rules - # should be of the `kind` specified in the `Policy`. - # @!attribute [rw] managing_authority - # @return [::String] - # Immutable. Specifies that this policy is managed by an authority and can only be - # modified by that authority. Usage is restricted. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single rule in a `Policy`. - # @!attribute [rw] deny_rule - # @return [::Google::Iam::V2::DenyRule] - # A rule for a deny policy. - # @!attribute [rw] description - # @return [::String] - # A user-specified description of the rule. This value can be up to 256 - # characters. - class PolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListPolicies`. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - class ListPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListPolicies`. - # @!attribute [rw] policies - # @return [::Array<::Google::Iam::V2::Policy>] - # Metadata for the policies that are attached to the resource. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that you can use in a {::Google::Iam::V2::ListPoliciesRequest ListPoliciesRequest} to retrieve the - # next page. If this field is omitted, there are no additional pages. - class ListPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `CreatePolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] policy - # @return [::Google::Iam::V2::Policy] - # Required. The policy to create. - # @!attribute [rw] policy_id - # @return [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - class CreatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `UpdatePolicy`. - # @!attribute [rw] policy - # @return [::Google::Iam::V2::Policy] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DeletePolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] etag - # @return [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `etag`. - class DeletePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for long-running `Policy` operations. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp when the `google.longrunning.Operation` was created. - class PolicyOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/snippets/Gemfile b/owl-bot-staging/google-iam-v2/snippets/Gemfile deleted file mode 100644 index 0b586e897f32..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-iam-v2", path: "../" -else - gem "google-iam-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb deleted file mode 100644 index 992efa4ac456..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_CreatePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the create_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#create_policy. -# -def create_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::CreatePolicyRequest.new - - # Call the create_policy method. - result = client.create_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb deleted file mode 100644 index 97dbcb650132..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_DeletePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the delete_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#delete_policy. -# -def delete_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::DeletePolicyRequest.new - - # Call the delete_policy method. - result = client.delete_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb deleted file mode 100644 index 6820282d9a3b..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_GetPolicy_sync] -require "google/iam/v2" - -## -# Snippet for the get_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#get_policy. -# -def get_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::GetPolicyRequest.new - - # Call the get_policy method. - result = client.get_policy request - - # The returned object is of type Google::Iam::V2::Policy. - p result -end -# [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb b/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb deleted file mode 100644 index d7d580e8441f..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_ListPolicies_sync] -require "google/iam/v2" - -## -# Snippet for the list_policies call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#list_policies. -# -def list_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::ListPoliciesRequest.new - - # Call the list_policies method. - result = client.list_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V2::Policy. - p item - end -end -# [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb deleted file mode 100644 index 417fd211883b..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_UpdatePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the update_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#update_policy. -# -def update_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::UpdatePolicyRequest.new - - # Call the update_policy method. - result = client.update_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json b/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json deleted file mode 100644 index a44511598630..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v2_generated_Policies_ListPolicies_sync", - "title": "Snippet for the list_policies call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#list_policies.", - "file": "policies/list_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policies", - "full_name": "::Google::Iam::V2::Policies::Client#list_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::ListPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V2::ListPoliciesResponse", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "ListPolicies", - "full_name": "google.iam.v2.Policies.ListPolicies", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_GetPolicy_sync", - "title": "Snippet for the get_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#get_policy.", - "file": "policies/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Iam::V2::Policies::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V2::Policy", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.iam.v2.Policies.GetPolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_CreatePolicy_sync", - "title": "Snippet for the create_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#create_policy.", - "file": "policies/create_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy", - "full_name": "::Google::Iam::V2::Policies::Client#create_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::CreatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "CreatePolicy", - "full_name": "google.iam.v2.Policies.CreatePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#update_policy.", - "file": "policies/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Iam::V2::Policies::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.iam.v2.Policies.UpdatePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_DeletePolicy_sync", - "title": "Snippet for the delete_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#delete_policy.", - "file": "policies/delete_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy", - "full_name": "::Google::Iam::V2::Policies::Client#delete_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::DeletePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "DeletePolicy", - "full_name": "google.iam.v2.Policies.DeletePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "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-iam-v2/test/google/iam/v2/policies_operations_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb deleted file mode 100644 index 7dcd32b68c5f..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_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/iam/v2/policy_pb" -require "google/iam/v2/policy_services_pb" -require "google/iam/v2/policies" - -class ::Google::Iam::V2::Policies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb deleted file mode 100644 index fbecbeaf511a..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v2/policy_pb" -require "google/iam/v2/policies/rest" - - -class ::Google::Iam::V2::Policies::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_policies - # Create test objects. - client_result = ::Google::Iam::V2::ListPoliciesResponse.new - http_response = OpenStruct.new 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_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_list_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policies_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_count - end - end - end - - def test_get_policy - # Create test objects. - client_result = ::Google::Iam::V2::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_count - end - end - end - - def test_create_policy - # Create test objects. - 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" - policy = {} - policy_id = "hello world" - - create_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_create_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy parent: parent, policy: policy, policy_id: policy_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_client_stub.call_count - end - end - end - - def test_update_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy({ policy: policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy policy: policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy({ policy: policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_count - end - end - end - - def test_delete_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_delete_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::V2::Policies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb deleted file mode 100644 index 8a3804aaab70..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v2/policy_pb" -require "google/iam/v2/policies" - -class ::Google::Iam::V2::Policies::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_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V2::ListPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policies, name - assert_kind_of ::Google::Iam::V2::ListPoliciesRequest, 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_policies_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_rpc_count - end - end - - def test_get_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V2::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Iam::V2::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_rpc_count - end - end - - def test_create_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy = {} - policy_id = "hello world" - - create_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy, name - assert_kind_of ::Google::Iam::V2::CreatePolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] - assert_equal "hello world", request["policy_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy parent: parent, policy: policy, policy_id: policy_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_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_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Iam::V2::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy({ policy: policy }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy policy: policy do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy({ policy: policy }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| - assert_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_policy_client_stub.call_rpc_count - end - end - - def test_delete_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy, name - assert_kind_of ::Google::Iam::V2::DeletePolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::V2::Policies::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::V2::Policies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V2::Policies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v2/test/helper.rb b/owl-bot-staging/google-iam-v2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v2/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v3/.gitignore b/owl-bot-staging/google-iam-v3/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v3/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v3/.repo-metadata.json b/owl-bot-staging/google-iam-v3/.repo-metadata.json deleted file mode 100644 index 99b5e3acd3ae..000000000000 --- a/owl-bot-staging/google-iam-v3/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest", - "distribution_name": "google-iam-v3", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3 API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3/.rubocop.yml b/owl-bot-staging/google-iam-v3/.rubocop.yml deleted file mode 100644 index a513a8400ebb..000000000000 --- a/owl-bot-staging/google-iam-v3/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v3.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-v3.rb" diff --git a/owl-bot-staging/google-iam-v3/.toys.rb b/owl-bot-staging/google-iam-v3/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v3/.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-v3/.yardopts b/owl-bot-staging/google-iam-v3/.yardopts deleted file mode 100644 index b0b7998f4801..000000000000 --- a/owl-bot-staging/google-iam-v3/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) V3 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-v3/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md deleted file mode 100644 index 8f81a23b250f..000000000000 --- a/owl-bot-staging/google-iam-v3/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v3 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-v3 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/v3" - -client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3" - -::Google::Iam::V3::AccessPolicies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3::AccessPolicies::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-v3 -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/v3" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3::AccessPolicies::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-v3/CHANGELOG.md b/owl-bot-staging/google-iam-v3/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3/Gemfile b/owl-bot-staging/google-iam-v3/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v3/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3/LICENSE.md b/owl-bot-staging/google-iam-v3/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/README.md b/owl-bot-staging/google-iam-v3/README.md deleted file mode 100644 index d40036b5625e..000000000000 --- a/owl-bot-staging/google-iam-v3/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3 API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Identity and Access Management (IAM) V3 API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v3 -``` - -## 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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3" - -client = ::Google::Iam::V3::AccessPolicies::Client.new -request = ::Google::Iam::V3::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_access_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3" -require "logger" - -client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-v3`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-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-v3`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-iam-v3/Rakefile b/owl-bot-staging/google-iam-v3/Rakefile deleted file mode 100644 index 0b6c7b75d2e4..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3 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/v3/access_policies/credentials" - ::Google::Iam::V3::AccessPolicies::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-v3 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-v3 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-v3 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-v3 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3" - header "google-iam-v3 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v3 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-v3 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-v3 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-v3/gapic_metadata.json b/owl-bot-staging/google-iam-v3/gapic_metadata.json deleted file mode 100644 index 62878ea653a0..000000000000 --- a/owl-bot-staging/google-iam-v3/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3", - "libraryPackage": "::Google::Iam::V3", - "services": { - "AccessPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::AccessPolicies::Client", - "rpcs": { - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "SearchAccessPolicyBindings": { - "methods": [ - "search_access_policy_bindings" - ] - } - } - } - } - }, - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec deleted file mode 100644 index 36aa9ae1b51a..000000000000 --- a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3" - gem.version = Google::Iam::V3::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb deleted file mode 100644 index 567b503c671b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google-iam-v3.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/v3" diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb deleted file mode 100644 index b4c095ee8854..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.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/v3/access_policies" -require "google/iam/v3/policy_bindings" -require "google/iam/v3/principal_access_boundary_policies" -require "google/iam/v3/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module V3 - end - end -end - -helper_path = ::File.join __dir__, "v3", "_helpers.rb" -require "google/iam/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb deleted file mode 100644 index 5127f5311dc8..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/version" - -require "google/iam/v3/access_policies/credentials" -require "google/iam/v3/access_policies/paths" -require "google/iam/v3/access_policies/operations" -require "google/iam/v3/access_policies/client" -require "google/iam/v3/access_policies/rest" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) access policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/access_policies" - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/access_policies/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module AccessPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "access_policies", "helpers.rb" -require "google/iam/v3/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb deleted file mode 100644 index 64961d0c2f2b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb +++ /dev/null @@ -1,1113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/access_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module AccessPolicies - ## - # Client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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/v3/access_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::AccessPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_policy&.name - header_params["access_policy.name"] = request.access_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. - # - # This class represents the configuration for AccessPolicies, - # providing control 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::V3::AccessPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb deleted file mode 100644 index f165dafeae74..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module AccessPolicies - # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb deleted file mode 100644 index 706c5cd82a59..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/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 Iam - module V3 - module AccessPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb deleted file mode 100644 index 870d21d50a77..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module AccessPolicies - # Path helper methods for the AccessPolicies API. - module Paths - ## - # Create a fully-qualified AccessPolicy resource string. - # - # @overload access_policy_path(organization:, location:, access_policy:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` - # - # @param organization [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(folder:, location:, access_policy:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` - # - # @param folder [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(project:, location:, access_policy:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` - # - # @param project [String] - # @param location [String] - # @param access_policy [String] - # - # @return [::String] - def access_policy_path **args - resources = { - "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:location:project" => (proc do |project:, location:, access_policy:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb deleted file mode 100644 index df4af139d08c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v3/version" - -require "google/iam/v3/access_policies/credentials" -require "google/iam/v3/access_policies/paths" -require "google/iam/v3/access_policies/rest/operations" -require "google/iam/v3/access_policies/rest/client" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) access policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/access_policies/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module AccessPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb deleted file mode 100644 index 3d26c85246d0..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb +++ /dev/null @@ -1,1028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/access_policies_service_pb" -require "google/iam/v3/access_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module AccessPolicies - module Rest - ## - # REST client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3::AccessPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3::AccessPolicies::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::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 - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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::Iam::V3::AccessPolicies::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 - - @access_policies_stub = ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.search_access_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. - # - # This class represents the configuration for AccessPolicies 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::V3::AccessPolicies::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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::AccessPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb deleted file mode 100644 index 45a22d4ef879..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module AccessPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb deleted file mode 100644 index 78afacefef95..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/access_policies_service_pb" - -module Google - module Iam - module V3 - module AccessPolicies - module Rest - ## - # REST service stub for the AccessPolicies 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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::AccessPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListAccessPoliciesResponse.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_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchAccessPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchAccessPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_access_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] - # 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_access_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb deleted file mode 100644 index 2f20e83c23b6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/access_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/access_policy_resources_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n+google/iam/v3/access_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/iam/v3/access_policy_resources.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc8\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"p\n\x19UpdateAccessPolicyRequest\x12\x37\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"p\n\x1aListAccessPoliciesResponse\x12\x34\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1b.google.iam.v3.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchAccessPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xd2\x10\n\x0e\x41\x63\x63\x65ssPolicies\x12\x84\x03\n\x12\x43reateAccessPolicy\x12(.google.iam.v3.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa4\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xd1\x01\"2/v3/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZB\"1/v3/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZH\"7/v3/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x8a\x02\n\x0fGetAccessPolicy\x12%.google.iam.v3.GetAccessPolicyRequest\x1a\x1b.google.iam.v3.AccessPolicy\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/accessPolicies/*}Z3\x12\x31/v3/{name=folders/*/locations/*/accessPolicies/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\x86\x03\n\x12UpdateAccessPolicy\x12(.google.iam.v3.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xfb\x01\x32@/v3/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZP2?/v3/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZV2E/v3/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xbf\x02\n\x12\x44\x65leteAccessPolicy\x12(.google.iam.v3.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/accessPolicies/*}Z3*1/v3/{name=folders/*/locations/*/accessPolicies/*}Z9*7/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\xa0\x02\n\x12ListAccessPolicies\x12(.google.iam.v3.ListAccessPoliciesRequest\x1a).google.iam.v3.ListAccessPoliciesResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/accessPoliciesZ3\x12\x31/v3/{parent=folders/*/locations/*}/accessPoliciesZ9\x12\x37/v3/{parent=organizations/*/locations/*}/accessPolicies\x12\xf5\x02\n\x1aSearchAccessPolicyBindings\x12\x30.google.iam.v3.SearchAccessPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchAccessPolicyBindingsResponse\"\xf1\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe3\x01\x12L/v3/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZH\x12\x46/v3/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZI\x12G/v3/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\x11\x63om.google.iam.v3B\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreateAccessPolicyRequest").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeleteAccessPolicyRequest").msgclass - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesResponse").msgclass - SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsRequest").msgclass - SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb deleted file mode 100644 index 7f9dfed767c4..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/access_policies_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/access_policies_service_pb' - -module Google - module Iam - module V3 - module AccessPolicies - # Manages Identity and Access Management (IAM) access policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.AccessPolicies' - - # Creates an access policy, and returns a long running operation. - rpc :CreateAccessPolicy, ::Google::Iam::V3::CreateAccessPolicyRequest, ::Google::Longrunning::Operation - # Gets an access policy. - rpc :GetAccessPolicy, ::Google::Iam::V3::GetAccessPolicyRequest, ::Google::Iam::V3::AccessPolicy - # Updates an access policy. - rpc :UpdateAccessPolicy, ::Google::Iam::V3::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an access policy. - rpc :DeleteAccessPolicy, ::Google::Iam::V3::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists access policies. - rpc :ListAccessPolicies, ::Google::Iam::V3::ListAccessPoliciesRequest, ::Google::Iam::V3::ListAccessPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchAccessPolicyBindings, ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3::SearchAccessPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb deleted file mode 100644 index 71dd0c5bd31b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/access_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n+google/iam/v3/access_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb1\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32,.google.iam.v3.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\".google.iam.v3.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"J\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x33\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3.AccessPolicyRuleB\x03\xe0\x41\x02\"\x9d\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12@\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32&.google.iam.v3.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x41\n\toperation\x18\n \x01(\x0b\x32).google.iam.v3.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12H\n\nconditions\x18\t \x03(\x0b\x32/.google.iam.v3.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x88\x01\n\x11\x63om.google.iam.v3B\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicy").msgclass - AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyDetails").msgclass - AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule").msgclass - AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Operation").msgclass - AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb deleted file mode 100644 index d0c9141ce226..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/iam/v3/operation_metadata.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x84\x01\n\x11\x63om.google.iam.v3B\x16OperationMetadataProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb deleted file mode 100644 index efa28f12adb1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n,google/iam/v3/policy_binding_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xfb\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.google.iam.v3.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x06target\x18\x06 \x01(\x0b\x32#.google.iam.v3.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x41\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32\'.google.iam.v3.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x89\x01\n\x11\x63om.google.iam.v3B\x1bPolicyBindingResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb deleted file mode 100644 index 89b89d81de14..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/operations" -require "google/iam/v3/policy_bindings/client" -require "google/iam/v3/policy_bindings/rest" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/policy_bindings" - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb deleted file mode 100644 index cafa48df11dd..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb +++ /dev/null @@ -1,1157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/v3/policy_bindings_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PolicyBindings::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control 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::V3::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V3::PolicyBindings::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb deleted file mode 100644 index a3f91a0fb8fe..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb deleted file mode 100644 index c0c1fbc2d13c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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 Iam - module V3 - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb deleted file mode 100644 index cc9e0c46ea72..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb deleted file mode 100644 index 102093998bd5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/rest/operations" -require "google/iam/v3/policy_bindings/rest/client" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb deleted file mode 100644 index 5b8aac9f4ccf..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1072 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::V3::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb deleted file mode 100644 index 0856b3e5604d..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ba0446cdb560..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/policy_bindings_service_pb" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PolicyBinding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb deleted file mode 100644 index 15d4b16597d4..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_bindings_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n+google/iam/v3/policy_bindings_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xcd\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xa9\x01\n\x1aUpdatePolicyBindingRequest\x12\x39\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x1aListPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchTargetPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa0\x11\n\x0ePolicyBindings\x12\x8c\x03\n\x13\x43reatePolicyBinding\x12).google.iam.v3.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xd4\x01\"2/v3/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZI\"7/v3/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\x8d\x02\n\x10GetPolicyBinding\x12&.google.iam.v3.GetPolicyBindingRequest\x1a\x1c.google.iam.v3.PolicyBinding\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/policyBindings/*}Z3\x12\x31/v3/{name=folders/*/locations/*/policyBindings/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xac\x03\n\x13UpdatePolicyBinding\x12).google.iam.v3.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xca\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZR2@/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZX2F/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xc1\x02\n\x13\x44\x65letePolicyBinding\x12).google.iam.v3.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/locations/*/policyBindings/*}Z9*7/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xa0\x02\n\x12ListPolicyBindings\x12(.google.iam.v3.ListPolicyBindingsRequest\x1a).google.iam.v3.ListPolicyBindingsResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/policyBindingsZ3\x12\x31/v3/{parent=folders/*/locations/*}/policyBindingsZ9\x12\x37/v3/{parent=organizations/*/locations/*}/policyBindings\x12\x90\x03\n\x1aSearchTargetPolicyBindings\x12\x30.google.iam.v3.SearchTargetPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchTargetPolicyBindingsResponse\"\x8c\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\xf5\x01\x12M/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZN\x12L/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZT\x12R/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb4\x02\n\x11\x63om.google.iam.v3B\x1aPolicyBindingsServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb deleted file mode 100644 index dc8f9d8742f2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/policy_bindings_service_pb' - -module Google - module Iam - module V3 - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3::GetPolicyBindingRequest, ::Google::Iam::V3::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - rpc :UpdatePolicyBinding, ::Google::Iam::V3::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3::ListPolicyBindingsRequest, ::Google::Iam::V3::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb deleted file mode 100644 index 74a5371b0372..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/operations" -require "google/iam/v3/principal_access_boundary_policies/client" -require "google/iam/v3/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/principal_access_boundary_policies" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb deleted file mode 100644 index 48eb0922884c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3/principal_access_boundary_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index 84103a366146..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb deleted file mode 100644 index 9d3205859719..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb deleted file mode 100644 index d7fbd72948b5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb deleted file mode 100644 index 8e3308deab2f..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/rest/operations" -require "google/iam/v3/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index 0ee7f3632d2b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1017 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 7063c8a578e1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index f1c525adbc3a..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index 56f9951c56c1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/iam/v3/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a>google/iam/v3/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdb\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12[\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa5\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12X\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xec\x0e\n\x1fPrincipalAccessBoundaryPolicies\x12\xf7\x02\n#CreatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02l\"H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xe1\x01\n GetPrincipalAccessBoundaryPolicy\x12\x36.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest\x1a,.google.iam.v3.PrincipalAccessBoundaryPolicy\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xfa\x02\n#UpdatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x8d\x01\x32i/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x86\x02\n#DeletePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xf7\x01\n#ListPrincipalAccessBoundaryPolicies\x12\x39.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest\x1a:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xa2\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x41.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x42.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index 4b3c7a40557b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index 2a5009d8b3b2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12W\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32=.google.iam.v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x33.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x8e\x01\n$PrincipalAccessBoundaryPolicyDetails\x12\x44\n\x05rules\x18\x01 \x03(\x0b\x32\x30.google.iam.v3.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd0\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12L\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32\x37.google.iam.v3.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb deleted file mode 100644 index 05510520f427..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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/v3/access_policies/rest" -require "google/iam/v3/policy_bindings/rest" -require "google/iam/v3/principal_access_boundary_policies/rest" -require "google/iam/v3/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module V3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb deleted file mode 100644 index 9892bb2c28a6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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 V3 - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/README.md b/owl-bot-staging/google-iam-v3/proto_docs/README.md deleted file mode 100644 index 02d67f814ded..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) V3 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-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/iam/v3/access_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb deleted file mode 100644 index b3782521c647..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # Request message for CreateAccessPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] access_policy_id - # @return [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3::AccessPolicy] - # Required. The access policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateAccessPolicy method. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3::AccessPolicy] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListAccessPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListAccessPolicies method. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Iam::V3::AccessPolicy>] - # The access policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchAccessPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchAccessPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb deleted file mode 100644 index e48355d50330..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # An IAM access policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the access policy. - # - # The following formats are supported: - # - # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` - # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` - # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` - # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the access policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the access policy. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the access policy. Must be less than - # or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was most recently - # updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3::AccessPolicyDetails] - # Optional. The details for the access policy. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Access policy details. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3::AccessPolicyRule>] - # Required. A list of access policy rules. - class AccessPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Access Policy Rule that determines the behavior of the policy. - # @!attribute [rw] description - # @return [::String] - # Optional. Customer specified description of the rule. Must be less than or - # equal to 256 characters. - # @!attribute [rw] effect - # @return [::Google::Iam::V3::AccessPolicyRule::Effect] - # Required. The effect of the rule. - # @!attribute [rw] principals - # @return [::Array<::String>] - # Required. The identities for which this rule's effect governs using one or - # more permissions on Google Cloud resources. This field can contain the - # following values: - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # - # - # If an identifier that was previously set on a policy is soft deleted, then - # calls to read that policy will return the identifier with a deleted - # prefix. Users cannot set identifiers with this syntax. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. - # If the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # @!attribute [rw] excluded_principals - # @return [::Array<::String>] - # Optional. The identities that are excluded from the access policy rule, - # even if they are listed in the `principals`. For example, you could add a - # Google group to the `principals`, then exclude specific users who belong to - # that group. - # @!attribute [rw] operation - # @return [::Google::Iam::V3::AccessPolicyRule::Operation] - # Required. Attributes that are used to determine whether this rule applies - # to a request. - # @!attribute [rw] conditions - # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] - # Optional. The conditions that determine whether this rule applies to a - # request. Conditions are identified by their key, which is the FQDN of the - # service that they are relevant to. For example: - # - # ``` - # "conditions": { - # "iam.googleapis.com": { - # "expression": - # } - # } - # ``` - # - # Each rule is evaluated independently. If this rule does not apply - # to a request, other rules might still apply. - # Currently supported keys are as follows: - # - # - # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate - # resource fields. - # - # * `iam.googleapis.com`: Can use `CEL` functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and - # combine them using boolean and logical operators. Other functions and - # operators are not supported. - class AccessPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Attributes that are used to determine whether this rule applies to a - # request. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # Optional. The permissions that are explicitly affected by this rule. Each - # permission uses the format `{service_fqdn}/{resource}.{verb}`, where - # `{service_fqdn}` is the fully qualified domain name for the service. - # Currently supported permissions are as follows: - # - # * `eventarc.googleapis.com/messageBuses.publish`. - # @!attribute [rw] excluded_permissions - # @return [::Array<::String>] - # Optional. Specifies the permissions that this rule excludes from the set - # of affected permissions given by `permissions`. If a permission appears - # in `permissions` _and_ in `excluded_permissions` then it will _not_ be - # subject to the policy effect. - # - # The excluded permissions can be specified using the same syntax as - # `permissions`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Type::Expr] - class ConditionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An effect to describe the access relationship. - module Effect - # The effect is unspecified. - EFFECT_UNSPECIFIED = 0 - - # The policy will deny access if it evaluates to true. - DENY = 1 - - # The policy will grant access if it evaluates to true. - ALLOW = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb deleted file mode 100644 index 42ec222a1f98..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.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! - - -module Google - module Iam - module V3 - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb deleted file mode 100644 index 129656c0a2bd..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3::PolicyBinding::Target] - # Required. Immutable. The full resource name of the resource to which the - # policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are workspace, workforce pool, workload pool, - # service account, and agent identity. Allowed string must be one of: - # - # - `iam.googleapis.com/WorkspaceIdentity` - # - `iam.googleapis.com/WorkforcePoolIdentity` - # - `iam.googleapis.com/WorkloadPoolIdentity` - # - `iam.googleapis.com/ServiceAccount` - # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. The full resource name that's used for principal access - # boundary policy bindings. The principal set must be directly parented - # by the policy binding's parent or same as the parent if the target is a - # project, folder, or organization. - # - # Examples: - # - # * For bindings parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For bindings parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For bindings parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - # - # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # Immutable. The full resource name that's used for access policy - # bindings. - # - # Examples: - # - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # - # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Target - 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 - - # The different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - - # Access policy kind. - ACCESS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb deleted file mode 100644 index 57bd8a00aca7..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb deleted file mode 100644 index bd02495524b4..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.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 Iam - module V3 - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb deleted file mode 100644 index 40b6170b1a17..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.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 Iam - module V3 - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/snippets/Gemfile b/owl-bot-staging/google-iam-v3/snippets/Gemfile deleted file mode 100644 index 1ae54b711716..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3", path: "../" -else - gem "google-iam-v3" -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-v3/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb deleted file mode 100644 index ccba13dceefe..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the create_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreateAccessPolicyRequest.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb deleted file mode 100644 index 57f7195106d1..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the delete_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb deleted file mode 100644 index 8337285156bd..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the get_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Iam::V3::AccessPolicy. - p result -end -# [END iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb deleted file mode 100644 index a0b969343be2..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] -require "google/iam/v3" - -## -# Snippet for the list_access_policies call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::AccessPolicy. - p item - end -end -# [END iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb deleted file mode 100644 index 7ae560724f08..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_access_policy_bindings call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#search_access_policy_bindings. -# -def search_access_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - - # Call the search_access_policy_bindings method. - result = client.search_access_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb deleted file mode 100644 index 983d990c3afd..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the update_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index df4ee7219d1d..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 55f3efffd3e3..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 94c0c21f6316..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3::PolicyBinding. - p result -end -# [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 2dbb442b3771..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index 46f121f588f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 10cbd400a9ef..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index b4700ad72f99..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 85f48ef8c04a..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index ac50d60e307f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index b3c624c9b24f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index 7a39b0874454..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 0b6bc521c7f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json deleted file mode 100644 index 8bdcc14e1760..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3", - "version": "v3" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#create_access_policy.", - "file": "access_policies/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.CreateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#get_access_policy.", - "file": "access_policies/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::AccessPolicy", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.GetAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#update_access_policy.", - "file": "access_policies/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.UpdateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#delete_access_policy.", - "file": "access_policies/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.DeleteAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#list_access_policies.", - "file": "access_policies/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.iam.v3.AccessPolicies.ListAccessPolicies", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync", - "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings.", - "file": "access_policies/search_access_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_access_policy_bindings", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchAccessPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchAccessPolicyBindingsResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "SearchAccessPolicyBindings", - "full_name": "google.iam.v3.AccessPolicies.SearchAccessPolicyBindings", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3/test/google/iam/v3/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb deleted file mode 100644 index 838351043997..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_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/iam/v3/access_policies_service_pb" -require "google/iam/v3/access_policies_service_services_pb" -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb deleted file mode 100644 index 3d3d9f4eab12..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::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_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" - assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" - assert_equal "folders/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" - assert_equal "projects/value0/locations/value1/accessPolicies/value2", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb deleted file mode 100644 index b216679e69d9..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3/access_policies_service_pb" -require "google/iam/v3/access_policies/rest" - - -class ::Google::Iam::V3::AccessPolicies::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_access_policy - # Create test objects. - 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" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Iam::V3::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_policies - # Create test objects. - client_result = ::Google::Iam::V3::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_search_access_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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" - - search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3::AccessPolicies::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::V3::AccessPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb deleted file mode 100644 index 38eee57ac950..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb +++ /dev/null @@ -1,513 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/access_policies_service_pb" -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::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_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Iam::V3::CreateAccessPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["access_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Iam::V3::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Iam::V3::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Iam::V3::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Iam::V3::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_search_access_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_access_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::AccessPolicies::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::V3::AccessPolicies::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::V3::AccessPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::AccessPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb deleted file mode 100644 index e943464fa885..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings_service_services_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb deleted file mode 100644 index e21017f180db..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb deleted file mode 100644 index b5dc95e769d7..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest" - - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create test objects. - 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" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::ListPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::V3::PolicyBindings::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::V3::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb deleted file mode 100644 index 4b213c2a9bdc..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3::ListPolicyBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PolicyBindings::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::V3::PolicyBindings::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::V3::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index 0a55e6e6e754..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index 28fb979db795..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index 49521b2824c3..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb deleted file mode 100644 index 414ee9e0e6e3..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/helper.rb b/owl-bot-staging/google-iam-v3/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v3/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v3beta/.gitignore b/owl-bot-staging/google-iam-v3beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json deleted file mode 100644 index ef94dec23f48..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest", - "distribution_name": "google-iam-v3beta", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3BETA API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3beta/.rubocop.yml b/owl-bot-staging/google-iam-v3beta/.rubocop.yml deleted file mode 100644 index b142b763dfa7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v3beta.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-v3beta.rb" diff --git a/owl-bot-staging/google-iam-v3beta/.toys.rb b/owl-bot-staging/google-iam-v3beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.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-v3beta/.yardopts b/owl-bot-staging/google-iam-v3beta/.yardopts deleted file mode 100644 index 10df2b7003ed..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) V3BETA 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-v3beta/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md deleted file mode 100644 index c0ff8a06e810..000000000000 --- a/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v3beta 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-v3beta 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/v3beta" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3beta" - -::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta -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/v3beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta/CHANGELOG.md b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3beta/Gemfile b/owl-bot-staging/google-iam-v3beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3beta/LICENSE.md b/owl-bot-staging/google-iam-v3beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/README.md b/owl-bot-staging/google-iam-v3beta/README.md deleted file mode 100644 index 704ed8c7a1e5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3BETA API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Identity and Access Management (IAM) V3BETA API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v3beta -``` - -## 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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3beta" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new -request = ::Google::Iam::V3beta::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_access_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3beta" -require "logger" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-v3beta`. -_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-v3beta`. - -### 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-v3beta/Rakefile b/owl-bot-staging/google-iam-v3beta/Rakefile deleted file mode 100644 index 14994400cce6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta 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/v3beta/access_policies/credentials" - ::Google::Iam::V3beta::AccessPolicies::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-v3beta 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-v3beta 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-v3beta 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-v3beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3beta" - header "google-iam-v3beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3beta yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v3beta 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-v3beta 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-v3beta 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-v3beta/gapic_metadata.json b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json deleted file mode 100644 index 13391b62f322..000000000000 --- a/owl-bot-staging/google-iam-v3beta/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3beta", - "libraryPackage": "::Google::Iam::V3beta", - "services": { - "AccessPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::AccessPolicies::Client", - "rpcs": { - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "SearchAccessPolicyBindings": { - "methods": [ - "search_access_policy_bindings" - ] - } - } - } - } - }, - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec deleted file mode 100644 index 8665c0d463a7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3beta" - gem.version = Google::Iam::V3beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb deleted file mode 100644 index 462c76ed1789..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.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/v3beta" diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb deleted file mode 100644 index 890afcf2e734..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.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/v3beta/access_policies" -require "google/iam/v3beta/policy_bindings" -require "google/iam/v3beta/principal_access_boundary_policies" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module V3beta - end - end -end - -helper_path = ::File.join __dir__, "v3beta", "_helpers.rb" -require "google/iam/v3beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb deleted file mode 100644 index 20869cea6d21..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/version" - -require "google/iam/v3beta/access_policies/credentials" -require "google/iam/v3beta/access_policies/paths" -require "google/iam/v3beta/access_policies/operations" -require "google/iam/v3beta/access_policies/client" -require "google/iam/v3beta/access_policies/rest" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) access policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/access_policies" - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/access_policies/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module AccessPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "access_policies", "helpers.rb" -require "google/iam/v3beta/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb deleted file mode 100644 index 31f774afb06b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb +++ /dev/null @@ -1,1113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/access_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module AccessPolicies - ## - # Client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3beta::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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/v3beta/access_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::AccessPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3beta::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_policy&.name - header_params["access_policy.name"] = request.access_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. - # - # This class represents the configuration for AccessPolicies, - # providing control 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::V3beta::AccessPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb deleted file mode 100644 index c1cd49c60577..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module AccessPolicies - # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb deleted file mode 100644 index 975565993773..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/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 Iam - module V3beta - module AccessPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb deleted file mode 100644 index 84aeb6908123..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module AccessPolicies - # Path helper methods for the AccessPolicies API. - module Paths - ## - # Create a fully-qualified AccessPolicy resource string. - # - # @overload access_policy_path(organization:, location:, access_policy:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` - # - # @param organization [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(folder:, location:, access_policy:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` - # - # @param folder [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(project:, location:, access_policy:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` - # - # @param project [String] - # @param location [String] - # @param access_policy [String] - # - # @return [::String] - def access_policy_path **args - resources = { - "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:location:project" => (proc do |project:, location:, access_policy:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb deleted file mode 100644 index 38167d9c3b28..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v3beta/version" - -require "google/iam/v3beta/access_policies/credentials" -require "google/iam/v3beta/access_policies/paths" -require "google/iam/v3beta/access_policies/rest/operations" -require "google/iam/v3beta/access_policies/rest/client" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) access policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/access_policies/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module AccessPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb deleted file mode 100644 index d1cad6e25fbd..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb +++ /dev/null @@ -1,1028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module AccessPolicies - module Rest - ## - # REST client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3beta::AccessPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3beta::AccessPolicies::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::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 - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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::Iam::V3beta::AccessPolicies::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 - - @access_policies_stub = ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3beta::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.search_access_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. - # - # This class represents the configuration for AccessPolicies 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::V3beta::AccessPolicies::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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::AccessPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb deleted file mode 100644 index 32bb3c79773a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module AccessPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb deleted file mode 100644 index 932dd88668d4..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/access_policies_service_pb" - -module Google - module Iam - module V3beta - module AccessPolicies - module Rest - ## - # REST service stub for the AccessPolicies 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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::AccessPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.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_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchAccessPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_access_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] - # 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_access_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb deleted file mode 100644 index f20f2856a2e5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/access_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/access_policy_resources_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n/google/iam/v3beta/access_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/iam/v3beta/access_policy_resources.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xcc\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"t\n\x19UpdateAccessPolicyRequest\x12;\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"t\n\x1aListAccessPoliciesResponse\x12\x38\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3beta.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchAccessPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xbe\x11\n\x0e\x41\x63\x63\x65ssPolicies\x12\x94\x03\n\x12\x43reateAccessPolicy\x12,.google.iam.v3beta.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xdd\x01\"6/v3beta/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZF\"5/v3beta/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZL\";/v3beta/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x9e\x02\n\x0fGetAccessPolicy\x12).google.iam.v3beta.GetAccessPolicyRequest\x1a\x1f.google.iam.v3beta.AccessPolicy\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\x96\x03\n\x12UpdateAccessPolicy\x12,.google.iam.v3beta.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x87\x02\x32\x44/v3beta/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZT2C/v3beta/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZZ2I/v3beta/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xcf\x02\n\x12\x44\x65leteAccessPolicy\x12,.google.iam.v3beta.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7*5/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=*;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\xb4\x02\n\x12ListAccessPolicies\x12,.google.iam.v3beta.ListAccessPoliciesRequest\x1a-.google.iam.v3beta.ListAccessPoliciesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/accessPoliciesZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/accessPoliciesZ=\x12;/v3beta/{parent=organizations/*/locations/*}/accessPolicies\x12\x89\x03\n\x1aSearchAccessPolicyBindings\x12\x34.google.iam.v3beta.SearchAccessPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchAccessPolicyBindingsResponse\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v3beta/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZL\x12J/v3beta/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZM\x12K/v3beta/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x01\n\x15\x63om.google.iam.v3betaB\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreateAccessPolicyRequest").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeleteAccessPolicyRequest").msgclass - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesResponse").msgclass - SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsRequest").msgclass - SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb deleted file mode 100644 index fb03418341a3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/access_policies_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/access_policies_service_pb' - -module Google - module Iam - module V3beta - module AccessPolicies - # Manages Identity and Access Management (IAM) access policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.AccessPolicies' - - # Creates an access policy, and returns a long running operation. - rpc :CreateAccessPolicy, ::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Google::Longrunning::Operation - # Gets an access policy. - rpc :GetAccessPolicy, ::Google::Iam::V3beta::GetAccessPolicyRequest, ::Google::Iam::V3beta::AccessPolicy - # Updates an access policy. - rpc :UpdateAccessPolicy, ::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an access policy. - rpc :DeleteAccessPolicy, ::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists access policies. - rpc :ListAccessPolicies, ::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Google::Iam::V3beta::ListAccessPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchAccessPolicyBindings, ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb deleted file mode 100644 index 43366a70afff..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/access_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n/google/iam/v3beta/access_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb9\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12J\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x30.google.iam.v3beta.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32&.google.iam.v3beta.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"N\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x37\n\x05rules\x18\x01 \x03(\x0b\x32#.google.iam.v3beta.AccessPolicyRuleB\x03\xe0\x41\x02\"\xa9\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32*.google.iam.v3beta.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x45\n\toperation\x18\n \x01(\x0b\x32-.google.iam.v3beta.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12L\n\nconditions\x18\t \x03(\x0b\x32\x33.google.iam.v3beta.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x98\x01\n\x15\x63om.google.iam.v3betaB\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicy").msgclass - AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyDetails").msgclass - AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule").msgclass - AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Operation").msgclass - AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb deleted file mode 100644 index 84f3e0210548..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/iam/v3beta/operation_metadata.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x94\x01\n\x15\x63om.google.iam.v3betaB\x16OperationMetadataProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb deleted file mode 100644 index ec1093319476..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n0google/iam/v3beta/policy_binding_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x87\x08\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x31.google.iam.v3beta.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12?\n\x06target\x18\x06 \x01(\x0b\x32\'.google.iam.v3beta.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x45\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32+.google.iam.v3beta.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x99\x01\n\x15\x63om.google.iam.v3betaB\x1bPolicyBindingResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb deleted file mode 100644 index 8c10eab801a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/operations" -require "google/iam/v3beta/policy_bindings/client" -require "google/iam/v3beta/policy_bindings/rest" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/policy_bindings" - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3beta/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb deleted file mode 100644 index efd04847fb73..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb +++ /dev/null @@ -1,1157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/v3beta/policy_bindings_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PolicyBindings::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control 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::V3beta::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V3beta::PolicyBindings::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb deleted file mode 100644 index 8544d9e0da3c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb deleted file mode 100644 index 197b5f7d66e3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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 Iam - module V3beta - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb deleted file mode 100644 index b4c61be97d31..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb deleted file mode 100644 index 8d9da90d458b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/rest/operations" -require "google/iam/v3beta/policy_bindings/rest/client" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb deleted file mode 100644 index a05a7bfd27eb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1072 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::V3beta::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb deleted file mode 100644 index 256b9190eee3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ce126e354617..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/policy_bindings_service_pb" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PolicyBinding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb deleted file mode 100644 index 6c9513bee8e7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_bindings_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n/google/iam/v3beta/policy_bindings_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd1\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xad\x01\n\x1aUpdatePolicyBindingRequest\x12=\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x1aListPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchTargetPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x8c\x12\n\x0ePolicyBindings\x12\x9c\x03\n\x13\x43reatePolicyBinding\x12-.google.iam.v3beta.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xe0\x01\"6/v3beta/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZM\";/v3beta/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\xa1\x02\n\x10GetPolicyBinding\x12*.google.iam.v3beta.GetPolicyBindingRequest\x1a .google.iam.v3beta.PolicyBinding\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xbc\x03\n\x13UpdatePolicyBinding\x12-.google.iam.v3beta.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZV2D/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZ\\2J/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xd1\x02\n\x13\x44\x65letePolicyBinding\x12-.google.iam.v3beta.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xb4\x02\n\x12ListPolicyBindings\x12,.google.iam.v3beta.ListPolicyBindingsRequest\x1a-.google.iam.v3beta.ListPolicyBindingsResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/policyBindingsZ=\x12;/v3beta/{parent=organizations/*/locations/*}/policyBindings\x12\xa4\x03\n\x1aSearchTargetPolicyBindings\x12\x34.google.iam.v3beta.SearchTargetPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchTargetPolicyBindingsResponse\"\x98\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\x12P/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\x12V/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x02\n\x15\x63om.google.iam.v3betaB\x1aPolicyBindingsServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3beta\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb deleted file mode 100644 index 3261714f198e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/policy_bindings_service_pb' - -module Google - module Iam - module V3beta - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3beta::GetPolicyBindingRequest, ::Google::Iam::V3beta::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - rpc :UpdatePolicyBinding, ::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Google::Iam::V3beta::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb deleted file mode 100644 index 131df2f35581..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/operations" -require "google/iam/v3beta/principal_access_boundary_policies/client" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/principal_access_boundary_policies" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb deleted file mode 100644 index 5097171067eb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3beta/principal_access_boundary_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index faa2a134d021..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb deleted file mode 100644 index b253552560cb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb deleted file mode 100644 index 5c221ecd1178..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb deleted file mode 100644 index a46c2f64c9d5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/rest/operations" -require "google/iam/v3beta/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index 8e08e9ccc17f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1017 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 22c3e05a5278..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index e36e1d4e8f56..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index ee829930af81..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/iam/v3beta/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a\x42google/iam/v3beta/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa5\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdf\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12_\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa9\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12\\\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa8\x0f\n\x1fPrincipalAccessBoundaryPolicies\x12\xff\x02\n#CreatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02p\"L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xed\x01\n GetPrincipalAccessBoundaryPolicy\x12:.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest\x1a\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x82\x03\n#UpdatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xfc\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32m/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x8e\x02\n#DeletePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x83\x02\n#ListPrincipalAccessBoundaryPolicies\x12=.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest\x1a>.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xae\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x45.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x46.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index 3789b868b8e2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index aeddd8701494..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x37.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x92\x01\n$PrincipalAccessBoundaryPolicyDetails\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x34.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd4\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12P\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32;.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb deleted file mode 100644 index 99f3c20b6549..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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/v3beta/access_policies/rest" -require "google/iam/v3beta/policy_bindings/rest" -require "google/iam/v3beta/principal_access_boundary_policies/rest" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3beta/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module V3beta - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb deleted file mode 100644 index 738981bb3f21..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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 V3beta - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md deleted file mode 100644 index 536b687b8e98..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) V3BETA 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-v3beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb deleted file mode 100644 index a8350bf45f46..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # Request message for CreateAccessPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] access_policy_id - # @return [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3beta::AccessPolicy] - # Required. The access policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateAccessPolicy method. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3beta::AccessPolicy] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListAccessPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListAccessPolicies method. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Iam::V3beta::AccessPolicy>] - # The access policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchAccessPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchAccessPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb deleted file mode 100644 index cb77bb996aa9..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # An IAM access policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the access policy. - # - # The following formats are supported: - # - # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` - # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` - # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` - # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the access policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the access policy. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the access policy. Must be less than - # or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was most recently - # updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3beta::AccessPolicyDetails] - # Optional. The details for the access policy. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Access policy details. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3beta::AccessPolicyRule>] - # Required. A list of access policy rules. - class AccessPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Access Policy Rule that determines the behavior of the policy. - # @!attribute [rw] description - # @return [::String] - # Optional. Customer specified description of the rule. Must be less than or - # equal to 256 characters. - # @!attribute [rw] effect - # @return [::Google::Iam::V3beta::AccessPolicyRule::Effect] - # Required. The effect of the rule. - # @!attribute [rw] principals - # @return [::Array<::String>] - # Required. The identities for which this rule's effect governs using one or - # more permissions on Google Cloud resources. This field can contain the - # following values: - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # - # - # If an identifier that was previously set on a policy is soft deleted, then - # calls to read that policy will return the identifier with a deleted - # prefix. Users cannot set identifiers with this syntax. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. - # If the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # @!attribute [rw] excluded_principals - # @return [::Array<::String>] - # Optional. The identities that are excluded from the access policy rule, - # even if they are listed in the `principals`. For example, you could add a - # Google group to the `principals`, then exclude specific users who belong to - # that group. - # @!attribute [rw] operation - # @return [::Google::Iam::V3beta::AccessPolicyRule::Operation] - # Required. Attributes that are used to determine whether this rule applies - # to a request. - # @!attribute [rw] conditions - # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] - # Optional. The conditions that determine whether this rule applies to a - # request. Conditions are identified by their key, which is the FQDN of the - # service that they are relevant to. For example: - # - # ``` - # "conditions": { - # "iam.googleapis.com": { - # "expression": - # } - # } - # ``` - # - # Each rule is evaluated independently. If this rule does not apply - # to a request, other rules might still apply. - # Currently supported keys are as follows: - # - # - # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate - # resource fields. - # - # * `iam.googleapis.com`: Can use `CEL` functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and - # combine them using boolean and logical operators. Other functions and - # operators are not supported. - class AccessPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Attributes that are used to determine whether this rule applies to a - # request. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # Optional. The permissions that are explicitly affected by this rule. Each - # permission uses the format `{service_fqdn}/{resource}.{verb}`, where - # `{service_fqdn}` is the fully qualified domain name for the service. - # Currently supported permissions are as follows: - # - # * `eventarc.googleapis.com/messageBuses.publish`. - # @!attribute [rw] excluded_permissions - # @return [::Array<::String>] - # Optional. Specifies the permissions that this rule excludes from the set - # of affected permissions given by `permissions`. If a permission appears - # in `permissions` _and_ in `excluded_permissions` then it will _not_ be - # subject to the policy effect. - # - # The excluded permissions can be specified using the same syntax as - # `permissions`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Type::Expr] - class ConditionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An effect to describe the access relationship. - module Effect - # The effect is unspecified. - EFFECT_UNSPECIFIED = 0 - - # The policy will deny access if it evaluates to true. - DENY = 1 - - # The policy will grant access if it evaluates to true. - ALLOW = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb deleted file mode 100644 index 4e4463d9171f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.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! - - -module Google - module Iam - module V3beta - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb deleted file mode 100644 index c46446dc0080..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3beta::PolicyBinding::Target] - # Required. Immutable. The full resource name of the resource to which the - # policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3beta::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are workspace, workforce pool, workload pool, - # service account, and Agent Identity. Allowed string must be one of: - # - # - `iam.googleapis.com/WorkspaceIdentity` - # - `iam.googleapis.com/WorkforcePoolIdentity` - # - `iam.googleapis.com/WorkloadPoolIdentity` - # - `iam.googleapis.com/ServiceAccount` - # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. The full resource name that's used for principal access - # boundary policy bindings. The principal set must be directly parented - # by the policy binding's parent or same as the parent if the target is a - # project, folder, or organization. - # - # Examples: - # - # * For bindings parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For bindings parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For bindings parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - # - # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # Immutable. The full resource name that's used for access policy - # bindings. - # - # Examples: - # - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # - # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Target - 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 - - # The different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - - # Access policy kind. - ACCESS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb deleted file mode 100644 index 4ff232b4471d..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb deleted file mode 100644 index 565de307d98b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.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 Iam - module V3beta - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb deleted file mode 100644 index a01db22285ba..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.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 Iam - module V3beta - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/snippets/Gemfile b/owl-bot-staging/google-iam-v3beta/snippets/Gemfile deleted file mode 100644 index c2385cbb7f70..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta", path: "../" -else - gem "google-iam-v3beta" -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-v3beta/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb deleted file mode 100644 index 97be59c7632e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb deleted file mode 100644 index 39044451fe13..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb deleted file mode 100644 index dd29cbf9cc54..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Iam::V3beta::AccessPolicy. - p result -end -# [END iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb deleted file mode 100644 index 6ba1518a5a0f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_access_policies call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - p item - end -end -# [END iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb deleted file mode 100644 index 4e6b43897d7b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_access_policy_bindings call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#search_access_policy_bindings. -# -def search_access_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - - # Call the search_access_policy_bindings method. - result = client.search_access_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb deleted file mode 100644 index 72e82547181e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index 71d915589110..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 71f4b669183c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 95a37b3bd52d..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3beta::PolicyBinding. - p result -end -# [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 0f7e29a87412..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index f27b0677d25b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 135862214560..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index 5adbcf4dcc27..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 80a3f6830daa..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index a6c6b2d32724..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index 6d15a7805873..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index f55151327579..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 821e090ddea2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json deleted file mode 100644 index dbc2fd32da19..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3beta", - "version": "v3beta" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#create_access_policy.", - "file": "access_policies/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.CreateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#get_access_policy.", - "file": "access_policies/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::AccessPolicy", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.GetAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#update_access_policy.", - "file": "access_policies/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.UpdateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy.", - "file": "access_policies/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.DeleteAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#list_access_policies.", - "file": "access_policies/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies.ListAccessPolicies", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync", - "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings.", - "file": "access_policies/search_access_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_access_policy_bindings", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "SearchAccessPolicyBindings", - "full_name": "google.iam.v3beta.AccessPolicies.SearchAccessPolicyBindings", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb deleted file mode 100644 index da6a695d3c98..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_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/iam/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies_service_services_pb" -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb deleted file mode 100644 index 2e29e3248257..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" - assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" - assert_equal "folders/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" - assert_equal "projects/value0/locations/value1/accessPolicies/value2", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb deleted file mode 100644 index fb4d469ef29f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies/rest" - - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy - # Create test objects. - 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" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Iam::V3beta::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_policies - # Create test objects. - client_result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_search_access_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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" - - search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb deleted file mode 100644 index fdcebb4a7083..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb +++ /dev/null @@ -1,513 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Iam::V3beta::CreateAccessPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["access_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Iam::V3beta::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Iam::V3beta::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Iam::V3beta::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Iam::V3beta::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_search_access_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_access_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::AccessPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb deleted file mode 100644 index 83ecbb1d59e0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings_service_services_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb deleted file mode 100644 index 25795739b50c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb deleted file mode 100644 index eb4938bac615..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest" - - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create test objects. - 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" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3beta::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb deleted file mode 100644 index b9c3eb2c9954..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::ListPolicyBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index 6e46e310ad0b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index e7a89396ed57..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index 3eab77f7e378..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb deleted file mode 100644 index a1ff3c50bada..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/helper.rb b/owl-bot-staging/google-iam-v3beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json deleted file mode 100644 index b5b3f48e3f37..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "accesscontextmanager.googleapis.com", - "api_shortname": "accesscontextmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest", - "distribution_name": "google-identity-access_context_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "accesscontextmanager", - "name_pretty": "Access Context Manager V1 API", - "product_documentation": "https://cloud.google.com/access-context-manager/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/access-context-manager/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml deleted file mode 100644 index 15b11069b7b8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-identity-access_context_manager-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-identity-access_context_manager-v1.rb" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts deleted file mode 100644 index bba046b41e67..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Access Context Manager V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 3537ff875c7f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-identity-access_context_manager-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-identity-access_context_manager-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/identity/access_context_manager/v1" - -::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/identity/access_context_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1/CHANGELOG.md b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/README.md deleted file mode 100644 index 4aebfb1f2f0d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Access Context Manager V1 API - -An API for setting attribute based access control to requests to GCP services. - -Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Access Context Manager V1 API. Most users should consider using -the main client gem, -[google-identity-access_context_manager](https://rubygems.org/gems/google-identity-access_context_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-identity-access_context_manager-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new -request = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_access_policies request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/access-context-manager/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/identity/access_context_manager/v1" -require "logger" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-identity-access_context_manager`, -and lower-level _versioned_ client libraries with names such as -`google-identity-access_context_manager-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-identity-access_context_manager`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-identity-access_context_manager-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile deleted file mode 100644 index 4d845f513939..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-identity-access_context_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/identity/access_context_manager/v1/access_context_manager/credentials" - ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-identity-access_context_manager-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-identity-access_context_manager-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-identity-access_context_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-identity-access_context_manager-v1" - header "google-identity-access_context_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-identity-access_context_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-identity-access_context_manager-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-identity-access_context_manager-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-identity-access_context_manager-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json deleted file mode 100644 index a47b974d0dbf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.identity.accesscontextmanager.v1", - "libraryPackage": "::Google::Identity::AccessContextManager::V1", - "services": { - "AccessContextManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client", - "rpcs": { - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessLevels": { - "methods": [ - "list_access_levels" - ] - }, - "GetAccessLevel": { - "methods": [ - "get_access_level" - ] - }, - "CreateAccessLevel": { - "methods": [ - "create_access_level" - ] - }, - "UpdateAccessLevel": { - "methods": [ - "update_access_level" - ] - }, - "DeleteAccessLevel": { - "methods": [ - "delete_access_level" - ] - }, - "ReplaceAccessLevels": { - "methods": [ - "replace_access_levels" - ] - }, - "ListServicePerimeters": { - "methods": [ - "list_service_perimeters" - ] - }, - "GetServicePerimeter": { - "methods": [ - "get_service_perimeter" - ] - }, - "CreateServicePerimeter": { - "methods": [ - "create_service_perimeter" - ] - }, - "UpdateServicePerimeter": { - "methods": [ - "update_service_perimeter" - ] - }, - "DeleteServicePerimeter": { - "methods": [ - "delete_service_perimeter" - ] - }, - "ReplaceServicePerimeters": { - "methods": [ - "replace_service_perimeters" - ] - }, - "CommitServicePerimeters": { - "methods": [ - "commit_service_perimeters" - ] - }, - "ListGcpUserAccessBindings": { - "methods": [ - "list_gcp_user_access_bindings" - ] - }, - "GetGcpUserAccessBinding": { - "methods": [ - "get_gcp_user_access_binding" - ] - }, - "CreateGcpUserAccessBinding": { - "methods": [ - "create_gcp_user_access_binding" - ] - }, - "UpdateGcpUserAccessBinding": { - "methods": [ - "update_gcp_user_access_binding" - ] - }, - "DeleteGcpUserAccessBinding": { - "methods": [ - "delete_gcp_user_access_binding" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec deleted file mode 100644 index 159a0d47cef6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/identity/access_context_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-identity-access_context_manager-v1" - gem.version = Google::Identity::AccessContextManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details." - gem.summary = "An API for setting attribute based access control to requests to GCP services." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb deleted file mode 100644 index 5d4eaa9b5df6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/identity/access_context_manager/v1" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb deleted file mode 100644 index c51f7bf61440..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/identity/access_context_manager/v1/access_context_manager" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/identity/access_context_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb deleted file mode 100644 index 557344644e3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/operations" -require "google/identity/access_context_manager/v1/access_context_manager/client" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # @example Load this service and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1/access_context_manager" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "access_context_manager", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb deleted file mode 100644 index 3a8c8320a0f6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb +++ /dev/null @@ -1,3299 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - ## - # Client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Identity", "AccessContextManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccessContextManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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/identity/accesscontextmanager/v1/access_context_manager_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_context_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_context_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_levels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_level, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_level&.name - header_params["access_level.name"] = request.access_level.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_access_levels, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_service_perimeter, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_perimeter&.name - header_params["service_perimeter.name"] = request.service_perimeter.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :commit_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_gcp_user_access_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_gcp_user_access_binding, request, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.gcp_user_access_binding&.name - header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager API. - # - # This class represents the configuration for AccessContextManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb deleted file mode 100644 index 776e70b9d2b2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Credentials for the AccessContextManager 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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb deleted file mode 100644 index 1fdaf89aae95..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb deleted file mode 100644 index 11645e15c66f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Path helper methods for the AccessContextManager API. - module Paths - ## - # Create a fully-qualified AccessLevel resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/accessLevels/{access_level}` - # - # @param access_policy [String] - # @param access_level [String] - # - # @return [::String] - def access_level_path access_policy:, access_level: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/accessLevels/#{access_level}" - end - - ## - # Create a fully-qualified AccessPolicy resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}` - # - # @param access_policy [String] - # - # @return [::String] - def access_policy_path access_policy: - "accessPolicies/#{access_policy}" - end - - ## - # Create a fully-qualified GcpUserAccessBinding resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}` - # - # @param organization [String] - # @param gcp_user_access_binding [String] - # - # @return [::String] - def gcp_user_access_binding_path organization:, gcp_user_access_binding: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/gcpUserAccessBindings/#{gcp_user_access_binding}" - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified ServicePerimeter resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # - # @param access_policy [String] - # @param service_perimeter [String] - # - # @return [::String] - def service_perimeter_path access_policy:, service_perimeter: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/servicePerimeters/#{service_perimeter}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb deleted file mode 100644 index db852d4c1c3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/rest/operations" -require "google/identity/access_context_manager/v1/access_context_manager/rest/client" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # To load this service and instantiate a REST client: - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb deleted file mode 100644 index 3f2ec497d8d9..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb +++ /dev/null @@ -1,3090 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/service_stub" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccessContextManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::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 - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 - - @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_context_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_levels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, "access_levels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_level request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to an 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_access_levels request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_service_perimeters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, "service_perimeters", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_service_perimeter request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.commit_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_gcp_user_access_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, "gcp_user_access_bindings", request, result, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_gcp_user_access_binding request, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager REST API. - # - # This class represents the configuration for AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb deleted file mode 100644 index 484cf2ada2d9..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb deleted file mode 100644 index 2eba8ab83681..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb +++ /dev/null @@ -1,1693 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST service stub for the AccessContextManager 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_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.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_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # A result object deserialized from the server's reply - def list_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # A result object deserialized from the server's reply - def get_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessLevel.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_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # A result object deserialized from the server's reply - def list_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # A result object deserialized from the server's reply - def get_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def commit_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_commit_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "commit_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # A result object deserialized from the server's reply - def list_gcp_user_access_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gcp_user_access_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # A result object deserialized from the server's reply - def get_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.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_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/accessPolicies", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/accessPolicies", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/accessLevels", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # 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_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels", - body: "access_level", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{access_level.name}", - body: "access_level", - matches: [ - ["access_level.name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/servicePerimeters", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters", - body: "service_perimeter", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_perimeter.name}", - body: "service_perimeter", - matches: [ - ["service_perimeter.name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_commit_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:commit", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gcp_user_access_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # 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_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - body: "gcp_user_access_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{gcp_user_access_binding.name}", - body: "gcp_user_access_binding", - matches: [ - ["gcp_user_access_binding.name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb deleted file mode 100644 index b85e8d3b9a1c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager/rest" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/identity/access_context_manager/v1/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb deleted file mode 100644 index d2c2604fbcd6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb deleted file mode 100644 index 5b241ff87987..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/type/device_resources.proto - -require 'google/protobuf' - - -descriptor_data = "\n@google/identity/accesscontextmanager/type/device_resources.proto\x12)google.identity.accesscontextmanager.type*p\n\x16\x44\x65viceEncryptionStatus\x12\x1a\n\x16\x45NCRYPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NCRYPTION_UNSUPPORTED\x10\x01\x12\x0f\n\x0bUNENCRYPTED\x10\x02\x12\r\n\tENCRYPTED\x10\x03*\x82\x01\n\x06OsType\x12\x12\n\x0eOS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45SKTOP_MAC\x10\x01\x12\x13\n\x0f\x44\x45SKTOP_WINDOWS\x10\x02\x12\x11\n\rDESKTOP_LINUX\x10\x03\x12\x15\n\x11\x44\x45SKTOP_CHROME_OS\x10\x06\x12\x0b\n\x07\x41NDROID\x10\x04\x12\x07\n\x03IOS\x10\x05*V\n\x15\x44\x65viceManagementLevel\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\x42\x8d\x02\n-com.google.identity.accesscontextmanager.typeB\tTypeProtoP\x01ZHgoogle.golang.org/genproto/googleapis/identity/accesscontextmanager/type\xaa\x02)Google.Identity.AccessContextManager.Type\xca\x02)Google\\Identity\\AccessContextManager\\Type\xea\x02,Google::Identity::AccessContextManager::Typeb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module Type - DeviceEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceEncryptionStatus").enummodule - OsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.OsType").enummodule - DeviceManagementLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceManagementLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb deleted file mode 100644 index 73ed14280699..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/identity/accesscontextmanager/v1/access_level_pb' -require 'google/identity/accesscontextmanager/v1/access_policy_pb' -require 'google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb' -require 'google/identity/accesscontextmanager/v1/service_perimeter_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/identity/accesscontextmanager/v1/access_context_manager.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a\x45google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x8c\x01\n\x19ListAccessPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1aListAccessPoliciesResponse\x12N\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x16GetAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\x9d\x01\n\x19UpdateAccessPolicyRequest\x12J\n\x06policy\x18\x01 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x19\x44\x65leteAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\xdc\x01\n\x17ListAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x04 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\x80\x01\n\x18ListAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x15GetAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x02 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\xb4\x01\n\x18\x43reateAccessLevelRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x02 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\"\xa1\x01\n\x18UpdateAccessLevelRequest\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"a\n\x18\x44\x65leteAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\"\xc5\x01\n\x1aReplaceAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12P\n\raccess_levels\x18\x02 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"j\n\x1bReplaceAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\"\x93\x01\n\x1cListServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1dListServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1aGetServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xc8\x01\n\x1d\x43reateServicePerimeterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Y\n\x11service_perimeter\x18\x02 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateServicePerimeterRequest\x12Y\n\x11service_perimeter\x18\x01 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n\x1d\x44\x65leteServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xd9\x01\n\x1fReplaceServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Z\n\x12service_perimeters\x18\x02 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"y\n ReplaceServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"|\n\x1e\x43ommitServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"x\n\x1f\x43ommitServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"\x9d\x01\n ListGcpUserAccessBindingsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\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\"\x9d\x01\n!ListGcpUserAccessBindingsResponse\x12_\n\x18gcp_user_access_bindings\x18\x01 \x03(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x1eGetGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\xd2\x01\n!CreateGcpUserAccessBindingRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x63\n\x17gcp_user_access_binding\x18\x02 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\"\xbe\x01\n!UpdateGcpUserAccessBindingRequest\x12\x63\n\x17gcp_user_access_binding\x18\x01 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"s\n!DeleteGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\'\n%GcpUserAccessBindingOperationMetadata\"\'\n%AccessContextManagerOperationMetadata*D\n\x0bLevelFormat\x12\x1c\n\x18LEVEL_FORMAT_UNSPECIFIED\x10\x00\x12\x0e\n\nAS_DEFINED\x10\x01\x12\x07\n\x03\x43\x45L\x10\x02\x32\xf1\x32\n\x14\x41\x63\x63\x65ssContextManager\x12\xb9\x01\n\x12ListAccessPolicies\x12\x42.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest\x1a\x43.google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/accessPolicies\x12\xb5\x01\n\x0fGetAccessPolicy\x12?.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest\x1a\x35.google.identity.accesscontextmanager.v1.AccessPolicy\"*\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{name=accessPolicies/*}\x12\xc1\x01\n\x12\x43reateAccessPolicy\x12\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02\x17\"\x12/v1/accessPolicies:\x01*\x12\xf8\x01\n\x12UpdateAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02,2\"/v1/{policy.name=accessPolicies/*}:\x06policy\x12\xe4\x01\n\x12\x44\x65leteAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/{name=accessPolicies/*}\x12\xd4\x01\n\x10ListAccessLevels\x12@.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest\x1a\x41.google.identity.accesscontextmanager.v1.ListAccessLevelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=accessPolicies/*}/accessLevels\x12\xc1\x01\n\x0eGetAccessLevel\x12>.google.identity.accesscontextmanager.v1.GetAccessLevelRequest\x1a\x34.google.identity.accesscontextmanager.v1.AccessLevel\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=accessPolicies/*/accessLevels/*}\x12\x85\x02\n\x11\x43reateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x13parent,access_level\x82\xd3\xe4\x93\x02:\"*/v1/{parent=accessPolicies/*}/accessLevels:\x0c\x61\x63\x63\x65ss_level\x12\x97\x02\n\x11UpdateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x18\x61\x63\x63\x65ss_level,update_mask\x82\xd3\xe4\x93\x02G27/v1/{access_level.name=accessPolicies/*/accessLevels/*}:\x0c\x61\x63\x63\x65ss_level\x12\xf1\x01\n\x11\x44\x65leteAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=accessPolicies/*/accessLevels/*}\x12\x83\x02\n\x13ReplaceAccessLevels\x12\x43.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x44\n\x1bReplaceAccessLevelsResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{parent=accessPolicies/*}/accessLevels:replaceAll:\x01*\x12\xe8\x01\n\x15ListServicePerimeters\x12\x45.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest\x1a\x46.google.identity.accesscontextmanager.v1.ListServicePerimetersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=accessPolicies/*}/servicePerimeters\x12\xd5\x01\n\x13GetServicePerimeter\x12\x43.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest\x1a\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\xa3\x02\n\x16\x43reateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x18parent,service_perimeter\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accessPolicies/*}/servicePerimeters:\x11service_perimeter\x12\xba\x02\n\x16UpdateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x1dservice_perimeter,update_mask\x82\xd3\xe4\x93\x02V2A/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}:\x11service_perimeter\x12\x80\x02\n\x16\x44\x65leteServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\x97\x02\n\x18ReplaceServicePerimeters\x12H.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41I\n ReplaceServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll:\x01*\x12\x90\x02\n\x17\x43ommitServicePerimeters\x12G.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41H\n\x1f\x43ommitServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02;\"6/v1/{parent=accessPolicies/*}/servicePerimeters:commit:\x01*\x12\xf7\x01\n\x19ListGcpUserAccessBindings\x12I.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest\x1aJ.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*}/gcpUserAccessBindings\x12\xe4\x01\n\x17GetGcpUserAccessBinding\x12G.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest\x1a=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\xbe\x02\n\x1a\x43reateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x1eparent,gcp_user_access_binding\x82\xd3\xe4\x93\x02M\"2/v1/{parent=organizations/*}/gcpUserAccessBindings:\x17gcp_user_access_binding\x12\xdb\x02\n\x1aUpdateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41#gcp_user_access_binding,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}:\x17gcp_user_access_binding\x12\x8c\x02\n\x1a\x44\x65leteGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41>\n\x15google.protobuf.Empty\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\x82\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:setIamPolicy:\x01*\x12\x82\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:getIamPolicy:\x01*\x12\xbf\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd3\x01\x82\xd3\xe4\x93\x02\xcc\x01\"2/v1/{resource=accessPolicies/*}:testIamPermissions:\x01*ZF\"A/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions:\x01*ZK\"F/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions:\x01*\x1aW\xca\x41#accesscontextmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19\x41\x63\x63\x65ssContextManagerProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest").msgclass - ListAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsRequest").msgclass - ListAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsResponse").msgclass - GetAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessLevelRequest").msgclass - CreateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateAccessLevelRequest").msgclass - UpdateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest").msgclass - DeleteAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest").msgclass - ReplaceAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest").msgclass - ReplaceAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse").msgclass - ListServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersRequest").msgclass - ListServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersResponse").msgclass - GetServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetServicePerimeterRequest").msgclass - CreateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest").msgclass - UpdateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest").msgclass - DeleteServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest").msgclass - ReplaceServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest").msgclass - ReplaceServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse").msgclass - CommitServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest").msgclass - CommitServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse").msgclass - ListGcpUserAccessBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest").msgclass - ListGcpUserAccessBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse").msgclass - GetGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest").msgclass - CreateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest").msgclass - UpdateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest").msgclass - DeleteGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest").msgclass - GcpUserAccessBindingOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata").msgclass - AccessContextManagerOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata").msgclass - LevelFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.LevelFormat").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb deleted file mode 100644 index 5d40fe4c565a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb +++ /dev/null @@ -1,240 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.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/identity/accesscontextmanager/v1/access_context_manager_pb' - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.identity.accesscontextmanager.v1.AccessContextManager' - - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - rpc :ListAccessPolicies, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - rpc :GetAccessPolicy, ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Google::Identity::AccessContextManager::V1::AccessPolicy - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - rpc :CreateAccessPolicy, ::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Google::Longrunning::Operation - # Updates an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - rpc :UpdateAccessPolicy, ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - rpc :DeleteAccessPolicy, ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - rpc :ListAccessLevels, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - rpc :GetAccessLevel, ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Google::Identity::AccessContextManager::V1::AccessLevel - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :CreateAccessLevel, ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Google::Longrunning::Operation - # Updates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :UpdateAccessLevel, ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Google::Longrunning::Operation - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - rpc :DeleteAccessLevel, ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Google::Longrunning::Operation - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - rpc :ReplaceAccessLevels, ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Google::Longrunning::Operation - # Lists all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - rpc :ListServicePerimeters, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - rpc :GetServicePerimeter, ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Google::Identity::AccessContextManager::V1::ServicePerimeter - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :CreateServicePerimeter, ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Google::Longrunning::Operation - # Updates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :UpdateServicePerimeter, ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Google::Longrunning::Operation - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - rpc :DeleteServicePerimeter, ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Google::Longrunning::Operation - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - rpc :ReplaceServicePerimeters, ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Google::Longrunning::Operation - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - rpc :CommitServicePerimeters, ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Google::Longrunning::Operation - # Lists all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - rpc :ListGcpUserAccessBindings, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - rpc :GetGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding - # Creates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - rpc :CreateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - rpc :UpdateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Deletes a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - rpc :DeleteGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Sets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy], - # [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb deleted file mode 100644 index ead78b22f47d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_level.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/identity/accesscontextmanager/type/device_resources_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n:google/identity/accesscontextmanager/v1/access_level.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a@google/identity/accesscontextmanager/type/device_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xaa\x03\n\x0b\x41\x63\x63\x65ssLevel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x33.google.identity.accesscontextmanager.v1.BasicLevelH\x00\x12\x46\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.CustomLevelH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:p\xea\x41m\n/accesscontextmanager.googleapis.com/AccessLevel\x12:accessPolicies/{access_policy}/accessLevels/{access_level}B\x07\n\x05level\"\xef\x01\n\nBasicLevel\x12\x46\n\nconditions\x18\x01 \x03(\x0b\x32\x32.google.identity.accesscontextmanager.v1.Condition\x12j\n\x12\x63ombining_function\x18\x02 \x01(\x0e\x32N.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction\"-\n\x1a\x43onditionCombiningFunction\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x01\n\tCondition\x12\x16\n\x0eip_subnetworks\x18\x01 \x03(\t\x12L\n\rdevice_policy\x18\x02 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.DevicePolicy\x12\x1e\n\x16required_access_levels\x18\x03 \x03(\t\x12\x0e\n\x06negate\x18\x05 \x01(\x08\x12\x0f\n\x07members\x18\x06 \x03(\t\x12\x0f\n\x07regions\x18\x07 \x03(\t\".\n\x0b\x43ustomLevel\x12\x1f\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x11.google.type.Expr\"\x89\x03\n\x0c\x44\x65vicePolicy\x12\x1a\n\x12require_screenlock\x18\x01 \x01(\x08\x12\x66\n\x1b\x61llowed_encryption_statuses\x18\x02 \x03(\x0e\x32\x41.google.identity.accesscontextmanager.type.DeviceEncryptionStatus\x12M\n\x0eos_constraints\x18\x03 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.OsConstraint\x12j\n allowed_device_management_levels\x18\x06 \x03(\x0e\x32@.google.identity.accesscontextmanager.type.DeviceManagementLevel\x12\x1e\n\x16require_admin_approval\x18\x07 \x01(\x08\x12\x1a\n\x12require_corp_owned\x18\x08 \x01(\x08\"\x8f\x01\n\x0cOsConstraint\x12\x42\n\x07os_type\x18\x01 \x01(\x0e\x32\x31.google.identity.accesscontextmanager.type.OsType\x12\x17\n\x0fminimum_version\x18\x02 \x01(\t\x12\"\n\x1arequire_verified_chrome_os\x18\x03 \x01(\x08\x42\xa7\x02\n+com.google.identity.accesscontextmanager.v1B\x10\x41\x63\x63\x65ssLevelProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessLevel").msgclass - BasicLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel").msgclass - BasicLevel::ConditionCombiningFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction").enummodule - Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.Condition").msgclass - CustomLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CustomLevel").msgclass - DevicePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DevicePolicy").msgclass - OsConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.OsConstraint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb deleted file mode 100644 index 3a8fc38766be..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_policy.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n;google/identity/accesscontextmanager/v1/access_policy.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\x0c\x41\x63\x63\x65ssPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:U\xea\x41R\n0accesscontextmanager.googleapis.com/AccessPolicy\x12\x1e\x61\x63\x63\x65ssPolicies/{access_policy}B\xa2\x02\n+com.google.identity.accesscontextmanager.v1B\x0bPolicyProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb deleted file mode 100644 index ea5da3c0c0e1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\x14GcpUserAccessBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\tgroup_key\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12N\n\raccess_levels\x18\x03 \x03(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel:\x8c\x01\xea\x41\x88\x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorganizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAccessBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - GcpUserAccessBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBinding").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb deleted file mode 100644 index e57cf251b2a2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/service_perimeter.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/identity/accesscontextmanager/v1/service_perimeter.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x05\n\x10ServicePerimeter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12_\n\x0eperimeter_type\x18\x06 \x01(\x0e\x32G.google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType\x12O\n\x06status\x18\x07 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12M\n\x04spec\x18\x08 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12!\n\x19use_explicit_dry_run_spec\x18\t \x01(\x08\"F\n\rPerimeterType\x12\x1a\n\x16PERIMETER_TYPE_REGULAR\x10\x00\x12\x19\n\x15PERIMETER_TYPE_BRIDGE\x10\x01:\x7f\xea\x41|\n4accesscontextmanager.googleapis.com/ServicePerimeter\x12\x44\x61\x63\x63\x65ssPolicies/{access_policy}/servicePerimeters/{service_perimeter}\"\xb5\x0f\n\x16ServicePerimeterConfig\x12\x11\n\tresources\x18\x01 \x03(\t\x12\x15\n\raccess_levels\x18\x02 \x03(\t\x12\x1b\n\x13restricted_services\x18\x04 \x03(\t\x12v\n\x17vpc_accessible_services\x18\n \x01(\x0b\x32U.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices\x12g\n\x10ingress_policies\x18\x08 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy\x12\x65\n\x0f\x65gress_policies\x18\t \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\x1aM\n\x15VpcAccessibleServices\x12\x1a\n\x12\x65nable_restriction\x18\x01 \x01(\x08\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x1a@\n\x0eMethodSelector\x12\x10\n\x06method\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x8e\x01\n\x0c\x41piOperation\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12h\n\x10method_selectors\x18\x02 \x03(\x0b\x32N.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector\x1a\x45\n\rIngressSource\x12\x16\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\tH\x00\x12\x12\n\x08resource\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a\xe6\x01\n\x0bIngressFrom\x12^\n\x07sources\x18\x01 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource\x12\x12\n\nidentities\x18\x02 \x03(\t\x12\x63\n\ridentity_type\x18\x03 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x80\x01\n\tIngressTo\x12`\n\noperations\x18\x01 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x11\n\tresources\x18\x02 \x03(\t\x1a\xd1\x01\n\rIngressPolicy\x12\x61\n\x0cingress_from\x18\x01 \x01(\x0b\x32K.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom\x12]\n\ningress_to\x18\x02 \x01(\x0b\x32I.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo\x1a\x85\x01\n\nEgressFrom\x12\x12\n\nidentities\x18\x01 \x03(\t\x12\x63\n\ridentity_type\x18\x02 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x9b\x01\n\x08\x45gressTo\x12\x11\n\tresources\x18\x01 \x03(\t\x12`\n\noperations\x18\x02 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x1a\n\x12\x65xternal_resources\x18\x03 \x03(\t\x1a\xcc\x01\n\x0c\x45gressPolicy\x12_\n\x0b\x65gress_from\x18\x01 \x01(\x0b\x32J.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom\x12[\n\tegress_to\x18\x02 \x01(\x0b\x32H.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo\"n\n\x0cIdentityType\x12\x1d\n\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41NY_IDENTITY\x10\x01\x12\x14\n\x10\x41NY_USER_ACCOUNT\x10\x02\x12\x17\n\x13\x41NY_SERVICE_ACCOUNT\x10\x03\x42\xac\x02\n+com.google.identity.accesscontextmanager.v1B\x15ServicePerimeterProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ServicePerimeter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter").msgclass - ServicePerimeter::PerimeterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType").enummodule - ServicePerimeterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig").msgclass - ServicePerimeterConfig::VpcAccessibleServices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices").msgclass - ServicePerimeterConfig::MethodSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector").msgclass - ServicePerimeterConfig::ApiOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation").msgclass - ServicePerimeterConfig::IngressSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource").msgclass - ServicePerimeterConfig::IngressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom").msgclass - ServicePerimeterConfig::IngressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo").msgclass - ServicePerimeterConfig::IngressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy").msgclass - ServicePerimeterConfig::EgressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom").msgclass - ServicePerimeterConfig::EgressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo").msgclass - ServicePerimeterConfig::EgressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy").msgclass - ServicePerimeterConfig::IdentityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md deleted file mode 100644 index 6f796a729053..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Access Context Manager V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb deleted file mode 100644 index 98103f9a8eb2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module Type - # The encryption state of the device. - module DeviceEncryptionStatus - # The encryption status of the device is not specified or not known. - ENCRYPTION_UNSPECIFIED = 0 - - # The device does not support encryption. - ENCRYPTION_UNSUPPORTED = 1 - - # The device supports encryption, but is currently unencrypted. - UNENCRYPTED = 2 - - # The device is encrypted. - ENCRYPTED = 3 - end - - # The operating system type of the device. - # Next id: 7 - module OsType - # The operating system of the device is not specified or not known. - OS_UNSPECIFIED = 0 - - # A desktop Mac operating system. - DESKTOP_MAC = 1 - - # A desktop Windows operating system. - DESKTOP_WINDOWS = 2 - - # A desktop Linux operating system. - DESKTOP_LINUX = 3 - - # A desktop ChromeOS operating system. - DESKTOP_CHROME_OS = 6 - - # An Android operating system. - ANDROID = 4 - - # An iOS operating system. - IOS = 5 - end - - # The degree to which the device is managed by the Cloud organization. - module DeviceManagementLevel - # The device's management level is not specified or not known. - MANAGEMENT_UNSPECIFIED = 0 - - # The device is not managed. - NONE = 1 - - # Basic management is enabled, which is generally limited to monitoring and - # wiping the corporate account. - BASIC = 2 - - # Complete device management. This includes more thorough monitoring and the - # ability to directly manage the device (such as remote wiping). This can be - # enabled through the Android Enterprise Platform. - COMPLETE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb deleted file mode 100644 index 0a4ef8552281..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb +++ /dev/null @@ -1,539 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # A request to list all `AccessPolicies` for a container. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessPoliciesRequest`. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # List of the AccessPolicy instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessPolicy`. - # @!attribute [rw] policy - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # Required. The updated AccessPolicy. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `AccessLevels` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - class ListAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessLevelsRequest`. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - class GetAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create an `AccessLevel`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - class CreateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessLevel`. - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - class DeleteAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Access Levels in an Access Policy with - # the Access Levels provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceAccessLevelsRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - class ReplaceAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `ServicePerimeters` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - class ListServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListServicePerimetersRequest`. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - class GetServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a `ServicePerimeter`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - class CreateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a `ServicePerimeter`. - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - class DeleteServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Service Perimeters in an Access Policy - # with the Service Perimeters provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - class ReplaceServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to commit dry-run specs in all [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to - # an {::Google::Identity::AccessContextManager::V1::AccessPolicy Access Policy}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class CommitServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to CommitServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of all the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in - # the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - class CommitServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - class ListGcpUserAccessBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] gcp_user_access_bindings - # @return [::Array<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] next_page_token - # @return [::String] - # Token to get the next page of items. If blank, there are no more items. - class ListGcpUserAccessBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [GetGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class GetGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [CreateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - class CreateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [UpdateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding]. - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - class UpdateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [DeleteGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class DeleteGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Currently, a completed operation means nothing. In the future, this metadata - # and a completed operation may indicate that the binding has taken effect and - # is affecting access decisions for all users. - class GcpUserAccessBindingOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of Access Context Manager's Long Running Operations. - class AccessContextManagerOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The format used in an `AccessLevel`. - module LevelFormat - # The format was not specified. - LEVEL_FORMAT_UNSPECIFIED = 0 - - # Uses the format the resource was defined in. BasicLevels are returned as - # BasicLevels, CustomLevels are returned as CustomLevels. - AS_DEFINED = 1 - - # Use Cloud Common Expression Language when returning the resource. Both - # BasicLevels and CustomLevels are returned as CustomLevels. - CEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb deleted file mode 100644 index 263cc28aa3d0..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # An `AccessLevel` is a label that can be applied to requests to Google Cloud - # services, along with a list of requirements necessary for the label to be - # applied. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the Access Level. The `short_name` component - # must begin with a letter and only include alphanumeric and '_'. Format: - # `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum - # length of the `access_level` component is 50 characters. - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `AccessLevel` and its use. Does not affect behavior. - # @!attribute [rw] basic - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel] - # A `BasicLevel` composed of `Conditions`. - # - # Note: The following fields are mutually exclusive: `basic`, `custom`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom - # @return [::Google::Identity::AccessContextManager::V1::CustomLevel] - # A `CustomLevel` written in the Common Expression Language. - # - # Note: The following fields are mutually exclusive: `custom`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was updated in UTC. - class AccessLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BasicLevel` is an `AccessLevel` using a set of recommended features. - # @!attribute [rw] conditions - # @return [::Array<::Google::Identity::AccessContextManager::V1::Condition>] - # Required. A list of requirements for the `AccessLevel` to be granted. - # @!attribute [rw] combining_function - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel::ConditionCombiningFunction] - # How the `conditions` list should be combined to determine if a request is - # granted this `AccessLevel`. If AND is used, each `Condition` in - # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR - # is used, at least one `Condition` in `conditions` must be satisfied for the - # `AccessLevel` to be applied. Default behavior is AND. - class BasicLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for how the `conditions` list should be combined to determine if - # this `AccessLevel` is applied. Default is AND. - module ConditionCombiningFunction - # All `Conditions` must be true for the `BasicLevel` to be true. - AND = 0 - - # If at least one `Condition` is true, then the `BasicLevel` is true. - OR = 1 - end - end - - # A condition necessary for an `AccessLevel` to be granted. The Condition is an - # AND over its fields. So a Condition is true if: 1) the request IP is from one - # of the listed subnetworks AND 2) the originating device complies with the - # listed device policy AND 3) all listed access levels are granted AND 4) the - # request was sent at a time allowed by the DateTimeRestriction. - # @!attribute [rw] ip_subnetworks - # @return [::Array<::String>] - # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for - # a CIDR IP address block, the specified IP address portion must be properly - # truncated (i.e. all the host bits must be zero) or the input is considered - # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is - # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas - # "2001:db8::1/32" is not. The originating IP of a request must be in one of - # the listed subnets in order for this Condition to be true. If empty, all IP - # addresses are allowed. - # @!attribute [rw] device_policy - # @return [::Google::Identity::AccessContextManager::V1::DevicePolicy] - # Device specific restrictions, all restrictions must hold for the - # Condition to be true. If not specified, all devices are allowed. - # @!attribute [rw] required_access_levels - # @return [::Array<::String>] - # A list of other access levels defined in the same `Policy`, referenced by - # resource name. Referencing an `AccessLevel` which does not exist is an - # error. All access levels listed must be granted for the Condition - # to be true. Example: - # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` - # @!attribute [rw] negate - # @return [::Boolean] - # Whether to negate the Condition. If true, the Condition becomes a NAND over - # its non-empty fields, each field must be false for the Condition overall to - # be satisfied. Defaults to false. - # @!attribute [rw] members - # @return [::Array<::String>] - # The request must be made by one of the provided user or service - # accounts. Groups are not supported. - # Syntax: - # `user:{emailid}` - # `serviceAccount:{emailid}` - # If not specified, a request may come from any user. - # @!attribute [rw] regions - # @return [::Array<::String>] - # The request must originate from one of the provided countries/regions. - # Must be valid ISO 3166-1 alpha-2 codes. - class Condition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language - # to represent the necessary conditions for the level to apply to a request. - # See CEL spec at: https://github.com/google/cel-spec - # @!attribute [rw] expr - # @return [::Google::Type::Expr] - # Required. A Cloud CEL expression evaluating to a boolean. - class CustomLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `DevicePolicy` specifies device specific restrictions necessary to acquire a - # given access level. A `DevicePolicy` specifies requirements for requests from - # devices to be granted access levels, it does not do any enforcement on the - # device. `DevicePolicy` acts as an AND over all specified fields, and each - # repeated field is an OR over its elements. Any unset fields are ignored. For - # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : - # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be - # true for requests originating from encrypted Linux desktops and encrypted - # Windows desktops. - # @!attribute [rw] require_screenlock - # @return [::Boolean] - # Whether or not screenlock is required for the DevicePolicy to be true. - # Defaults to `false`. - # @!attribute [rw] allowed_encryption_statuses - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>] - # Allowed encryptions statuses, an empty list allows all statuses. - # @!attribute [rw] os_constraints - # @return [::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>] - # Allowed OS versions, an empty list allows all types and all versions. - # @!attribute [rw] allowed_device_management_levels - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>] - # Allowed device management levels, an empty list allows all management - # levels. - # @!attribute [rw] require_admin_approval - # @return [::Boolean] - # Whether the device needs to be approved by the customer admin. - # @!attribute [rw] require_corp_owned - # @return [::Boolean] - # Whether the device needs to be corp owned. - class DevicePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A restriction on the OS type and version of devices making requests. - # @!attribute [rw] os_type - # @return [::Google::Identity::AccessContextManager::Type::OsType] - # Required. The allowed OS type. - # @!attribute [rw] minimum_version - # @return [::String] - # The minimum allowed OS version. If not set, any version of this OS - # satisfies the constraint. Format: `"major.minor.patch"`. - # Examples: `"10.5.301"`, `"9.2.1"`. - # @!attribute [rw] require_verified_chrome_os - # @return [::Boolean] - # Only allows requests from devices with a verified Chrome OS. - # Verifications includes requirements that the device is enterprise-managed, - # conformant to domain policies, and the caller has permission to call - # the API targeted by the request. - class OsConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb deleted file mode 100644 index b034d49fe22d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `AccessPolicy` is a container for `AccessLevels` (which define the necessary - # attributes to use Google Cloud services) and `ServicePerimeters` (which - # define regions of services able to freely pass data within a perimeter). An - # access policy is globally visible within an organization, and the - # restrictions it specifies apply to all projects within an organization. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @!attribute [rw] title - # @return [::String] - # Required. Human readable title. Does not affect behavior. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @!attribute [rw] etag - # @return [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb deleted file mode 100644 index bbd9b110d43b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.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! - - -module Google - module Identity - module AccessContextManager - module V1 - # Restricts access to Cloud Console and Google Cloud APIs for a set of users - # using Context-Aware Access. - # @!attribute [rw] name - # @return [::String] - # Immutable. Assigned by the server during creation. The last segment has an arbitrary - # length and has only URI unreserved characters (as defined by - # [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). - # Should not be specified by the client during creation. - # Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @!attribute [rw] group_key - # @return [::String] - # Required. Immutable. Google Group id whose members are subject to this binding's restrictions. - # See "id" in the [G Suite Directory API's Groups resource] - # (https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource). - # If a group's email address/alias is changed, this resource will continue - # to point at the changed group. This field does not accept group email - # addresses or aliases. - # Example: "01d520gv4vjcrht" - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # Required. Access level that a user must have to be granted access. Only one access - # level is supported, not multiple. This repeated field must have exactly - # one element. - # Example: "accessPolicies/9522/accessLevels/device_trusted" - class GcpUserAccessBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb deleted file mode 100644 index be4e39e46ef2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +++ /dev/null @@ -1,500 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `ServicePerimeter` describes a set of Google Cloud resources which can freely - # import and export data amongst themselves, but not export outside of the - # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` - # has a target outside of the `ServicePerimeter`, the request will be blocked. - # Otherwise the request is allowed. There are two types of Service Perimeter - - # Regular and Bridge. Regular Service Perimeters cannot overlap, a single - # Google Cloud project can only belong to a single regular Service Perimeter. - # Service Perimeter Bridges can contain only Google Cloud projects as members, - # a single Google Cloud project may belong to multiple Service Perimeter - # Bridges. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the ServicePerimeter. The `short_name` - # component must begin with a letter and only include alphanumeric and '_'. - # Format: - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `ServicePerimeter` and its use. Does not affect - # behavior. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was updated in UTC. - # @!attribute [rw] perimeter_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter::PerimeterType] - # Perimeter type indicator. A single project is - # allowed to be a member of single regular perimeter, but multiple service - # perimeter bridges. A project cannot be a included in a perimeter bridge - # without being included in regular perimeter. For perimeter bridges, - # the restricted service list as well as access level lists must be - # empty. - # @!attribute [rw] status - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Current ServicePerimeter configuration. Specifies sets of resources, - # restricted services and access levels that determine perimeter - # content and boundaries. - # @!attribute [rw] spec - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Proposed (or dry run) ServicePerimeter configuration. This configuration - # allows to specify and test ServicePerimeter configuration without enforcing - # actual access restrictions. Only allowed to be set when the - # "use_explicit_dry_run_spec" flag is set. - # @!attribute [rw] use_explicit_dry_run_spec - # @return [::Boolean] - # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly - # exists for all Service Perimeters, and that spec is identical to the - # status for those Service Perimeters. When this flag is set, it inhibits the - # generation of the implicit spec, thereby allowing the user to explicitly - # provide a configuration ("spec") to use in a dry-run version of the Service - # Perimeter. This allows the user to test changes to the enforced config - # ("status") without actually enforcing them. This testing is done through - # analyzing the differences between currently enforced and suggested - # restrictions. use_explicit_dry_run_spec must bet set to True if any of the - # fields in the spec are set to non-default values. - class ServicePerimeter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the type of the Perimeter. There are two types: regular and - # bridge. Regular Service Perimeter contains resources, access levels, and - # restricted services. Every resource can be in at most ONE - # regular Service Perimeter. - # - # In addition to being in a regular service perimeter, a resource can also - # be in zero or more perimeter bridges. A perimeter bridge only contains - # resources. Cross project operations are permitted if all effected - # resources share some perimeter (whether bridge or regular). Perimeter - # Bridge does not contain access levels or services: those are governed - # entirely by the regular perimeter that resource is in. - # - # Perimeter Bridges are typically useful when building more complex toplogies - # with many independent perimeters that need to share some data with a common - # perimeter, but should not be able to share data among themselves. - module PerimeterType - # Regular Perimeter. - PERIMETER_TYPE_REGULAR = 0 - - # Perimeter Bridge. - PERIMETER_TYPE_BRIDGE = 1 - end - end - - # `ServicePerimeterConfig` specifies a set of Google Cloud resources that - # describe specific Service Perimeter configuration. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of Google Cloud resources that are inside of the service perimeter. - # Currently only projects are allowed. Format: `projects/{project_number}` - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # A list of `AccessLevel` resource names that allow resources within the - # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed - # must be in the same policy as this `ServicePerimeter`. Referencing a - # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. - # For Service Perimeter Bridge, must be empty. - # @!attribute [rw] restricted_services - # @return [::Array<::String>] - # Google Cloud services that are subject to the Service Perimeter - # restrictions. For example, if `storage.googleapis.com` is specified, access - # to the storage buckets inside the perimeter must meet the perimeter's - # access restrictions. - # @!attribute [rw] vpc_accessible_services - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::VpcAccessibleServices] - # Configuration for APIs allowed within Perimeter. - # @!attribute [rw] ingress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressPolicy>] - # List of [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply to the perimeter. A perimeter may have multiple [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy], - # each of which is evaluated separately. Access is granted if any [Ingress - # Policy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # grants it. Must be empty for a perimeter bridge. - # @!attribute [rw] egress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressPolicy>] - # List of [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply to the perimeter. A perimeter may have multiple [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy], - # each of which is evaluated separately. Access is granted if any - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # grants it. Must be empty for a perimeter bridge. - class ServicePerimeterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how APIs are allowed to communicate within the Service - # Perimeter. - # @!attribute [rw] enable_restriction - # @return [::Boolean] - # Whether to restrict API calls within the Service Perimeter to the list of - # APIs specified in 'allowed_services'. - # @!attribute [rw] allowed_services - # @return [::Array<::String>] - # The list of APIs usable within the Service Perimeter. Must be empty - # unless 'enable_restriction' is True. You can specify a list of individual - # services, as well as include the 'RESTRICTED-SERVICES' value, which - # automatically includes all of the services protected by the perimeter. - class VpcAccessibleServices - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An allowed method or permission of a service specified in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # @!attribute [rw] method - # @return [::String] - # Value for `method` should be a valid method name for the corresponding - # `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # If `*` used as value for `method`, then ALL methods and permissions are - # allowed. - # - # Note: The following fields are mutually exclusive: `method`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permission - # @return [::String] - # Value for `permission` should be a valid Cloud IAM permission for the - # corresponding `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # - # Note: The following fields are mutually exclusive: `permission`, `method`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MethodSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identification for an API Operation. - # @!attribute [rw] service_name - # @return [::String] - # The name of the API whose methods or permissions the [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # or [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # want to allow. A single [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # with `service_name` field set to `*` will allow all methods AND - # permissions for all services. - # @!attribute [rw] method_selectors - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::MethodSelector>] - # API methods or permissions to allow. Method or permission must belong to - # the service specified by `service_name` field. A single [MethodSelector] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector] - # entry with `*` specified for the `method` field will allow all methods - # AND permissions for the service specified in `service_name`. - class ApiOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The source that [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] access_level - # @return [::String] - # An [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] resource - # name that allow resources within the [ServicePerimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to be - # accessed from the internet. [AccessLevels] - # [google.identity.accesscontextmanager.v1.AccessLevel] listed must - # be in the same policy as this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # Referencing a nonexistent [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] will cause - # an error. If no [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is - # specified for `access_level`, then all [IngressSources] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource] - # will be allowed. - # - # Note: The following fields are mutually exclusive: `access_level`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # A Google Cloud resource that is allowed to ingress the perimeter. - # Requests from these resources will be allowed to access perimeter data. - # Currently only projects are allowed. - # Format: `projects/{project_number}` - # The project may be in any Google Cloud organization, not just the - # organization that the perimeter is defined in. `*` is not allowed, the - # case of allowing all Google Cloud resources only is not supported. - # - # Note: The following fields are mutually exclusive: `resource`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class IngressSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the source of - # the request. The request must satisfy what is defined in `sources` AND - # identity related fields in order to match. - # @!attribute [rw] sources - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressSource>] - # Sources that this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this ingress - # policy. Should be in the format of email address. The email address - # should represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access from outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class IngressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the target resource of the request. The request - # must satisfy what is defined in `operations` AND `resources` in order to - # match. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # in this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, protected by this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that are - # allowed to be accessed by sources defined in the corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]. - # If a single `*` is specified, then access to all resources inside the - # perimeter are allowed. - class IngressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for ingress into [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # match requests based on `ingress_from` and `ingress_to` stanzas. For an - # ingress policy to match, both the `ingress_from` and `ingress_to` stanzas - # must be matched. If an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request, the request is allowed through the perimeter boundary - # from outside the perimeter. - # - # For example, access from the internet can be allowed either - # based on an [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] or, for traffic - # hosted on Google Cloud, the project of the source network. For access from - # private networks, using the project of the hosting network is required. - # - # Individual ingress policies can be limited by restricting which - # services and/or actions they match using the `ingress_to` field. - # @!attribute [rw] ingress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressFrom] - # Defines the conditions on the source of a request causing this - # [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - # @!attribute [rw] ingress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and request destination that cause this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - class IngressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions based on information about the source of the - # request. Note that if the destination of the request is also protected by a - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this [EgressPolicy]. - # Should be in the format of email address. The email address should - # represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access to outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class EgressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the `resources` specified. Note that if the - # destination of the request is also protected by a [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. The request must - # match `operations` AND `resources` fields in order to be allowed egress out - # of the perimeter. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, that are allowed to be accessed by sources - # defined in the corresponding [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it contains a resource in this list. If `*` is - # specified for `resources`, then this [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo] - # rule will authorize access to all resources outside the perimeter. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in the corresponding - # [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it uses an operation/service in this list. - # @!attribute [rw] external_resources - # @return [::Array<::String>] - # A list of external resources that are allowed to be accessed. Only AWS - # and Azure resources are supported. For Amazon S3, the supported format is - # s3://BUCKET_NAME. For Azure Storage, the supported format is - # azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches - # if it contains an external resource in this list (Example: - # s3://bucket/path). Currently '*' is not allowed. - class EgressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for egress from perimeter. - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # match requests based on `egress_from` and `egress_to` stanzas. For an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to match, both `egress_from` and `egress_to` stanzas must be matched. If an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request, the request is allowed to span the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] boundary. - # For example, an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # can be used to allow VMs on networks within the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to access a - # defined set of projects outside the perimeter in certain contexts (e.g. to - # read data from a Cloud Storage bucket or query against a BigQuery dataset). - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # are concerned with the *resources* that a request relates as well as the - # API services and API actions being used. They do not related to the - # direction of data movement. More detailed documentation for this concept - # can be found in the descriptions of [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # and [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo]. - # @!attribute [rw] egress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressFrom] - # Defines conditions on the source of a request causing this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - # @!attribute [rw] egress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and destination resources that cause this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - class EgressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the types of identities that are allowed access in either - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # or [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # rules. - module IdentityType - # No blanket identity group specified. - IDENTITY_TYPE_UNSPECIFIED = 0 - - # Authorize access from all identities outside the perimeter. - ANY_IDENTITY = 1 - - # Authorize access from all human users outside the perimeter. - ANY_USER_ACCOUNT = 2 - - # Authorize access from all service accounts outside the perimeter. - ANY_SERVICE_ACCOUNT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile deleted file mode 100644 index 7c4756c28a3a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-identity-access_context_manager-v1", path: "../" -else - gem "google-identity-access_context_manager-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb deleted file mode 100644 index 8df7e306a7f2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the commit_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters. -# -def commit_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - - # Call the commit_service_perimeters method. - result = client.commit_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb deleted file mode 100644 index 7ad25cd17d4d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level. -# -def create_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - - # Call the create_access_level method. - result = client.create_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb deleted file mode 100644 index a9f9d7289673..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb deleted file mode 100644 index f1020626f742..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding. -# -def create_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - - # Call the create_gcp_user_access_binding method. - result = client.create_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb deleted file mode 100644 index 412e217d7849..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter. -# -def create_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - - # Call the create_service_perimeter method. - result = client.create_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb deleted file mode 100644 index 00c5232fc6d1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level. -# -def delete_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - - # Call the delete_access_level method. - result = client.delete_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb deleted file mode 100644 index eee4a031ae6e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb deleted file mode 100644 index dd965cf499c5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding. -# -def delete_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - - # Call the delete_gcp_user_access_binding method. - result = client.delete_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb deleted file mode 100644 index 983eda52bacc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter. -# -def delete_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - - # Call the delete_service_perimeter method. - result = client.delete_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb deleted file mode 100644 index 0597699fa439..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level. -# -def get_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - - # Call the get_access_level method. - result = client.get_access_level request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb deleted file mode 100644 index 0531cf3580ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb deleted file mode 100644 index d732c416d5c8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding. -# -def get_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - - # Call the get_gcp_user_access_binding method. - result = client.get_gcp_user_access_binding request - - # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb deleted file mode 100644 index b134f682cf0c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb deleted file mode 100644 index fd5e1db7b14d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter. -# -def get_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - - # Call the get_service_perimeter method. - result = client.get_service_perimeter request - - # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb deleted file mode 100644 index a5bf8a3cae59..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels. -# -def list_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - - # Call the list_access_levels method. - result = client.list_access_levels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb deleted file mode 100644 index 8244d0f6948b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_policies call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb deleted file mode 100644 index 933198ef288d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings. -# -def list_gcp_user_access_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - - # Call the list_gcp_user_access_bindings method. - result = client.list_gcp_user_access_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb deleted file mode 100644 index 7e6aab1e29ef..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters. -# -def list_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - - # Call the list_service_perimeters method. - result = client.list_service_perimeters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb deleted file mode 100644 index 8c5a3d228fae..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels. -# -def replace_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - - # Call the replace_access_levels method. - result = client.replace_access_levels request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb deleted file mode 100644 index 0bb1d425f50d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters. -# -def replace_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - - # Call the replace_service_perimeters method. - result = client.replace_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb deleted file mode 100644 index 47743b7f9b84..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the set_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb deleted file mode 100644 index 780f1b93ba1a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the test_iam_permissions call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb deleted file mode 100644 index 0c0f947da7b7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level. -# -def update_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - - # Call the update_access_level method. - result = client.update_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb deleted file mode 100644 index a29a2622b29f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb deleted file mode 100644 index 48d03cc216bc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding. -# -def update_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - - # Call the update_gcp_user_access_binding method. - result = client.update_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb deleted file mode 100644 index a751242211b5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter. -# -def update_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - - # Call the update_service_perimeter method. - result = client.update_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json deleted file mode 100644 index f5838dcb8ff7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-identity-access_context_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.identity.accesscontextmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies.", - "file": "access_context_manager/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessPolicies", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy.", - "file": "access_context_manager/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy.", - "file": "access_context_manager/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy.", - "file": "access_context_manager/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy.", - "file": "access_context_manager/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync", - "title": "Snippet for the list_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels.", - "file": "access_context_manager/list_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync", - "title": "Snippet for the get_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level.", - "file": "access_context_manager/get_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessLevel", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync", - "title": "Snippet for the create_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level.", - "file": "access_context_manager/create_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync", - "title": "Snippet for the update_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level.", - "file": "access_context_manager/update_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync", - "title": "Snippet for the delete_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level.", - "file": "access_context_manager/delete_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync", - "title": "Snippet for the replace_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels.", - "file": "access_context_manager/replace_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync", - "title": "Snippet for the list_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters.", - "file": "access_context_manager/list_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync", - "title": "Snippet for the get_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter.", - "file": "access_context_manager/get_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ServicePerimeter", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync", - "title": "Snippet for the create_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter.", - "file": "access_context_manager/create_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync", - "title": "Snippet for the update_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter.", - "file": "access_context_manager/update_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync", - "title": "Snippet for the delete_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter.", - "file": "access_context_manager/delete_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync", - "title": "Snippet for the replace_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters.", - "file": "access_context_manager/replace_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync", - "title": "Snippet for the commit_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters.", - "file": "access_context_manager/commit_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "commit_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CommitServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CommitServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync", - "title": "Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings.", - "file": "access_context_manager/list_gcp_user_access_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gcp_user_access_bindings", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListGcpUserAccessBindings", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync", - "title": "Snippet for the get_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding.", - "file": "access_context_manager/get_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync", - "title": "Snippet for the create_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding.", - "file": "access_context_manager/create_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync", - "title": "Snippet for the update_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding.", - "file": "access_context_manager/update_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync", - "title": "Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding.", - "file": "access_context_manager/delete_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy.", - "file": "access_context_manager/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.SetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy.", - "file": "access_context_manager/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions.", - "file": "access_context_manager/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.TestIamPermissions", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "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-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb deleted file mode 100644 index 07584e8a3272..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/accesscontextmanager/v1/access_context_manager_services_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb deleted file mode 100644 index d60902c54e76..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_level_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_level_path access_policy: "value0", access_level: "value1" - assert_equal "accessPolicies/value0/accessLevels/value1", path - end - end - - def test_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path access_policy: "value0" - assert_equal "accessPolicies/value0", path - end - end - - def test_gcp_user_access_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gcp_user_access_binding_path organization: "value0", gcp_user_access_binding: "value1" - assert_equal "organizations/value0/gcpUserAccessBindings/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_service_perimeter_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_perimeter_path access_policy: "value0", service_perimeter: "value1" - assert_equal "accessPolicies/value0/servicePerimeters/value1", path - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb deleted file mode 100644 index f15c7327d6fe..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb +++ /dev/null @@ -1,1535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_create_access_policy - # Create test objects. - 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" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - 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_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_levels - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_count - end - end - end - - def test_get_access_level - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_level({ name: name, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_level name: name, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_level({ name: name, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_count - end - end - end - - def test_create_access_level - # Create test objects. - 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" - access_level = {} - - create_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_level({ parent: parent, access_level: access_level }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_level parent: parent, access_level: access_level do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_level({ parent: parent, access_level: access_level }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_level_client_stub.call_count - end - end - end - - def test_update_access_level - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_level access_level: access_level, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_level({ access_level: access_level, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_level_client_stub.call_count - end - end - end - - def test_delete_access_level - # Create test objects. - 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_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_level({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_level name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_level({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_level_client_stub.call_count - end - end - end - - def test_replace_access_levels - # Create test objects. - 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" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_access_levels_client_stub.call_count - end - end - end - - def test_list_service_perimeters - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - http_response = OpenStruct.new 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_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_count - end - end - end - - def test_get_service_perimeter - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_count - end - end - end - - def test_create_service_perimeter - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_perimeter_client_stub.call_count - end - end - end - - def test_update_service_perimeter - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_perimeter_client_stub.call_count - end - end - end - - def test_delete_service_perimeter - # Create test objects. - 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_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_perimeter_client_stub.call_count - end - end - end - - def test_replace_service_perimeters - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_service_perimeters_client_stub.call_count - end - end - end - - def test_commit_service_perimeters - # Create test objects. - 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" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_commit_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, commit_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.commit_service_perimeters({ parent: parent, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.commit_service_perimeters parent: parent, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.commit_service_perimeters({ parent: parent, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, commit_service_perimeters_client_stub.call_count - end - end - end - - def test_list_gcp_user_access_bindings - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - http_response = OpenStruct.new 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_gcp_user_access_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_gcp_user_access_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gcp_user_access_bindings_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_count - end - end - end - - def test_get_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_create_gcp_user_access_binding - # Create test objects. - 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" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_update_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_delete_gcp_user_access_binding - # Create test objects. - 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_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb deleted file mode 100644 index ef2427c12a7c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb +++ /dev/null @@ -1,1785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_create_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessPolicy, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["title"] - assert_equal ["hello world"], request["scopes"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["create_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["update_time"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, 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, create_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ policy: policy, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy policy: policy, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_levels - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_rpc_count - end - end - - def test_get_access_level - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, request - assert_equal "hello world", request["name"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_level({ name: name, access_level_format: access_level_format }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_level name: name, access_level_format: access_level_format do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_level({ name: name, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_rpc_count - end - end - - def test_create_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_level = {} - - create_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_level({ parent: parent, access_level: access_level }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_level parent: parent, access_level: access_level do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_level({ parent: parent, access_level: access_level }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), grpc_options) do |response, operation| - assert_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_access_level_client_stub.call_rpc_count - end - end - - def test_update_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_level access_level: access_level, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_level({ access_level: access_level, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level_client_stub.call_rpc_count - end - end - - def test_delete_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_level({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_level name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_level({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level_client_stub.call_rpc_count - end - end - - def test_replace_access_levels - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessLevel, request["access_levels"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, 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, replace_access_levels_client_stub.call_rpc_count - end - end - - def test_list_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, 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_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_rpc_count - end - end - - def test_get_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_perimeter({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_perimeter name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_rpc_count - end - end - - def test_create_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_perimeter_client_stub.call_rpc_count - end - end - - def test_update_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_delete_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_perimeter({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_service_perimeter name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_replace_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::ServicePerimeter, request["service_perimeters"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, 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, replace_service_perimeters_client_stub.call_rpc_count - end - end - - def test_commit_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :commit_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, commit_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.commit_service_perimeters({ parent: parent, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.commit_service_perimeters parent: parent, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.commit_service_perimeters({ parent: parent, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, 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, commit_service_perimeters_client_stub.call_rpc_count - end - end - - def test_list_gcp_user_access_bindings - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gcp_user_access_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gcp_user_access_bindings, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, 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_gcp_user_access_bindings_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_rpc_count - end - end - - def test_get_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gcp_user_access_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gcp_user_access_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_create_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), grpc_options) do |response, operation| - assert_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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_update_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_delete_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_gcp_user_access_binding({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_gcp_user_access_binding name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json deleted file mode 100644 index 9720ed4289b0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine-delivery", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1", - "distribution_name": "google-maps-fleet_engine-delivery-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine-delivery", - "name_pretty": "Last Mile Fleet Solution Delivery V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml deleted file mode 100644 index 5134ed6467fb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts deleted file mode 100644 index 443d62823a66..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Last Mile Fleet Solution Delivery 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-maps-fleet_engine-delivery-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md deleted file mode 100644 index 5667ca97e0e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md deleted file mode 100644 index 46fddfd91415..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Last Mile Fleet Solution Delivery V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Last Mile Fleet Solution Delivery V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine-delivery](https://rubygems.org/gems/google-maps-fleet_engine-delivery). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-delivery-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new -request = ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new # (request fields as keyword arguments...) -response = client.create_delivery_vehicle request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/delivery/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-maps-fleet_engine-delivery`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery`. -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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile deleted file mode 100644 index cd9e87b75d54..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1/delivery_service/credentials" - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-delivery-v1" - header "google-maps-fleet_engine-delivery-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-delivery-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json deleted file mode 100644 index 4c69a9a6c497..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.delivery.v1", - "libraryPackage": "::Google::Maps::FleetEngine::Delivery::V1", - "services": { - "DeliveryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client", - "rpcs": { - "CreateDeliveryVehicle": { - "methods": [ - "create_delivery_vehicle" - ] - }, - "GetDeliveryVehicle": { - "methods": [ - "get_delivery_vehicle" - ] - }, - "DeleteDeliveryVehicle": { - "methods": [ - "delete_delivery_vehicle" - ] - }, - "UpdateDeliveryVehicle": { - "methods": [ - "update_delivery_vehicle" - ] - }, - "BatchCreateTasks": { - "methods": [ - "batch_create_tasks" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTaskTrackingInfo": { - "methods": [ - "get_task_tracking_info" - ] - }, - "ListDeliveryVehicles": { - "methods": [ - "list_delivery_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec deleted file mode 100644 index 7e1c51590eb3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/delivery/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-delivery-v1" - gem.version = Google::Maps::FleetEngine::Delivery::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb deleted file mode 100644 index cd1ad7559d55..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb deleted file mode 100644 index bf548f559e81..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/delivery/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb deleted file mode 100644 index 3f52ddd3345e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/client" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "delivery_service", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb deleted file mode 100644 index 57a447f2b08f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +++ /dev/null @@ -1,1757 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - ## - # Client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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/maps/fleetengine/delivery/v1/delivery_api_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 - - @delivery_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :create_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :delete_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.delivery_vehicle&.name && - %r{^providers/[^/]+/?$}.match?(request.delivery_vehicle.name) - header_params["provider_id"] = request.delivery_vehicle.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_delivery_vehicle, request, 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 and returns a batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :batch_create_tasks, request, 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 and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :create_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(header: nil, name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :delete_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.task&.name && - %r{^providers/[^/]+/?$}.match?(request.task.name) - header_params["provider_id"] = request.task.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_task_tracking_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :list_delivery_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, request, response, 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 DeliveryService API. - # - # This class represents the configuration for DeliveryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb deleted file mode 100644 index 8665c263a506..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Credentials for the DeliveryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb deleted file mode 100644 index dddaace08010..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Path helper methods for the DeliveryService API. - module Paths - ## - # Create a fully-qualified DeliveryVehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/deliveryVehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def delivery_vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/deliveryVehicles/#{vehicle}" - end - - ## - # Create a fully-qualified Provider resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}` - # - # @param provider [String] - # - # @return [::String] - def provider_path provider: - "providers/#{provider}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/tasks/{task}` - # - # @param provider [String] - # @param task [String] - # - # @return [::String] - def task_path provider:, task: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/tasks/#{task}" - end - - ## - # Create a fully-qualified TaskTrackingInfo resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/taskTrackingInfo/{tracking}` - # - # @param provider [String] - # @param tracking [String] - # - # @return [::String] - def task_tracking_info_path provider:, tracking: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/taskTrackingInfo/#{tracking}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb deleted file mode 100644 index c3e0d58b6ef6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/client" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb deleted file mode 100644 index 3d36d73469a4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +++ /dev/null @@ -1,1618 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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 - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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 - - @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.create_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.delete_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_delivery_vehicle request, 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 and returns a batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.batch_create_tasks request, 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 and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an 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_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.create_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(header: nil, name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.delete_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_task_tracking_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.list_delivery_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, 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 DeliveryService REST API. - # - # This class represents the configuration for DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb deleted file mode 100644 index b1a86959625c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +++ /dev/null @@ -1,820 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST service stub for the DeliveryService 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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def create_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def get_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def update_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # A result object deserialized from the server's reply - def batch_create_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.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_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # A result object deserialized from the server's reply - def get_task_tracking_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task_tracking_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # A result object deserialized from the server's reply - def list_delivery_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_delivery_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # 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_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deliveryVehicles", - body: "delivery_vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{delivery_vehicle.name}", - body: "delivery_vehicle", - matches: [ - ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks:batchCreate", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # 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_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_tracking_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_delivery_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deliveryVehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb deleted file mode 100644 index 8bc23bd54948..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/delivery/v1/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb deleted file mode 100644 index 5376e1dc941f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb deleted file mode 100644 index 192798ce9466..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleAttribute").msgclass - DeliveryVehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocation").msgclass - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TimeWindow").msgclass - TaskAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TaskAttribute").msgclass - DeliveryVehicleLocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor").enummodule - DeliveryVehicleNavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb deleted file mode 100644 index 1d269d5162eb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/delivery_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/header_pb' -require 'google/maps/fleetengine/delivery/v1/task_tracking_info_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/maps/fleetengine/delivery/v1/delivery_api.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto\x1a\x30google/maps/fleetengine/delivery/v1/header.proto\x1a\n\x19remaining_distance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\x12remaining_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12_\n\"remaining_vehicle_journey_segments\x18\x08 \x03(\x0b\x32\x33.maps.fleetengine.delivery.v1.VehicleJourneySegment\x12J\n\nattributes\x18\t \x03(\x0b\x32\x36.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute\x12O\n\x04type\x18\n \x01(\x0e\x32\x41.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType\"t\n\x13\x44\x65liveryVehicleType\x12%\n!DELIVERY_VEHICLE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0f\n\x0bTWO_WHEELER\x10\x02\x12\x0b\n\x07\x42ICYCLE\x10\x03\x12\x0e\n\nPEDESTRIAN\x10\x04:`\xea\x41]\n*fleetengine.googleapis.com/DeliveryVehicle\x12/providers/{provider}/deliveryVehicles/{vehicle}\"2\n\x0cLocationInfo\x12\"\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"\xf5\x01\n\x15VehicleJourneySegment\x12\x37\n\x04stop\x18\x01 \x01(\x0b\x32).maps.fleetengine.delivery.v1.VehicleStop\x12\x41\n\x17\x64riving_distance_meters\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12\x38\n\x10\x64riving_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12&\n\x04path\x18\x05 \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\"\xbe\x03\n\x0bVehicleStop\x12I\n\x10planned_location\x18\x01 \x01(\x0b\x32*.maps.fleetengine.delivery.v1.LocationInfoB\x03\xe0\x41\x02\x12\x41\n\x05tasks\x18\x02 \x03(\x0b\x32\x32.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.maps.fleetengine.delivery.v1.VehicleStop.State\x1a\x9d\x01\n\x08TaskInfo\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x35\n\rtask_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x12target_time_window\x18\x03 \x01(\x0b\x32(.maps.fleetengine.delivery.v1.TimeWindowB\x03\xe0\x41\x03\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07\x45NROUTE\x10\x02\x12\x0b\n\x07\x41RRIVED\x10\x03\x42\x85\x02\n\'com.google.maps.fleetengine.delivery.v1B\x10\x44\x65liveryVehiclesP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle").msgclass - DeliveryVehicle::DeliveryVehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType").enummodule - LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.LocationInfo").msgclass - VehicleJourneySegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleJourneySegment").msgclass - VehicleStop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop").msgclass - VehicleStop::TaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.TaskInfo").msgclass - VehicleStop::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb deleted file mode 100644 index 1e64318e1070..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/header.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb0\x04\n\x15\x44\x65liveryRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12M\n\x08sdk_type\x18\x06 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12N\n\x08platform\x18\t \x01(\x0e\x32<.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xfc\x01\n\'com.google.maps.fleetengine.delivery.v1B\x07HeadersP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader").msgclass - DeliveryRequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType").enummodule - DeliveryRequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb deleted file mode 100644 index b483e697d6e9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/delivery/v1/common_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/

` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb deleted file mode 100644 index 1feab364a2dd..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DeliveryVehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of the `flp_location` - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class DeliveryVehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time range. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The start time of the time window (inclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end time of the time window (inclusive). - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a task attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TaskAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The sensor or methodology used to determine the location. - module DeliveryVehicleLocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - - # The vehicle's navigation status. - module DeliveryVehicleNavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb deleted file mode 100644 index 8c9bb733f9ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +++ /dev/null @@ -1,395 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `CreateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] delivery_vehicle_id - # @return [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - class CreateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteDeliveryVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListDeliveryVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` response message. - # @!attribute [rw] delivery_vehicles - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # The set of delivery vehicles that meet the requested filtering criteria. - # When no filter is specified, the request returns all delivery vehicles. A - # successful response can also be empty. An empty response indicates that no - # delivery vehicles were found meeting the requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - # list results. When all of the results are returned, this field won't be in - # the response, or it will be an empty string. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of delivery vehicles that match the request criteria, - # across all pages. - class ListDeliveryVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - class UpdateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] requests - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - class BatchCreateTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` response message. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The created Tasks. - class BatchCreateTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `CreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] task_id - # @return [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTask request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` response that contains the set of Tasks that meet the filter - # criteria in the `ListTasksRequest`. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The set of Tasks that meet the requested filtering criteria. When no filter - # is specified, the request returns all tasks. A successful response can also - # be empty. An empty response indicates that no Tasks were found meeting the - # requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the `ListTasksRequest` to continue to list results. - # If all results have been returned, then this field is either an empty - # string, or it doesn't appear in the response. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of Tasks that match the request criteria, across all - # pages. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTaskTrackingInfoRequest` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - class GetTaskTrackingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb deleted file mode 100644 index 815ff7ffd128..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `DeliveryVehicle` message. A delivery vehicle transports shipments from a - # depot to a delivery location, and from a pickup location to the depot. In - # some cases, delivery vehicles also transport shipments directly from the - # pickup location to the delivery location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `DeliveryVehicle.current_route_segment` field in the gRPC API and the - # `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # The unique name of this Delivery Vehicle. - # The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The last reported location of the Delivery Vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation>] - # Input only. Locations where this Delivery Vehicle has been in the past that - # haven't yet been reported to Fleet Engine. This is used in - # `UpdateDeliveryVehicleRequest` to record locations which were previously - # unable to be sent to the server. Typically this happens when the Delivery - # Vehicle does not have internet connectivity. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleNavigationStatus] - # The Delivery Vehicle's navigation status. - # @!attribute [rw] current_route_segment - # @return [::String] - # The encoded polyline specifying the route that the navigation recommends - # taking to the next waypoint. Your driver app updates this when a - # stop is reached or passed, and when the navigation reroutes. These - # `LatLng`s are returned in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST) for all active Tasks assigned to the Vehicle. - # - # There are a few cases where this field might not be used to populate - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST): - # - # * The endpoint of the `current_route_segment` does not match - # `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - # `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - # - # * The driver app has not updated its location recently, so the last - # updated value for this field might be stale. - # - # * The driver app has recently updated its location, but the - # `current_route_segment` is stale, and points to a previous vehicle stop. - # - # In these cases, Fleet Engine populates this field with a route from the - # most recently passed VehicleStop to the upcoming VehicleStop to ensure that - # the consumer of this field has the best available information on the - # current path of the Delivery Vehicle. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Type::LatLng] - # The location where the `current_route_segment` ends. This is not currently - # populated by the driver app, but you can supply it on - # `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - # vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual `VehicleStop`. - # - # This field is ignored in `UpdateDeliveryVehicle` calls if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - # or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - # for all active `Task`s assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_duration - # @return [::Google::Protobuf::Duration] - # The remaining driving time for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - # active tasks assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # The journey segments assigned to this Delivery Vehicle, starting from the - # Vehicle's most recently reported location. This field won't be populated - # in the response of `ListDeliveryVehicles`. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleAttribute>] - # A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - # at most 100 attributes, and each attribute must have a unique key. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle::DeliveryVehicleType] - # The type of this delivery vehicle. If unset, this will default to `AUTO`. - class DeliveryVehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of delivery vehicle. - module DeliveryVehicleType - # The value is unused. - DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0 - - # An automobile. - AUTO = 1 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 2 - - # Human-powered transport. - BICYCLE = 3 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 4 - end - end - - # A location with any additional identifiers. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # The location's coordinates. - class LocationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Vehicle’s travel segment - from its previous stop to the - # current stop. If it is the first active stop, then it is from the - # Vehicle’s current location to this stop. - # @!attribute [rw] stop - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop] - # Specifies the stop location, along with the `Task`s associated with - # the stop. Some fields of the VehicleStop might not be present if this - # journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The travel distance from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the vehicle's location recorded - # at the time that this stop was added to the list. This field might not be - # present if this journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_duration - # @return [::Google::Protobuf::Duration] - # Output only. The travel time from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the Vehicle's location recorded - # at the time that this stop was added to the list. - # - # If this field is defined in the path - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - # then it may be populated with the value from - # `DeliveryVehicle.remaining_duration` (gRPC) or - # `DeliveryVehicle.remainingDuration` (REST). - # This provides the remaining driving duration from the driver app's latest - # known location rather than the driving time from the previous stop. - # @!attribute [r] path - # @return [::Array<::Google::Type::LatLng>] - # Output only. The path from the previous stop to this stop. If the current - # stop is the first stop in the list of journey segments, then this is the - # path from the vehicle's current location to this stop at the time that the - # stop was added to the list. This field might not be present if this journey - # segment is part of `JourneySharingInfo`. - # - # If this field is defined in the path - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST), then it may be populated with the `LatLng`s decoded from - # `DeliveryVehicle.current_route_segment` (gRPC) or - # `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - # path from the driver app's latest known location rather than the path from - # the previous stop. - class VehicleJourneySegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a point where a Vehicle stops to perform one or more `Task`s. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Required. The location of the stop. Note that the locations in the `Task`s - # might not exactly match this location, but will be within a short distance - # of it. This field won't be populated in the response of a `GetTask` call. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::TaskInfo>] - # The list of `Task`s to be performed at this stop. This field won't be - # populated in the response of a `GetTask` call. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::State] - # The state of the `VehicleStop`. This field won't be populated in the - # response of a `GetTask` call. - class VehicleStop - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional information about the Task performed at this stop. - # @!attribute [rw] task_id - # @return [::String] - # The Task ID. This field won't be populated in the response of a `GetTask` - # call. Task IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] task_duration - # @return [::Google::Protobuf::Duration] - # Output only. The time required to perform the Task. - # @!attribute [r] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # Output only. The time window during which the task should be completed. - # This is only set in the response to `GetDeliveryVehicle`. - class TaskInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current state of a `VehicleStop`. - module State - # Unknown. - STATE_UNSPECIFIED = 0 - - # Created, but not actively routing. - NEW = 1 - - # Assigned and actively routing. - ENROUTE = 2 - - # Arrived at stop. Assumes that when the Vehicle is routing to the next - # stop, that all previous stops have been completed. - ARRIVED = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb deleted file mode 100644 index 8475ff84935a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.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 Maps - module FleetEngine - module Delivery - module V1 - # A RequestHeader contains fields common to all Delivery RPC requests. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as en-US or sr-Latn. For more information, - # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class DeliveryRequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb deleted file mode 100644 index 3a110fdb32d7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `TaskTrackingInfo` message. The message contains task tracking - # information which will be used for display. If a tracking ID is associated - # with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's - # TaskTrackingInfo to select. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - # where `tracking` represents the tracking ID. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. The tracking ID of a Task. - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The vehicle's last location. - # @!attribute [rw] route_polyline_points - # @return [::Array<::Google::Type::LatLng>] - # A list of points which when connected forms a polyline of the vehicle's - # expected route to the location of this task. - # @!attribute [rw] remaining_stop_count - # @return [::Google::Protobuf::Int32Value] - # Indicates the number of stops the vehicle remaining until the task stop is - # reached, including the task stop. For example, if the vehicle's next stop - # is the task stop, the value will be 1. - # @!attribute [rw] remaining_driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The total remaining distance in meters to the `VehicleStop` of interest. - # @!attribute [rw] estimated_arrival_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated arrival time to the stop - # location. - # @!attribute [rw] estimated_task_completion_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated completion time of a Task. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of attempting to execute a Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the Task's outcome was set by the - # provider. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # The custom attributes set on the task. - class TaskTrackingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb deleted file mode 100644 index 0bb1c3f6a05b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # A Task in the Delivery API represents a single action to track. In general, - # there is a distinction between shipment-related Tasks and break Tasks. A - # shipment can have multiple Tasks associated with it. For example, there could - # be one Task for the pickup, and one for the drop-off or transfer. Also, - # different Tasks for a given shipment can be handled by different vehicles. - # For example, one vehicle could handle the pickup, driving the shipment to the - # hub, while another vehicle drives the same shipment from the hub to the - # drop-off location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `Task.journey_sharing_info` field in the gRPC API and the - # `Task.journeySharingInfo` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/tasks/{task}`. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::Type] - # Required. Immutable. Defines the type of the Task. For example, a break or - # shipment. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # Required. The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of the Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the `Task`'s outcome was set by the - # provider. - # @!attribute [rw] task_outcome_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # The location where the `Task`'s outcome was set. This value is updated as - # part of `UpdateTask`. If this value isn't explicitly updated by the - # provider, then Fleet Engine populates it by default with the last known - # vehicle location (the *raw* location). - # @!attribute [rw] task_outcome_location_source - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource] - # Indicates where the value of the `task_outcome_location` came from. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. This field facilitates the storing of an ID so you can avoid - # using a complicated mapping. You cannot set `tracking_id` for Tasks of type - # `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] delivery_vehicle_id - # @return [::String] - # Output only. The ID of the vehicle that is executing this Task. Delivery - # Vehicle IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - # @!attribute [rw] task_duration - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The time needed to execute a Task at this location. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [r] journey_sharing_info - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo] - # Output only. Journey sharing-specific fields. Not populated when state is - # `CLOSED`. - # @!attribute [rw] task_tracking_view_config - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig] - # The configuration for task tracking that specifies which data elements are - # visible to the end users under what circumstances. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # A list of custom Task attributes. Each attribute must have a unique key. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Journey sharing specific fields. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # Tracking information for the stops that the assigned vehicle will make - # before it completes this Task. Note that this list can contain stops - # from other tasks. - # - # The first segment, - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - # or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - # contains route information from the driver's last known location to the - # upcoming `VehicleStop`. Current route information usually comes from the - # driver app, except for some cases noted in the documentation for - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # The other segments in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - # `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - # populated by Fleet Engine. They provide route information between the - # remaining `VehicleStops`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # Indicates the vehicle's last reported location of the assigned vehicle. - # @!attribute [rw] last_location_snappable - # @return [::Boolean] - # Indicates whether the vehicle's lastLocation can be snapped to - # the `current_route_segment`. This value is False if either - # `last_location` or `current_route_segment` don't exist. This value is - # computed by Fleet Engine. Updates from clients are ignored. - class JourneySharingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of Task. - module Type - # Default, the Task type is unknown. - TYPE_UNSPECIFIED = 0 - - # A pickup Task is the action taken for picking up a shipment from a - # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` - # type. - PICKUP = 1 - - # A delivery Task is the action taken for delivering a shipment to an end - # customer. Depot or feeder vehicle dropoffs should use the - # `SCHEDULED_STOP` type. - DELIVERY = 2 - - # A scheduled stop Task is used for planning purposes. For example, it - # could represent picking up or dropping off shipments from feeder vehicles - # or depots. It shouldn't be used for any shipments that are picked up or - # dropped off from an end customer. - SCHEDULED_STOP = 3 - - # A Task that means the Vehicle is not available for service. For example, - # this can happen when the driver takes a break, or when the vehicle - # is being refueled. - UNAVAILABLE = 4 - end - - # The state of a Task. This indicates the Tasks's progress. - module State - # Default. Used for an unspecified or unrecognized Task state. - STATE_UNSPECIFIED = 0 - - # Either the Task has not yet been assigned to a delivery vehicle, or the - # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. - OPEN = 1 - - # When the vehicle passes the vehicle stop for this Task. - CLOSED = 2 - end - - # The outcome of attempting to execute a Task. When `TaskState` is closed, - # `TaskOutcome` indicates whether it was completed successfully. - module TaskOutcome - # The Task outcome before its value is set. - TASK_OUTCOME_UNSPECIFIED = 0 - - # The Task completed successfully. - SUCCEEDED = 1 - - # Either the Task couldn't be completed, or it was cancelled. - FAILED = 2 - end - - # The identity of the source that populated the `task_outcome_location`. - module TaskOutcomeLocationSource - # The task outcome before it is set. - TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0 - - # The provider-specified the `task_outcome_location`. - PROVIDER = 2 - - # The provider didn't specify the `task_outcome_location`, so Fleet Engine - # used the last known vehicle location. - LAST_VEHICLE_LOCATION = 3 - end - end - - # The configuration message that defines when a data element of a Task should - # be visible to the end users. - # @!attribute [rw] route_polyline_points_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when route polyline points can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] estimated_arrival_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated arrival time can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] estimated_task_completion_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated task completion time can be - # visible. If this field is not specified, the project level default - # visibility configuration for this data will be used. - # @!attribute [rw] remaining_driving_distance_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining driving distance can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] remaining_stop_count_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining stop count can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] vehicle_location_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when vehicle location can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - class TaskTrackingViewConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The option message that defines when a data element should be visible to - # the end users. - # @!attribute [rw] remaining_stop_count_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining stop - # count <= remaining_stop_count_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] duration_until_estimated_arrival_time_threshold - # @return [::Google::Protobuf::Duration] - # This data element is visible to the end users if the ETA to the stop - # <= duration_until_estimated_arrival_time_threshold. - # - # Note: The following fields are mutually exclusive: `duration_until_estimated_arrival_time_threshold`, `remaining_stop_count_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remaining_driving_distance_meters_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining - # driving distance in meters <= - # remaining_driving_distance_meters_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_driving_distance_meters_threshold`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] always - # @return [::Boolean] - # If set to true, this data element is always visible to the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `always`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] never - # @return [::Boolean] - # If set to true, this data element is always hidden from the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `never`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VisibilityOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index 593314b4cde5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object that represents a latitude/longitude pair. This is expressed as a - # pair of doubles to represent degrees latitude and degrees longitude. Unless - # specified otherwise, this object must conform to the - # - # WGS84 standard. Values must be within normalized ranges. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - class LatLng - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile deleted file mode 100644 index 30533202706d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1", path: "../" -else - gem "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb deleted file mode 100644 index 14782a4848c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the batch_create_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks. -# -def batch_create_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - - # Call the batch_create_tasks method. - result = client.batch_create_tasks request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb deleted file mode 100644 index 4e414ecb6e94..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle. -# -def create_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - - # Call the create_delivery_vehicle method. - result = client.create_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb deleted file mode 100644 index 786f6ae89625..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb deleted file mode 100644 index 0a42a3ea4d16..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle. -# -def delete_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - - # Call the delete_delivery_vehicle method. - result = client.delete_delivery_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb deleted file mode 100644 index 7839b4fc3aa0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb deleted file mode 100644 index ac4be0811ccf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle. -# -def get_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - - # Call the get_delivery_vehicle method. - result = client.get_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb deleted file mode 100644 index 51530e7ea2a7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb deleted file mode 100644 index 50c6fcfcbe4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task_tracking_info call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info. -# -def get_task_tracking_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - - # Call the get_task_tracking_info method. - result = client.get_task_tracking_info request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb deleted file mode 100644 index 06025d2f85f2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_delivery_vehicles call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles. -# -def list_delivery_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - - # Call the list_delivery_vehicles method. - result = client.list_delivery_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb deleted file mode 100644 index f5751c045373..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb deleted file mode 100644 index 54d6bfef390a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle. -# -def update_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - - # Call the update_delivery_vehicle method. - result = client.update_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb deleted file mode 100644 index 6413dfeaa315..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json deleted file mode 100644 index 7abad3f98118..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-delivery-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.delivery.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync", - "title": "Snippet for the create_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle.", - "file": "delivery_service/create_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync", - "title": "Snippet for the get_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle.", - "file": "delivery_service/get_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync", - "title": "Snippet for the delete_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle.", - "file": "delivery_service/delete_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync", - "title": "Snippet for the update_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle.", - "file": "delivery_service/update_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync", - "title": "Snippet for the batch_create_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks.", - "file": "delivery_service/batch_create_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "BatchCreateTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.BatchCreateTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync", - "title": "Snippet for the create_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task.", - "file": "delivery_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync", - "title": "Snippet for the get_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task.", - "file": "delivery_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task.", - "file": "delivery_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task.", - "file": "delivery_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks.", - "file": "delivery_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync", - "title": "Snippet for the get_task_tracking_info call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info.", - "file": "delivery_service/get_task_tracking_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task_tracking_info", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTaskTrackingInfo", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTaskTrackingInfo", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync", - "title": "Snippet for the list_delivery_vehicles call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles.", - "file": "delivery_service/list_delivery_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_delivery_vehicles", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListDeliveryVehicles", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListDeliveryVehicles", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "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-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb deleted file mode 100644 index 8d3d04d6c721..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.delivery_vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/deliveryVehicles/value1", path - end - end - - def test_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provider_path provider: "value0" - assert_equal "providers/value0", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path provider: "value0", task: "value1" - assert_equal "providers/value0/tasks/value1", path - end - end - - def test_task_tracking_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_tracking_info_path provider: "value0", tracking: "value1" - assert_equal "providers/value0/taskTrackingInfo/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb deleted file mode 100644 index df0109912e9d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb +++ /dev/null @@ -1,773 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_count - end - end - end - - def test_get_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_count - end - end - end - - def test_delete_delivery_vehicle - # 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. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_delivery_vehicle_client_stub.call_count - end - end - end - - def test_update_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_delivery_vehicle_client_stub.call_count - end - end - end - - def test_batch_create_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_batch_create_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_tasks header: header, parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_tasks({ header: header, parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_task header: header, parent: parent, task_id: task_id, task: task do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_delete_task - # 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. - header = {} - name = "hello world" - - delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_update_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_task({ header: header, task: task, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_task header: header, task: task, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_task({ header: header, task: task, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_get_task_tracking_info - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_tracking_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_tracking_info_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_task_tracking_info({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_task_tracking_info header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_task_tracking_info({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_count - end - end - end - - def test_list_delivery_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_delivery_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb deleted file mode 100644 index d08154229fd8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["delivery_vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_get_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_update_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_batch_create_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_tasks, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_tasks header: header, parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_tasks({ header: header, parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_task header: header, parent: parent, task_id: task_id, task: task do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_task({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_task({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_task_client_stub.call_rpc_count - end - end - - def test_update_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_task({ header: header, task: task, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_task header: header, task: task, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_task({ header: header, task: task, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_get_task_tracking_info - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task_tracking_info, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_tracking_info_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_task_tracking_info({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_task_tracking_info header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_task_tracking_info({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_rpc_count - end - end - - def test_list_delivery_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_delivery_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json deleted file mode 100644 index 4592d201ad59..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-v1", - "distribution_name": "google-maps-fleet_engine-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine", - "name_pretty": "Local Rides and Deliveries V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml deleted file mode 100644 index 50b9b02eb455..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-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-maps-fleet_engine-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts deleted file mode 100644 index 53681741a35c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Local Rides and Deliveries 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-maps-fleet_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md deleted file mode 100644 index 934462c35216..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/v1" - -::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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/maps/fleet_engine/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/README.md deleted file mode 100644 index 6abe0096016a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Local Rides and Deliveries V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Local Rides and Deliveries V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine](https://rubygems.org/gems/google-maps-fleet_engine). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new -request = ::Google::Maps::FleetEngine::V1::CreateTripRequest.new # (request fields as keyword arguments...) -response = client.create_trip request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-maps-fleet_engine`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_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-maps-fleet_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-maps-fleet_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-maps-fleet_engine-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-v1/Rakefile deleted file mode 100644 index 3919676d82cf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1/trip_service/credentials" - ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-v1" - header "google-maps-fleet_engine-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json deleted file mode 100644 index 0bdd51b5c575..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.v1", - "libraryPackage": "::Google::Maps::FleetEngine::V1", - "services": { - "TripService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::TripService::Client", - "rpcs": { - "CreateTrip": { - "methods": [ - "create_trip" - ] - }, - "GetTrip": { - "methods": [ - "get_trip" - ] - }, - "DeleteTrip": { - "methods": [ - "delete_trip" - ] - }, - "ReportBillableTrip": { - "methods": [ - "report_billable_trip" - ] - }, - "SearchTrips": { - "methods": [ - "search_trips" - ] - }, - "UpdateTrip": { - "methods": [ - "update_trip" - ] - } - } - } - } - }, - "VehicleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::VehicleService::Client", - "rpcs": { - "CreateVehicle": { - "methods": [ - "create_vehicle" - ] - }, - "GetVehicle": { - "methods": [ - "get_vehicle" - ] - }, - "DeleteVehicle": { - "methods": [ - "delete_vehicle" - ] - }, - "UpdateVehicle": { - "methods": [ - "update_vehicle" - ] - }, - "UpdateVehicleAttributes": { - "methods": [ - "update_vehicle_attributes" - ] - }, - "ListVehicles": { - "methods": [ - "list_vehicles" - ] - }, - "SearchVehicles": { - "methods": [ - "search_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec deleted file mode 100644 index e47fe7d61a50..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-v1" - gem.version = Google::Maps::FleetEngine::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb deleted file mode 100644 index d09ab3bdc03a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-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/maps/fleet_engine/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb deleted file mode 100644 index b9e04593edfe..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleet_engine/v1/trip_service" -require "google/maps/fleet_engine/v1/vehicle_service" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb deleted file mode 100644 index a0010e1c40d9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service/rest" -require "google/maps/fleet_engine/v1/vehicle_service/rest" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/v1/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb deleted file mode 100644 index cb3cd45ab109..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/client" -require "google/maps/fleet_engine/v1/trip_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/trip_service" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - end - end - end - end -end - -helper_path = ::File.join __dir__, "trip_service", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb deleted file mode 100644 index 18ea9bb63065..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ /dev/null @@ -1,1153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - ## - # Client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.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 TripService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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/maps/fleetengine/v1/trip_api_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 - - @trip_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::TripService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :create_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :get_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :delete_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :report_billable_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_trips.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :search_trips, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @trip_service_stub, :search_trips, request, response, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :update_trip, request, 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 TripService API. - # - # This class represents the configuration for TripService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb deleted file mode 100644 index 4377df747ce3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Credentials for the TripService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb deleted file mode 100644 index 7de4a91f901d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Path helper methods for the TripService API. - module Paths - ## - # Create a fully-qualified Trip resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/trips/{trip}` - # - # @param provider [String] - # @param trip [String] - # - # @return [::String] - def trip_path provider:, trip: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/trips/#{trip}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb deleted file mode 100644 index 8f43dcd60e6b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb deleted file mode 100644 index 78114c5d13b2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ /dev/null @@ -1,1062 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.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 TripService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::TripService::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 - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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 - - @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to an 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.create_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.get_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.delete_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.report_billable_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to an 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trips.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.search_trips request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.update_trip request, 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 TripService REST API. - # - # This class represents the configuration for TripService 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::Maps::FleetEngine::V1::TripService::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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb deleted file mode 100644 index 989dd713b15c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +++ /dev/null @@ -1,451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST service stub for the TripService 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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def create_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def get_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def report_billable_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_report_billable_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "report_billable_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # A result object deserialized from the server's reply - def search_trips request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_trips_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trips", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def update_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # 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_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips", - body: "trip", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_report_billable_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:report", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/billableTrips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # 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_trips_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "trip", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb deleted file mode 100644 index 8a9893ae0e60..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/client" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/vehicle_service" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "vehicle_service", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb deleted file mode 100644 index c1b48e95c452..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +++ /dev/null @@ -1,1463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - ## - # Client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.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 VehicleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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/maps/fleetengine/v1/vehicle_api_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 - - @vehicle_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::VehicleService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :create_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :get_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :delete_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle_attributes, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :list_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :search_vehicles, request, 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 VehicleService API. - # - # This class represents the configuration for VehicleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb deleted file mode 100644 index fa225faa2e96..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Credentials for the VehicleService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb deleted file mode 100644 index 55fd593ff4b1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Path helper methods for the VehicleService API. - module Paths - ## - # Create a fully-qualified Vehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/vehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/vehicles/#{vehicle}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb deleted file mode 100644 index c638416560e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb deleted file mode 100644 index 6f30d8a08b7c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +++ /dev/null @@ -1,1364 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.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 VehicleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::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 - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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 - - @vehicle_service_stub = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to an 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.create_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.get_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.delete_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle_attributes request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.list_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, "vehicles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to an 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.search_vehicles request, 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 VehicleService REST API. - # - # This class represents the configuration for VehicleService 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::Maps::FleetEngine::V1::VehicleService::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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb deleted file mode 100644 index ab5b0c346f64..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST service stub for the VehicleService 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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def create_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def get_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def update_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # A result object deserialized from the server's reply - def update_vehicle_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vehicle_attributes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # A result object deserialized from the server's reply - def list_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.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_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # A result object deserialized from the server's reply - def search_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # 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_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles", - body: "vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "vehicle", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_vehicle_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateAttributes", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # 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_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb deleted file mode 100644 index 5f98242dd062..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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 Maps - module FleetEngine - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb deleted file mode 100644 index 58e92abfb79e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/fleetengine.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - TerminalPointId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalPointId").msgclass - TerminalLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalLocation").msgclass - TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass - VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass - VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass - TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass - TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule - WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule - PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule - NavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.NavigationStatus").enummodule - LocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationSensor").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb deleted file mode 100644 index 3f8cd27dcedb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/maps/fleetengine/v1/header.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x04\n\rRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12<\n\x08sdk_type\x18\x06 \x01(\x0e\x32*.maps.fleetengine.v1.RequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12=\n\x08platform\x18\t \x01(\x0e\x32+.maps.fleetengine.v1.RequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07HeadersP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - RequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader").msgclass - RequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.SdkType").enummodule - RequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.Platform").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb deleted file mode 100644 index 14bfe0f2b53b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/traffic.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/maps/fleetengine/v1/traffic.proto\x12\x13maps.fleetengine.v1\"\xe3\x01\n\x14SpeedReadingInterval\x12\"\n\x1astart_polyline_point_index\x18\x01 \x01(\x05\x12 \n\x18\x65nd_polyline_point_index\x18\x02 \x01(\x05\x12>\n\x05speed\x18\x03 \x01(\x0e\x32/.maps.fleetengine.v1.SpeedReadingInterval.Speed\"E\n\x05Speed\x12\x15\n\x11SPEED_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04SLOW\x10\x02\x12\x0f\n\x0bTRAFFIC_JAM\x10\x03\"\x88\x01\n\x19\x43onsumableTrafficPolyline\x12I\n\x16speed_reading_interval\x18\x01 \x03(\x0b\x32).maps.fleetengine.v1.SpeedReadingInterval\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x02 \x01(\tB\xd8\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0cTrafficProtoP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - SpeedReadingInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval").msgclass - SpeedReadingInterval::Speed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval.Speed").enummodule - ConsumableTrafficPolyline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ConsumableTrafficPolyline").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb deleted file mode 100644 index eb001c21ef19..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trip_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/trips_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateTripRequest").msgclass - GetTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetTripRequest").msgclass - DeleteTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteTripRequest").msgclass - ReportBillableTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest").msgclass - ReportBillableTripRequest::SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest.SolutionType").enummodule - UpdateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateTripRequest").msgclass - SearchTripsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsRequest").msgclass - SearchTripsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb deleted file mode 100644 index 39026e91ba88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/trip_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Trip management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.TripService' - - # Creates a trip in the Fleet Engine and returns the new trip. - rpc :CreateTrip, ::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Get information about a single trip. - rpc :GetTrip, ::Google::Maps::FleetEngine::V1::GetTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - rpc :DeleteTrip, ::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Google::Protobuf::Empty - # Report billable trip usage. - rpc :ReportBillableTrip, ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Google::Protobuf::Empty - # Get all the trips for a specific vehicle. - rpc :SearchTrips, ::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Google::Maps::FleetEngine::V1::SearchTripsResponse - # Updates trip data. - rpc :UpdateTrip, ::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb deleted file mode 100644 index 2aea61330c0f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trips.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Trip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Trip").msgclass - StopLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.StopLocation").msgclass - TripStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripStatus").enummodule - BillingPlatformIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BillingPlatformIdentifier").enummodule - TripView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb deleted file mode 100644 index 4a1949b764b4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicle_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/vehicles_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/vehicle_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a)google/maps/fleetengine/v1/vehicles.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xac\x01\n\x14\x43reateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvehicle_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x05 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\"\xfb\x01\n\x11GetVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x38\n\x04name\x18\x03 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11waypoints_version\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x89\x01\n\x14\x44\x65leteVehicleRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x38\n\x04name\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\"\xc7\x01\n\x14UpdateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa7\x01\n\x1eUpdateVehicleAttributesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12>\n\nattributes\x18\x04 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"a\n\x1fUpdateVehicleAttributesResponse\x12>\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"\xc6\t\n\x15SearchVehiclesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0cpickup_point\x18\x04 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x03\xe0\x41\x02\x12<\n\rdropoff_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12!\n\x14pickup_radius_meters\x18\x06 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05\x63ount\x18\x07 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10minimum_capacity\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x36\n\ntrip_types\x18\t \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12\x34\n\x11maximum_staleness\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\rvehicle_types\x18\x0e \x03(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x42\n\x13required_attributes\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12M\n\x1arequired_one_of_attributes\x18\x0f \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12Q\n\x1erequired_one_of_attribute_sets\x18\x14 \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12S\n\x08order_by\x18\r \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrderB\x03\xe0\x41\x02\x12\x1c\n\x14include_back_to_back\x18\x12 \x01(\x08\x12\x0f\n\x07trip_id\x18\x13 \x01(\t\x12]\n\x15\x63urrent_trips_present\x18\x15 \x01(\x0e\x32>.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent\x12\x13\n\x06\x66ilter\x18\x16 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x11VehicleMatchOrder\x12\x1f\n\x1bUNKNOWN_VEHICLE_MATCH_ORDER\x10\x00\x12\x14\n\x10PICKUP_POINT_ETA\x10\x01\x12\x19\n\x15PICKUP_POINT_DISTANCE\x10\x02\x12\x15\n\x11\x44ROPOFF_POINT_ETA\x10\x03\x12\"\n\x1ePICKUP_POINT_STRAIGHT_DISTANCE\x10\x04\x12\x08\n\x04\x43OST\x10\x05\"O\n\x13\x43urrentTripsPresent\x12%\n!CURRENT_TRIPS_PRESENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"L\n\x16SearchVehiclesResponse\x12\x32\n\x07matches\x18\x01 \x03(\x0b\x32!.maps.fleetengine.v1.VehicleMatch\"\xfe\x04\n\x13ListVehiclesRequest\x12\x32\n\x06header\x18\x0c \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x35\n\x10minimum_capacity\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\ntrip_types\x18\x07 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x34\n\x11maximum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12W\n\x17vehicle_type_categories\x18\t \x03(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.CategoryB\x03\xe0\x41\x02\x12\x1b\n\x13required_attributes\x18\n \x03(\t\x12\"\n\x1arequired_one_of_attributes\x18\r \x03(\t\x12&\n\x1erequired_one_of_attribute_sets\x18\x0f \x03(\t\x12\x38\n\rvehicle_state\x18\x0b \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12\x14\n\x0con_trip_only\x18\x0e \x01(\x08\x12\x13\n\x06\x66ilter\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08viewport\x18\x11 \x01(\x0b\x32\x19.google.geo.type.ViewportB\x03\xe0\x41\x01\"x\n\x14ListVehiclesResponse\x12.\n\x08vehicles\x18\x01 \x03(\x0b\x32\x1c.maps.fleetengine.v1.Vehicle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x17\n\ntotal_size\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\"Y\n\x08Waypoint\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12\'\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfe\x06\n\x0cVehicleMatch\x12\x32\n\x07vehicle\x18\x01 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x36\n\x12vehicle_pickup_eta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1evehicle_pickup_distance_meters\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12V\n,vehicle_pickup_straight_line_distance_meters\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\x12\x37\n\x13vehicle_dropoff_eta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n)vehicle_pickup_to_dropoff_distance_meters\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\ttrip_type\x18\x06 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12>\n\x17vehicle_trips_waypoints\x18\x07 \x03(\x0b\x32\x1d.maps.fleetengine.v1.Waypoint\x12N\n\x12vehicle_match_type\x18\x08 \x01(\x0e\x32\x32.maps.fleetengine.v1.VehicleMatch.VehicleMatchType\x12Z\n\x14requested_ordered_by\x18\t \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\x12P\n\nordered_by\x18\n \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\"g\n\x10VehicleMatchType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tEXCLUSIVE\x10\x01\x12\x10\n\x0c\x42\x41\x43K_TO_BACK\x10\x02\x12\x0b\n\x07\x43\x41RPOOL\x10\x03\x12\x18\n\x14\x43\x41RPOOL_BACK_TO_BACK\x10\x04\"Q\n\x14VehicleAttributeList\x12\x39\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute2\xa2\x0b\n\x0eVehicleService\x12\xb7\x01\n\rCreateVehicle\x12).maps.fleetengine.v1.CreateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"]\x82\xd3\xe4\x93\x02,\"!/v1/{parent=providers/*}/vehicles:\x07vehicle\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nGetVehicle\x12&.maps.fleetengine.v1.GetVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"R\x82\xd3\xe4\x93\x02#\x12!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xad\x01\n\rDeleteVehicle\x12).maps.fleetengine.v1.DeleteVehicleRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb5\x01\n\rUpdateVehicle\x12).maps.fleetengine.v1.UpdateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"[\x82\xd3\xe4\x93\x02,\x1a!/v1/{name=providers/*/vehicles/*}:\x07vehicle\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xec\x01\n\x17UpdateVehicleAttributes\x12\x33.maps.fleetengine.v1.UpdateVehicleAttributesRequest\x1a\x34.maps.fleetengine.v1.UpdateVehicleAttributesResponse\"f\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=providers/*/vehicles/*}:updateAttributes:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb9\x01\n\x0cListVehicles\x12(.maps.fleetengine.v1.ListVehiclesRequest\x1a).maps.fleetengine.v1.ListVehiclesResponse\"T\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=providers/*}/vehicles\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xc9\x01\n\x0eSearchVehicles\x12*.maps.fleetengine.v1.SearchVehiclesRequest\x1a+.maps.fleetengine.v1.SearchVehiclesResponse\"^\x82\xd3\xe4\x93\x02-\"(/v1/{parent=providers/*}/vehicles:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n\x1e\x63om.google.maps.fleetengine.v1B\nVehicleApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateVehicleRequest").msgclass - GetVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetVehicleRequest").msgclass - DeleteVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteVehicleRequest").msgclass - UpdateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleRequest").msgclass - UpdateVehicleAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesRequest").msgclass - UpdateVehicleAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesResponse").msgclass - SearchVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest").msgclass - SearchVehiclesRequest::VehicleMatchOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder").enummodule - SearchVehiclesRequest::CurrentTripsPresent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent").enummodule - SearchVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesResponse").msgclass - ListVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesRequest").msgclass - ListVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesResponse").msgclass - Waypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Waypoint").msgclass - VehicleMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch").msgclass - VehicleMatch::VehicleMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch.VehicleMatchType").enummodule - VehicleAttributeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttributeList").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb deleted file mode 100644 index 31ee1908cafc..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/vehicle_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Vehicle management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.VehicleService' - - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - rpc :CreateVehicle, ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Returns a vehicle from the Fleet Engine. - rpc :GetVehicle, ::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - rpc :DeleteVehicle, ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Google::Protobuf::Empty - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - rpc :UpdateVehicle, ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - rpc :UpdateVehicleAttributes, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - rpc :ListVehicles, ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Google::Maps::FleetEngine::V1::ListVehiclesResponse - # Returns a list of vehicles that match the request options. - rpc :SearchVehicles, ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb deleted file mode 100644 index 91a8f67ad59d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicles.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n)google/maps/fleetengine/v1/vehicles.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\x0c\n\x07Vehicle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rvehicle_state\x18\x02 \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12;\n\x14supported_trip_types\x18\x03 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x1a\n\rcurrent_trips\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12;\n\rlast_location\x18\x05 \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocation\x12\x41\n\x0epast_locations\x18\x1e \x03(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x04\x12\x18\n\x10maximum_capacity\x18\x06 \x01(\x05\x12\x39\n\nattributes\x18\x08 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12\x43\n\x0cvehicle_type\x18\t \x01(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x38\n\rlicense_plate\x18\n \x01(\x0b\x32!.maps.fleetengine.v1.LicensePlate\x12\x38\n\x05route\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x02\x18\x01\x12\x1d\n\x15\x63urrent_route_segment\x18\x14 \x01(\t\x12T\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32(.maps.fleetengine.v1.TrafficPolylineDataB\x03\xe0\x41\x04\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12>\n\x19remaining_distance_meters\x18\x12 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x15\x65ta_to_first_waypoint\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x16remaining_time_seconds\x18\x19 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12\x34\n\twaypoints\x18\x16 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12:\n\x11waypoints_version\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x62\x61\x63k_to_back_enabled\x18\x17 \x01(\x08\x12@\n\x11navigation_status\x18\x1a \x01(\x0e\x32%.maps.fleetengine.v1.NavigationStatus\x12\x41\n\x0f\x64\x65vice_settings\x18\x1b \x01(\x0b\x32#.maps.fleetengine.v1.DeviceSettingsB\x03\xe0\x41\x04\x1a\xb8\x01\n\x0bVehicleType\x12\x43\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.Category\"d\n\x08\x43\x61tegory\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04TAXI\x10\x02\x12\t\n\x05TRUCK\x10\x03\x12\x0f\n\x0bTWO_WHEELER\x10\x04\x12\x0b\n\x07\x42ICYCLE\x10\x05\x12\x0e\n\nPEDESTRIAN\x10\x06:P\xea\x41M\n\"fleetengine.googleapis.com/Vehicle\x12\'providers/{provider}/vehicles/{vehicle}\"\x9d\x01\n\x0b\x42\x61tteryInfo\x12:\n\x0e\x62\x61ttery_status\x18\x01 \x01(\x0e\x32\".maps.fleetengine.v1.BatteryStatus\x12\x36\n\x0cpower_source\x18\x02 \x01(\x0e\x32 .maps.fleetengine.v1.PowerSource\x12\x1a\n\x12\x62\x61ttery_percentage\x18\x03 \x01(\x02\"\xca\x01\n\x0e\x44\x65viceSettings\x12L\n\x18location_power_save_mode\x18\x01 \x01(\x0e\x32*.maps.fleetengine.v1.LocationPowerSaveMode\x12\x1a\n\x12is_power_save_mode\x18\x02 \x01(\x08\x12\x16\n\x0eis_interactive\x18\x03 \x01(\x08\x12\x36\n\x0c\x62\x61ttery_info\x18\x04 \x01(\x0b\x32 .maps.fleetengine.v1.BatteryInfo\"A\n\x0cLicensePlate\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elast_character\x18\x02 \x01(\t\"\xf6\x02\n$VisualTrafficReportPolylineRendering\x12`\n\x0croad_stretch\x18\x01 \x03(\x0b\x32\x45.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretchB\x03\xe0\x41\x01\x1a\xeb\x01\n\x0bRoadStretch\x12_\n\x05style\x18\x01 \x01(\x0e\x32K.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.StyleB\x03\xe0\x41\x02\x12\x1a\n\roffset_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rlength_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"C\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLOWER_TRAFFIC\x10\x01\x12\x0f\n\x0bTRAFFIC_JAM\x10\x02\"k\n\x13TrafficPolylineData\x12T\n\x11traffic_rendering\x18\x01 \x01(\x0b\x32\x39.maps.fleetengine.v1.VisualTrafficReportPolylineRendering*B\n\x0cVehicleState\x12\x19\n\x15UNKNOWN_VEHICLE_STATE\x10\x00\x12\x0b\n\x07OFFLINE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\x92\x02\n\x15LocationPowerSaveMode\x12$\n UNKNOWN_LOCATION_POWER_SAVE_MODE\x10\x00\x12\x1b\n\x17LOCATION_MODE_NO_CHANGE\x10\x01\x12.\n*LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF\x10\x02\x12.\n*LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\x10\x03\x12!\n\x1dLOCATION_MODE_FOREGROUND_ONLY\x10\x04\x12\x33\n/LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF\x10\x05*\xc0\x01\n\rBatteryStatus\x12\x1a\n\x16UNKNOWN_BATTERY_STATUS\x10\x00\x12\x1b\n\x17\x42\x41TTERY_STATUS_CHARGING\x10\x01\x12\x1e\n\x1a\x42\x41TTERY_STATUS_DISCHARGING\x10\x02\x12\x17\n\x13\x42\x41TTERY_STATUS_FULL\x10\x03\x12\x1f\n\x1b\x42\x41TTERY_STATUS_NOT_CHARGING\x10\x04\x12\x1c\n\x18\x42\x41TTERY_STATUS_POWER_LOW\x10\x05*\x89\x01\n\x0bPowerSource\x12\x18\n\x14UNKNOWN_POWER_SOURCE\x10\x00\x12\x13\n\x0fPOWER_SOURCE_AC\x10\x01\x12\x14\n\x10POWER_SOURCE_USB\x10\x02\x12\x19\n\x15POWER_SOURCE_WIRELESS\x10\x03\x12\x1a\n\x16POWER_SOURCE_UNPLUGGED\x10\x04\x42\xd4\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x08VehiclesP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Vehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle").msgclass - Vehicle::VehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType").msgclass - Vehicle::VehicleType::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType.Category").enummodule - BatteryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryInfo").msgclass - DeviceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeviceSettings").msgclass - LicensePlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LicensePlate").msgclass - VisualTrafficReportPolylineRendering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering").msgclass - VisualTrafficReportPolylineRendering::RoadStretch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch").msgclass - VisualTrafficReportPolylineRendering::RoadStretch::Style = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style").enummodule - TrafficPolylineData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TrafficPolylineData").msgclass - VehicleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleState").enummodule - LocationPowerSaveMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationPowerSaveMode").enummodule - BatteryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryStatus").enummodule - PowerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PowerSource").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md deleted file mode 100644 index faf4842e7c03..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Local Rides and Deliveries 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-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb deleted file mode 100644 index 9855fd75847c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ /dev/null @@ -1,394 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use - # `TerminalLocation.point` instead. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] place_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `place_id`, `generated_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generated_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `generated_id`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - class TerminalPointId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the location of a waypoint. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the location of a trip waypoint. - # @!attribute [rw] terminal_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::TerminalPointId] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] access_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] trip_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # @!attribute [rw] terminal_location_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # Deprecated: `Vehicle.waypoint` will have this data. - class TerminalLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a stopping point on a vehicle's route or an ending point on a - # vehicle's trip. - # @!attribute [rw] location - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The location of this waypoint. - # @!attribute [rw] trip_id - # @return [::String] - # The trip associated with this waypoint. - # @!attribute [rw] waypoint_type - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # The role this waypoint plays in this trip, such as pickup or dropoff. - # @!attribute [rw] path_to_waypoint - # @return [::Array<::Google::Type::LatLng>] - # The path from the previous waypoint to the current waypoint. Undefined for - # the first waypoint in a list. This field is only populated when requested. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The encoded path from the previous waypoint to the current waypoint. - # - #

Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [rw] traffic_to_waypoint - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # The traffic conditions along the path to this waypoint. Note that traffic - # is only available for Google Map Platform Rides and Deliveries Solution - # customers. - # @!attribute [rw] distance_meters - # @return [::Google::Protobuf::Int32Value] - # The path distance from the previous waypoint to the current waypoint. - # Undefined for the first waypoint in a list. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time of arrival at this waypoint. Undefined for the first - # waypoint in a list. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The travel time from previous waypoint to this point. Undefined for the - # first waypoint in a list. - class TripWaypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of `flp_location`. - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class VehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a trip attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TripAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of a trip. - module TripType - # Default, used for unspecified or unrecognized trip types. - UNKNOWN_TRIP_TYPE = 0 - - # The trip may share a vehicle with other trips. - SHARED = 1 - - # The trip is exclusive to a vehicle. - EXCLUSIVE = 2 - end - - # The type of waypoint. - module WaypointType - # Unknown or unspecified waypoint type. - UNKNOWN_WAYPOINT_TYPE = 0 - - # Waypoints for picking up riders or items. - PICKUP_WAYPOINT_TYPE = 1 - - # Waypoints for dropping off riders or items. - DROP_OFF_WAYPOINT_TYPE = 2 - - # Waypoints for intermediate destinations in a multi-destination trip. - INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3 - end - - # The type of polyline format. - module PolylineFormatType - # The format is unspecified or unknown. - UNKNOWN_FORMAT_TYPE = 0 - - # A list of `google.type.LatLng`. - LAT_LNG_LIST_TYPE = 1 - - # A polyline encoded with a polyline compression algorithm. Decoding is not - # yet supported. - ENCODED_POLYLINE_TYPE = 2 - end - - # The vehicle's navigation status. - module NavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - - # The sensor or methodology used to determine the location. - module LocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb deleted file mode 100644 index dbc08c7760c6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.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 Maps - module FleetEngine - module V1 - # A RequestHeader contains fields common to all Fleet Engine RPC requests. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as en-US or sr-Latn. For more information, - # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class RequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb deleted file mode 100644 index 024d9a7221d4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Traffic density indicator on a contiguous segment of a path. Given a path - # with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval - # defines an interval and describes its traffic using the following categories. - # @!attribute [rw] start_polyline_point_index - # @return [::Integer] - # The starting index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] end_polyline_point_index - # @return [::Integer] - # The ending index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] speed - # @return [::Google::Maps::FleetEngine::V1::SpeedReadingInterval::Speed] - # Traffic speed in this interval. - class SpeedReadingInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The classification of polyline speed based on traffic data. - module Speed - # Default value. This value is unused. - SPEED_UNSPECIFIED = 0 - - # Normal speed, no traffic delays. - NORMAL = 1 - - # Slowdown detected, medium amount of traffic. - SLOW = 2 - - # Traffic delays. - TRAFFIC_JAM = 3 - end - end - - # Traffic density along a Vehicle's path. - # @!attribute [rw] speed_reading_interval - # @return [::Array<::Google::Maps::FleetEngine::V1::SpeedReadingInterval>] - # Traffic speed along the path from the previous waypoint to the current - # waypoint. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The path the driver is taking from the previous waypoint to the current - # waypoint. This path has landmarks in it so clients can show traffic markers - # along the path (see `speed_reading_interval`). Decoding is not yet - # supported. - class ConsumableTrafficPolyline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb deleted file mode 100644 index 4bf45f469f13..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ /dev/null @@ -1,312 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # CreateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] trip_id - # @return [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - class CreateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @!attribute [rw] remaining_waypoints_version - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @!attribute [rw] route_format_type - # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @!attribute [rw] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @!attribute [rw] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - class GetTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReportBillableTrip request message. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @!attribute [rw] country_code - # @return [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @!attribute [rw] related_ids - # @return [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @!attribute [rw] solution_type - # @return [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - class ReportBillableTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Selector for different solution types of a reported trip. - module SolutionType - # The default value. For backwards-compatibility, the API will use - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first - # supported solution type. - SOLUTION_TYPE_UNSPECIFIED = 0 - - # The solution is an on-demand ridesharing and deliveries trip. - ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1 - end - end - - # UpdateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - class UpdateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @!attribute [rw] active_trips_only - # @return [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @!attribute [rw] page_size - # @return [::Integer] - # If not set, the server decides the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @!attribute [rw] minimum_staleness - # @return [::Google::Protobuf::Duration] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - class SearchTripsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips response message. - # @!attribute [rw] trips - # @return [::Array<::Google::Maps::FleetEngine::V1::Trip>] - # The list of trips for the requested vehicle. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the SearchTripsRequest to page through list results. The - # API returns a trip list on each call, and when no more results remain the - # trip list is empty. - class SearchTripsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb deleted file mode 100644 index e5dd08d4fdac..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Trip metadata. - # @!attribute [r] name - # @return [::String] - # Output only. In the format "providers/\\{provider}/trips/\\{trip}" - # @!attribute [rw] vehicle_id - # @return [::String] - # ID of the vehicle making this trip. - # @!attribute [rw] trip_status - # @return [::Google::Maps::FleetEngine::V1::TripStatus] - # Current status of the trip. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # The type of the trip. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be picked up. - # @!attribute [rw] actual_pickup_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual location when and where customer was picked up. - # This field is for provider to provide feedback on actual pickup - # information. - # @!attribute [rw] actual_pickup_arrival_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location of the driver arrival at - # the pickup point. - # This field is for provider to provide feedback on actual arrival - # information at the pickup point. - # @!attribute [r] pickup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # picked up, or the actual time when they were picked up. - # @!attribute [rw] intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Intermediate stops in order that the trip requests (in addition - # to pickup and dropoff). Initially this will not be supported for shared - # trips. - # @!attribute [rw] intermediate_destinations_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the last time the `intermediate_destinations` was modified. - # Your server should cache this value and pass it in `UpdateTripRequest` - # when update `intermediate_destination_index` to ensure the - # `intermediate_destinations` is not changed. - # @!attribute [rw] intermediate_destination_index - # @return [::Integer] - # When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number - # between [0..N-1] indicating which intermediate destination the vehicle will - # cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a - # number between [0..N-1] indicating which intermediate destination the - # vehicle is at. The provider sets this value. If there are no - # `intermediate_destinations`, this field is ignored. - # @!attribute [rw] actual_intermediate_destination_arrival_points - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location of the driver's arrival at - # an intermediate destination. - # This field is for provider to provide feedback on actual arrival - # information at intermediate destinations. - # @!attribute [rw] actual_intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location when and where the customer was - # picked up from an intermediate destination. This field is for provider to - # provide feedback on actual pickup information at intermediate destinations. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be dropped off. - # @!attribute [rw] actual_dropoff_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location when and where customer was - # dropped off. This field is for provider to provide feedback on actual - # dropoff information. - # @!attribute [r] dropoff_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # dropped off at the final destination, or the actual time when they were - # dropped off. - # @!attribute [r] remaining_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # Output only. The full path from the current location to the dropoff point, - # inclusive. This path could include waypoints from other trips. - # @!attribute [rw] vehicle_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # This field supports manual ordering of the waypoints for the trip. It - # contains all of the remaining waypoints for the assigned vehicle, as well - # as the pickup and drop-off waypoints for this trip. If the trip hasn't been - # assigned to a vehicle, then Fleet Engine ignores this field. For privacy - # reasons, this field is only populated by the server on `UpdateTrip` and - # `CreateTrip` calls, NOT on `GetTrip` calls. - # @!attribute [r] route - # @return [::Array<::Google::Type::LatLng>] - # Output only. Anticipated route for this trip to the first entry in - # remaining_waypoints. Note that the first waypoint may belong to a different - # trip. - # @!attribute [r] current_route_segment - # @return [::String] - # Output only. An encoded path to the next waypoint. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the route was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # Output only. Indicates the traffic conditions along the - # `current_route_segment` when they're available. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the `current_route_segment_traffic` - # was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # Output only. The waypoint where `current_route_segment` ends. - # @!attribute [r] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The remaining driving distance in the `current_route_segment` - # field. The value is unspecified if the trip is not assigned to a vehicle, - # or the trip is completed or cancelled. - # @!attribute [r] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # Output only. The ETA to the next waypoint (the first entry in the - # `remaining_waypoints` field). The value is unspecified if the trip is not - # assigned to a vehicle, or the trip is inactive (completed or cancelled). - # @!attribute [r] remaining_time_to_first_waypoint - # @return [::Google::Protobuf::Duration] - # Output only. The duration from when the Trip data is returned to the time - # in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is - # not assigned to a vehicle, or the trip is inactive (completed or - # cancelled). - # @!attribute [r] remaining_waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time that `remaining_waypoints` was changed - # (a waypoint was added, removed, or changed). - # @!attribute [r] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the - # `remaining_waypoints.path_to_waypoint` and - # `remaining_waypoints.traffic_to_waypoint` were modified. Your client app - # should cache this value and pass it in `GetTripRequest` to ensure the - # paths and traffic for `remaining_waypoints` are only returned if updated. - # @!attribute [rw] number_of_passengers - # @return [::Integer] - # Immutable. Indicates the number of passengers on this trip and does not - # include the driver. A vehicle must have available capacity to be returned - # in a `SearchVehicles` response. - # @!attribute [r] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Output only. Indicates the last reported location of the vehicle along the - # route. - # @!attribute [r] last_location_snappable - # @return [::Boolean] - # Output only. Indicates whether the vehicle's `last_location` can be snapped - # to the current_route_segment. False if `last_location` or - # `current_route_segment` doesn't exist. - # It is computed by Fleet Engine. Any update from clients will be ignored. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that are populated and how they should be - # interpreted. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] - # A list of custom Trip attributes. Each attribute must have a unique key. - class Trip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The actual location where a stop (pickup/dropoff) happened. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the actual location. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates when the stop happened. - # @!attribute [rw] stop_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Input only. Deprecated. Use the timestamp field. - class StopLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of a trip indicating its progression. - module TripStatus - # Default, used for unspecified or unrecognized trip status. - UNKNOWN_TRIP_STATUS = 0 - - # Newly created trip. - NEW = 1 - - # The driver is on their way to the pickup point. - ENROUTE_TO_PICKUP = 2 - - # The driver has arrived at the pickup point. - ARRIVED_AT_PICKUP = 3 - - # The driver has arrived at an intermediate destination and is waiting for - # the rider. - ARRIVED_AT_INTERMEDIATE_DESTINATION = 7 - - # The driver is on their way to an intermediate destination - # (not the dropoff point). - ENROUTE_TO_INTERMEDIATE_DESTINATION = 8 - - # The driver has picked up the rider and is on their way to the - # next destination. - ENROUTE_TO_DROPOFF = 4 - - # The rider has been dropped off and the trip is complete. - COMPLETE = 5 - - # The trip was canceled prior to pickup by the driver, rider, or - # rideshare provider. - CANCELED = 6 - end - - # A set of values that indicate upon which platform the request was issued. - module BillingPlatformIdentifier - # Default. Used for unspecified platforms. - BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0 - - # The platform is a client server. - SERVER = 1 - - # The platform is a web browser. - WEB = 2 - - # The platform is an Android mobile device. - ANDROID = 3 - - # The platform is an IOS mobile device. - IOS = 4 - - # Other platforms that are not listed in this enumeration. - OTHERS = 5 - end - - # Selector for different sets of Trip fields in a `GetTrip` response. See - # [AIP-157](https://google.aip.dev/157) for context. Additional views are - # likely to be added. - module TripView - # The default value. For backwards-compatibility, the API will default to an - # SDK view. To ensure stability and support, customers are - # advised to select a `TripView` other than `SDK`. - TRIP_VIEW_UNSPECIFIED = 0 - - # Includes fields that may not be interpretable or supportable using - # publicly available libraries. - SDK = 1 - - # Trip fields are populated for the Journey Sharing use case. This view is - # intended for server-to-server communications. - JOURNEY_SHARING_V1S = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb deleted file mode 100644 index 501bd43c50a3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +++ /dev/null @@ -1,674 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # `CreateVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - class CreateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `GetVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @!attribute [rw] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - class GetVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - class UpdateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - class UpdateVehicleAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` response message. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The updated full list of vehicle attributes, including new, - # altered, and untouched attributes. - class UpdateVehicleAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `SearchVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Required. The pickup point to search near. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @!attribute [rw] pickup_radius_meters - # @return [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @!attribute [rw] count - # @return [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @!attribute [rw] minimum_capacity - # @return [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @!attribute [rw] vehicle_types - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] order_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @!attribute [rw] include_back_to_back - # @return [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @!attribute [rw] trip_id - # @return [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @!attribute [rw] current_trips_present - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - class SearchVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the order of the vehicle matches in the response. - module VehicleMatchOrder - # Default, used for unspecified or unrecognized vehicle matches order. - UNKNOWN_VEHICLE_MATCH_ORDER = 0 - - # Ascending order by vehicle driving time to the pickup point. - PICKUP_POINT_ETA = 1 - - # Ascending order by vehicle driving distance to the pickup point. - PICKUP_POINT_DISTANCE = 2 - - # Ascending order by vehicle driving time to the dropoff point. This order - # can only be used if the dropoff point is specified in the request. - DROPOFF_POINT_ETA = 3 - - # Ascending order by straight-line distance from the vehicle's last - # reported location to the pickup point. - PICKUP_POINT_STRAIGHT_DISTANCE = 4 - - # Ascending order by the configured match cost. Match cost is defined as a - # weighted calculation between straight-line distance and ETA. Weights are - # set with default values and can be modified per customer. Please contact - # Google support if these weights need to be modified for your project. - COST = 5 - end - - # Specifies the types of restrictions on a vehicle's current trips. - module CurrentTripsPresent - # The availability of vehicles with trips present is governed by the - # `include_back_to_back` field. - CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0 - - # Vehicles without trips can appear in search results. When this value is - # used, `include_back_to_back` cannot be `true`. - NONE = 1 - - # Vehicles with at most 5 current trips and 10 waypoints are included - # in the search results. When this value is used, `include_back_to_back` - # cannot be `true`. - ANY = 2 - end - end - - # `SearchVehicles` response message. - # @!attribute [rw] matches - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>] - # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered - # according to `SearchVehiclesRequest.order_by` field. - class SearchVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @!attribute [rw] page_token - # @return [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @!attribute [rw] minimum_capacity - # @return [::Google::Protobuf::Int32Value] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @!attribute [rw] vehicle_type_categories - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @!attribute [rw] on_trip_only - # @return [::Boolean] - # Only return the vehicles with current trip(s). - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` response message. - # @!attribute [rw] vehicles - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>] - # Vehicles matching the criteria in the request. - # The maximum number of vehicles returned is determined by the `page_size` - # field in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of vehicles, or empty if there are no - # more vehicles that meet the request criteria. - # @!attribute [rw] total_size - # @return [::Integer] - # Required. Total number of vehicles matching the request criteria across all - # pages. - class ListVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes intermediate points along a route for a `VehicleMatch` in a - # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in - # all other endpoints. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # The location of this waypoint. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time that the vehicle will arrive at this waypoint. - class Waypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the vehicle and related estimates for a vehicle that match the - # points of active trips for the vehicle `SearchVehiclesRequest`. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. A vehicle that matches the request. - # @!attribute [rw] vehicle_pickup_eta - # @return [::Google::Protobuf::Timestamp] - # The vehicle's driving ETA to the pickup point specified in the - # request. An empty value indicates a failure in calculating ETA for the - # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and - # this vehicle has an active trip, `vehicle_pickup_eta` includes the time - # required to complete the current active trip. - # @!attribute [rw] vehicle_pickup_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The distance from the Vehicle's current location to the pickup point - # specified in the request, including any intermediate pickup or dropoff - # points for existing trips. This distance comprises the calculated driving - # (route) distance, plus the straight line distance between the navigation - # end point and the requested pickup point. (The distance between the - # navigation end point and the requested pickup point is typically small.) An - # empty value indicates an error in calculating the distance. - # @!attribute [rw] vehicle_pickup_straight_line_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Required. The straight-line distance between the vehicle and the pickup - # point specified in the request. - # @!attribute [rw] vehicle_dropoff_eta - # @return [::Google::Protobuf::Timestamp] - # The complete vehicle's driving ETA to the drop off point specified in the - # request. The ETA includes stopping at any waypoints before the - # `dropoff_point` specified in the request. The value will only be populated - # when a drop off point is specified in the request. An empty value indicates - # an error calculating the ETA. - # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The vehicle's driving distance (in meters) from the pickup point - # to the drop off point specified in the request. The distance is only - # between the two points and does not include the vehicle location or any - # other points that must be visited before the vehicle visits either the - # pickup point or dropoff point. The value will only be populated when a - # `dropoff_point` is specified in the request. An empty value indicates - # a failure in calculating the distance from the pickup to - # drop off point specified in the request. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # Required. The trip type of the request that was used to calculate the ETA - # to the pickup point. - # @!attribute [rw] vehicle_trips_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>] - # The ordered list of waypoints used to calculate the ETA. The list - # includes vehicle location, the pickup points of active - # trips for the vehicle, and the pickup points provided in the - # request. An empty list indicates a failure in calculating ETA for the - # vehicle. - # @!attribute [rw] vehicle_match_type - # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType] - # Type of the vehicle match. - # @!attribute [rw] requested_ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `ordered_by`. - # @!attribute [rw] ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `requested_ordered_by`. - class VehicleMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of vehicle match. - module VehicleMatchType - # Unknown vehicle match type - UNKNOWN = 0 - - # The vehicle currently has no trip assigned to it and can proceed to the - # pickup point. - EXCLUSIVE = 1 - - # The vehicle is currently assigned to a trip, but can proceed to the - # pickup point after completing the in-progress trip. ETA and distance - # calculations take the existing trip into account. - BACK_TO_BACK = 2 - - # The vehicle has sufficient capacity for a shared ride. - CARPOOL = 3 - - # The vehicle will finish its current, active trip before proceeding to the - # pickup point. ETA and distance calculations take the existing trip into - # account. - CARPOOL_BACK_TO_BACK = 4 - end - end - - # A list-of-lists datatype for vehicle attributes. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # A list of attributes in this collection. - class VehicleAttributeList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb deleted file mode 100644 index 59703d2da0b2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb +++ /dev/null @@ -1,365 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Vehicle metadata. - # @!attribute [r] name - # @return [::String] - # Output only. The unique name for this vehicle. - # The format is `providers/{provider}/vehicles/{vehicle}`. - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # The vehicle state. - # @!attribute [rw] supported_trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Trip types supported by this vehicle. - # @!attribute [r] current_trips - # @return [::Array<::String>] - # Output only. List of `trip_id`'s for trips currently assigned to this - # vehicle. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Last reported location of the vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleLocation>] - # Input only. Locations where this vehicle has been in the past that haven't - # yet been reported to Fleet Engine. This is used in `UpdateVehicleRequest` - # to record locations which were previously unable to be sent to the server. - # Typically this happens when the vehicle does not have internet - # connectivity. - # @!attribute [rw] maximum_capacity - # @return [::Integer] - # The total numbers of riders this vehicle can carry. The driver is not - # considered in this value. This value must be greater than or equal to one. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # List of vehicle attributes. A vehicle can have at most 100 - # attributes, and each attribute must have a unique key. - # @!attribute [rw] vehicle_type - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType] - # Required. The type of this vehicle. Can be used to filter vehicles in - # `SearchVehicles` results. Also influences ETA and route calculations. - # @!attribute [rw] license_plate - # @return [::Google::Maps::FleetEngine::V1::LicensePlate] - # License plate information for the vehicle. - # @!attribute [rw] route - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Deprecated: Use `Vehicle.waypoints` instead. - # @!attribute [rw] current_route_segment - # @return [::String] - # The polyline specifying the route the driver app intends to take to - # the next waypoint. This list is also returned in - # `Trip.current_route_segment` for all active trips assigned to the vehicle. - # - # Note: This field is intended only for use by the Driver SDK. Decoding is - # not yet supported. - # @!attribute [rw] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::TrafficPolylineData] - # Input only. Fleet Engine uses this information to improve journey sharing. - # Note: This field is intended only for use by the Driver SDK. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when `current_route_segment` was set. It can be stored by - # the client and passed in future `GetVehicle` requests to prevent returning - # routes that haven't changed. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # The waypoint where `current_route_segment` ends. This can be supplied by - # drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint - # `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual waypoint if it is - # not fully specified. This field is ignored in `UpdateVehicle` calls unless - # `current_route_segment` is also specified. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # This value is also returned in `Trip.remaining_distance_meters` for all - # active trips assigned to the vehicle. The value is unspecified if the - # `current_route_segment` field is empty. - # @!attribute [rw] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # The ETA to the first entry in the `waypoints` field. The value is - # unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] remaining_time_seconds - # @return [::Google::Protobuf::Int32Value] - # Input only. The remaining driving time for the `current_route_segment`. The - # value is unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. This value should match - # `eta_to_first_waypoint` - `current_time` if all parties are using the same - # clock. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # The remaining waypoints assigned to this Vehicle. - # @!attribute [r] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Last time the `waypoints` field was updated. Clients should - # cache this value and pass it in `GetVehicleRequest` to ensure the - # `waypoints` field is only returned if it is updated. - # @!attribute [rw] back_to_back_enabled - # @return [::Boolean] - # Indicates if the driver accepts back-to-back trips. If `true`, - # `SearchVehicles` may include the vehicle even if it is currently assigned - # to a trip. The default value is `false`. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::V1::NavigationStatus] - # The vehicle's navigation status. - # @!attribute [rw] device_settings - # @return [::Google::Maps::FleetEngine::V1::DeviceSettings] - # Input only. Information about settings in the mobile device being used by - # the driver. - class Vehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of vehicle. - # @!attribute [rw] category - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category] - # Vehicle type category - class VehicleType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Vehicle type categories - module Category - # Default, used for unspecified or unrecognized vehicle categories. - UNKNOWN = 0 - - # An automobile. - AUTO = 1 - - # Any vehicle that acts as a taxi (typically licensed or regulated). - TAXI = 2 - - # Generally, a vehicle with a large storage capacity. - TRUCK = 3 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 4 - - # Human-powered transport. - BICYCLE = 5 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 6 - end - end - end - - # Information about the device's battery. - # @!attribute [rw] battery_status - # @return [::Google::Maps::FleetEngine::V1::BatteryStatus] - # Status of the battery, whether full or charging etc. - # @!attribute [rw] power_source - # @return [::Google::Maps::FleetEngine::V1::PowerSource] - # Status of battery power source. - # @!attribute [rw] battery_percentage - # @return [::Float] - # Current battery percentage [0-100]. - class BatteryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about various settings on the mobile device. - # @!attribute [rw] location_power_save_mode - # @return [::Google::Maps::FleetEngine::V1::LocationPowerSaveMode] - # How location features are set to behave on the device when battery saver is - # on. - # @!attribute [rw] is_power_save_mode - # @return [::Boolean] - # Whether the device is currently in power save mode. - # @!attribute [rw] is_interactive - # @return [::Boolean] - # Whether the device is in an interactive state. - # @!attribute [rw] battery_info - # @return [::Google::Maps::FleetEngine::V1::BatteryInfo] - # Information about the battery state. - class DeviceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The license plate information of the Vehicle. To avoid storing - # personally-identifiable information, only the minimum information - # about the license plate is stored as part of the entity. - # @!attribute [rw] country_code - # @return [::String] - # Required. CLDR Country/Region Code. For example, `US` for United States, - # or `IN` for India. - # @!attribute [rw] last_character - # @return [::String] - # The last digit of the license plate or "-1" to denote no numeric value - # is present in the license plate. - # - # * "ABC 1234" -> "4" - # * "AB 123 CD" -> "3" - # * "ABCDEF" -> "-1" - class LicensePlate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how clients should color one portion of the polyline along the - # route. - # @!attribute [rw] road_stretch - # @return [::Array<::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch>] - # Optional. Road stretches that should be rendered along the polyline. - # Stretches are guaranteed to not overlap, and do not necessarily span the - # full route. - # - # In the absence of a road stretch to style, the client should apply the - # default for the route. - class VisualTrafficReportPolylineRendering - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # One road stretch that should be rendered. - # @!attribute [rw] style - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch::Style] - # Required. The style to apply. - # @!attribute [rw] offset_meters - # @return [::Integer] - # Required. The style should be applied between `[offset_meters, - # offset_meters + length_meters)`. - # @!attribute [rw] length_meters - # @return [::Integer] - # Required. The length of the path where to apply the style. - class RoadStretch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The traffic style, indicating traffic speed. - module Style - # No style selected. - STYLE_UNSPECIFIED = 0 - - # Traffic is slowing down. - SLOWER_TRAFFIC = 1 - - # There is a traffic jam. - TRAFFIC_JAM = 2 - end - end - end - - # Traffic conditions along the expected vehicle route. - # @!attribute [rw] traffic_rendering - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering] - # A polyline rendering of how fast traffic is for all regions along - # one stretch of a customer ride. - class TrafficPolylineData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of a `Vehicle`. - module VehicleState - # Default, used for unspecified or unrecognized vehicle states. - UNKNOWN_VEHICLE_STATE = 0 - - # The vehicle is not accepting new trips. Note: the vehicle may continue to - # operate in this state while completing a trip assigned to it. - OFFLINE = 1 - - # The vehicle is accepting new trips. - ONLINE = 2 - end - - # How location features are configured to behave on the mobile device when the - # devices "battery saver" feature is on. - # (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode()) - module LocationPowerSaveMode - # Undefined LocationPowerSaveMode - UNKNOWN_LOCATION_POWER_SAVE_MODE = 0 - - # Either the location providers shouldn't be affected by battery saver, or - # battery saver is off. - LOCATION_MODE_NO_CHANGE = 1 - - # The GPS based location provider should be disabled when battery saver is on - # and the device is non-interactive. - LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2 - - # All location providers should be disabled when battery saver is on and the - # device is non-interactive. - LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3 - - # All the location providers will be kept available, but location fixes - # should only be provided to foreground apps. - LOCATION_MODE_FOREGROUND_ONLY = 4 - - # Location will not be turned off, but LocationManager will throttle all - # requests to providers when the device is non-interactive. - LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5 - end - - # Status of the battery, whether full or charging etc. - module BatteryStatus - # Battery status unknown. - UNKNOWN_BATTERY_STATUS = 0 - - # Battery is being charged. - BATTERY_STATUS_CHARGING = 1 - - # Battery is discharging. - BATTERY_STATUS_DISCHARGING = 2 - - # Battery is full. - BATTERY_STATUS_FULL = 3 - - # Battery is not charging. - BATTERY_STATUS_NOT_CHARGING = 4 - - # Battery is low on power. - BATTERY_STATUS_POWER_LOW = 5 - end - - # Type of the charger being used to charge the battery. - module PowerSource - # Power source unknown. - UNKNOWN_POWER_SOURCE = 0 - - # Power source is an AC charger. - POWER_SOURCE_AC = 1 - - # Power source is a USB port. - POWER_SOURCE_USB = 2 - - # Power source is wireless. - POWER_SOURCE_WIRELESS = 3 - - # Battery is unplugged. - POWER_SOURCE_UNPLUGGED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index 593314b4cde5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object that represents a latitude/longitude pair. This is expressed as a - # pair of doubles to represent degrees latitude and degrees longitude. Unless - # specified otherwise, this object must conform to the - # - # WGS84 standard. Values must be within normalized ranges. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - class LatLng - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile deleted file mode 100644 index 1a35fc6011c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1", path: "../" -else - gem "google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json deleted file mode 100644 index a69f797d658e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetengine_v1_generated_TripService_CreateTrip_sync", - "title": "Snippet for the create_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#create_trip.", - "file": "trip_service/create_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#create_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "CreateTrip", - "full_name": "maps.fleetengine.v1.TripService.CreateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_GetTrip_sync", - "title": "Snippet for the get_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#get_trip.", - "file": "trip_service/get_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#get_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "GetTrip", - "full_name": "maps.fleetengine.v1.TripService.GetTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_DeleteTrip_sync", - "title": "Snippet for the delete_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#delete_trip.", - "file": "trip_service/delete_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#delete_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "DeleteTrip", - "full_name": "maps.fleetengine.v1.TripService.DeleteTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_ReportBillableTrip_sync", - "title": "Snippet for the report_billable_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip.", - "file": "trip_service/report_billable_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "report_billable_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ReportBillableTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "ReportBillableTrip", - "full_name": "maps.fleetengine.v1.TripService.ReportBillableTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_SearchTrips_sync", - "title": "Snippet for the search_trips call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#search_trips.", - "file": "trip_service/search_trips.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_trips", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#search_trips", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchTripsRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchTripsResponse", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "SearchTrips", - "full_name": "maps.fleetengine.v1.TripService.SearchTrips", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_UpdateTrip_sync", - "title": "Snippet for the update_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#update_trip.", - "file": "trip_service/update_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#update_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "UpdateTrip", - "full_name": "maps.fleetengine.v1.TripService.UpdateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_CreateVehicle_sync", - "title": "Snippet for the create_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle.", - "file": "vehicle_service/create_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "CreateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.CreateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_GetVehicle_sync", - "title": "Snippet for the get_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle.", - "file": "vehicle_service/get_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "GetVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.GetVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_DeleteVehicle_sync", - "title": "Snippet for the delete_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle.", - "file": "vehicle_service/delete_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "DeleteVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.DeleteVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicle_sync", - "title": "Snippet for the update_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle.", - "file": "vehicle_service/update_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync", - "title": "Snippet for the update_vehicle_attributes call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes.", - "file": "vehicle_service/update_vehicle_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle_attributes", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicleAttributes", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicleAttributes", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_ListVehicles_sync", - "title": "Snippet for the list_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles.", - "file": "vehicle_service/list_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ListVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::ListVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "ListVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.ListVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_SearchVehicles_sync", - "title": "Snippet for the search_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles.", - "file": "vehicle_service/search_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "SearchVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.SearchVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "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-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb deleted file mode 100644 index 471ee490d00d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_CreateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#create_trip. -# -def create_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - - # Call the create_trip method. - result = client.create_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_CreateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb deleted file mode 100644 index 892398e76959..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_DeleteTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#delete_trip. -# -def delete_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - - # Call the delete_trip method. - result = client.delete_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_DeleteTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb deleted file mode 100644 index d02ae4f6720c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_GetTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#get_trip. -# -def get_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetTripRequest.new - - # Call the get_trip method. - result = client.get_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_GetTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb deleted file mode 100644 index 66c560dccfb5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_ReportBillableTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the report_billable_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip. -# -def report_billable_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - - # Call the report_billable_trip method. - result = client.report_billable_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_ReportBillableTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb deleted file mode 100644 index 213ca35edfd8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_SearchTrips_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_trips call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#search_trips. -# -def search_trips - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - - # Call the search_trips method. - result = client.search_trips request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - p item - end -end -# [END fleetengine_v1_generated_TripService_SearchTrips_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb deleted file mode 100644 index caca64f14dad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_UpdateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#update_trip. -# -def update_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - - # Call the update_trip method. - result = client.update_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_UpdateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb deleted file mode 100644 index 70db086501d6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_CreateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle. -# -def create_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - - # Call the create_vehicle method. - result = client.create_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_CreateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb deleted file mode 100644 index c040d402cb0b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle. -# -def delete_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - - # Call the delete_vehicle method. - result = client.delete_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb deleted file mode 100644 index 4872490fa433..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_GetVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle. -# -def get_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - - # Call the get_vehicle method. - result = client.get_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_GetVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb deleted file mode 100644 index 1119502e68a1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_ListVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the list_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles. -# -def list_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - - # Call the list_vehicles method. - result = client.list_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - p item - end -end -# [END fleetengine_v1_generated_VehicleService_ListVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb deleted file mode 100644 index e28a620bb8ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_SearchVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles. -# -def search_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - - # Call the search_vehicles method. - result = client.search_vehicles request - - # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_SearchVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb deleted file mode 100644 index 87e5b21b85ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle. -# -def update_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - - # Call the update_vehicle method. - result = client.update_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb deleted file mode 100644 index abf97493f162..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle_attributes call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes. -# -def update_vehicle_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - - # Call the update_vehicle_attributes method. - result = client.update_vehicle_attributes request - - # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb deleted file mode 100644 index f1ddb3264a50..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trip_path provider: "value0", trip: "value1" - assert_equal "providers/value0/trips/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb deleted file mode 100644 index a6042f765747..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest" - - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_create_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_count - end - end - end - - def test_get_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_get_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_count - end - end - end - - def test_delete_trip - # 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. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_delete_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_trip({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_trip header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_trip({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_trip_client_stub.call_count - end - end - end - - def test_report_billable_trip - # 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" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_report_billable_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, report_billable_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_count - end - end - end - - def test_search_trips - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_search_trips_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_trips_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_trips_client_stub.call_count - end - end - end - - def test_update_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_update_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb deleted file mode 100644 index 38356c41018f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ /dev/null @@ -1,505 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["trip_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_rpc_count - end - end - - def test_get_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal :TRIP_VIEW_UNSPECIFIED, request["view"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_version"] - assert_equal :UNKNOWN_FORMAT_TYPE, request["route_format_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_traffic_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_route_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_rpc_count - end - end - - def test_delete_trip - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_trip({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_trip header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_trip({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, 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_trip_client_stub.call_rpc_count - end - end - - def test_report_billable_trip - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report_billable_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["country_code"] - assert_equal :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED, request["platform"] - assert_equal ["hello world"], request["related_ids"] - assert_equal :SOLUTION_TYPE_UNSPECIFIED, request["solution_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_billable_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_rpc_count - end - end - - def test_search_trips - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_trips, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchTripsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal true, request["active_trips_only"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["minimum_staleness"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_trips_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_trips_client_stub.call_rpc_count - end - end - - def test_update_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::TripService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb deleted file mode 100644 index 104283f54a4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/vehicles/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb deleted file mode 100644 index e5e9ed6215e7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_create_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_count - end - end - end - - def test_get_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_get_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_count - end - end - end - - def test_delete_vehicle - # 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. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_delete_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle_attributes - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_vehicle_attributes header: header, name: name, attributes: attributes do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_count - end - end - end - - def test_list_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_list_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_count - end - end - end - - def test_search_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_search_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb deleted file mode 100644 index f20a91100c3a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ /dev/null @@ -1,601 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_rpc_count - end - end - - def test_get_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["waypoints_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_vehicle - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle_attributes - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle_attributes, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["attributes"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_vehicle_attributes header: header, name: name, attributes: attributes do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_rpc_count - end - end - - def test_list_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_equal [:UNKNOWN], request["vehicle_type_categories"] - assert_equal ["hello world"], request["required_attributes"] - assert_equal ["hello world"], request["required_one_of_attributes"] - assert_equal ["hello world"], request["required_one_of_attribute_sets"] - assert_equal :UNKNOWN_VEHICLE_STATE, request["vehicle_state"] - assert_equal true, request["on_trip_only"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_rpc_count - end - end - - def test_search_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["pickup_point"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["dropoff_point"] - assert_equal 42, request["pickup_radius_meters"] - assert_equal 42, request["count"] - assert_equal 42, request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_kind_of ::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, request["vehicle_types"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["required_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attribute_sets"].first - assert_equal :UNKNOWN_VEHICLE_MATCH_ORDER, request["order_by"] - assert_equal true, request["include_back_to_back"] - assert_equal "hello world", request["trip_id"] - assert_equal :CURRENT_TRIPS_PRESENT_UNSPECIFIED, request["current_trips_present"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_vehicles_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-css-v1/.gitignore b/owl-bot-staging/google-shopping-css-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json deleted file mode 100644 index 4ce57214d802..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "css.googleapis.com", - "api_shortname": "css", - "client_documentation": "https://rubydoc.info/gems/google-shopping-css-v1", - "distribution_name": "google-shopping-css-v1", - "is_cloud": false, - "language": "ruby", - "name": "css", - "name_pretty": "CSS V1 API", - "product_documentation": "https://developers.google.com/comparison-shopping-services/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/comparison-shopping-services/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml deleted file mode 100644 index b53d398f0a64..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-css-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-shopping-css-v1.rb" diff --git a/owl-bot-staging/google-shopping-css-v1/.toys.rb b/owl-bot-staging/google-shopping-css-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.yardopts b/owl-bot-staging/google-shopping-css-v1/.yardopts deleted file mode 100644 index f293265f462f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="CSS 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-shopping-css-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md deleted file mode 100644 index bd124d2e6f59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-css-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-shopping-css-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/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/css/v1" - -::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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/shopping/css/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-css-v1/Gemfile b/owl-bot-staging/google-shopping-css-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-css-v1/LICENSE.md b/owl-bot-staging/google-shopping-css-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/README.md b/owl-bot-staging/google-shopping-css-v1/README.md deleted file mode 100644 index d415042608c0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the CSS V1 API - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the CSS V1 API. Most users should consider using -the main client gem, -[google-shopping-css](https://rubygems.org/gems/google-shopping-css). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-css-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/css.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new -request = ::Google::Shopping::Css::V1::ListChildAccountsRequest.new # (request fields as keyword arguments...) -response = client.list_child_accounts request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-css-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/comparison-shopping-services/api) -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/shopping/css/v1" -require "logger" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-css`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-css-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-shopping-css`. -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-shopping-css-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-shopping-css-v1/Rakefile b/owl-bot-staging/google-shopping-css-v1/Rakefile deleted file mode 100644 index 635d913938d1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-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/shopping/css/v1/accounts_service/credentials" - ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-css-v1" - header "google-shopping-css-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-css-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json deleted file mode 100644 index 752bb921cc5e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.css.v1", - "libraryPackage": "::Google::Shopping::Css::V1", - "services": { - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountsService::Client", - "rpcs": { - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - } - } - }, - "AccountLabelsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountLabelsService::Client", - "rpcs": { - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - } - } - } - } - }, - "CssProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductInputsService::Client", - "rpcs": { - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - }, - "UpdateCssProductInput": { - "methods": [ - "update_css_product_input" - ] - }, - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - } - } - } - } - }, - "CssProductsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductsService::Client", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - } - } - }, - "QuotaService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::QuotaService::Client", - "rpcs": { - "ListQuotaGroups": { - "methods": [ - "list_quota_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec deleted file mode 100644 index 691a6b20a1da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/css/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-css-v1" - gem.version = Google::Shopping::Css::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details." - gem.summary = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb deleted file mode 100644 index a93e9af0be45..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-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/shopping/css/v1" diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb deleted file mode 100644 index d1249eab068b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_service" -require "google/shopping/css/v1/account_labels_service" -require "google/shopping/css/v1/css_product_inputs_service" -require "google/shopping/css/v1/css_products_service" -require "google/shopping/css/v1/quota_service" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/css/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb deleted file mode 100644 index bd9585d09cc4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/client" -require "google/shopping/css/v1/account_labels_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/account_labels_service" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_labels_service", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb deleted file mode 100644 index f12cbcd80856..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb +++ /dev/null @@ -1,785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - ## - # Client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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/shopping/css/v1/accounts_labels_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 - - @account_labels_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountLabelsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :list_account_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :create_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_label&.name - header_params["account_label.name"] = request.account_label.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :update_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :delete_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountLabelsService API. - # - # This class represents the configuration for AccountLabelsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb deleted file mode 100644 index 0e7c2cfdd5da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Credentials for the AccountLabelsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb deleted file mode 100644 index 2f421e27577b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Path helper methods for the AccountLabelsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountLabel resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/labels/{label}` - # - # @param account [String] - # @param label [String] - # - # @return [::String] - def account_label_path account:, label: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/labels/#{label}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb deleted file mode 100644 index 728b66d6ac46..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb deleted file mode 100644 index 0a653f5e9a25..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +++ /dev/null @@ -1,714 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::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 - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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 - - @account_labels_service_stub = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.list_account_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, "account_labels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to an 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.create_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.update_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.delete_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountLabelsService REST API. - # - # This class represents the configuration for AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb deleted file mode 100644 index a9b8cb91fe84..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST service stub for the AccountLabelsService 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_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # A result object deserialized from the server's reply - def list_account_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.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_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def create_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def update_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/labels", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # 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_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/labels", - body: "account_label", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{account_label.name}", - body: "account_label", - matches: [ - ["account_label.name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb deleted file mode 100644 index 91f38e92911a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts_labels.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n,google/shopping/css/v1/accounts_labels.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x03\n\x0c\x41\x63\x63ountLabel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08label_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\naccount_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tH\x01\x88\x01\x01\x12G\n\nlabel_type\x18\x06 \x01(\x0e\x32..google.shopping.css.v1.AccountLabel.LabelTypeB\x03\xe0\x41\x03\"B\n\tLabelType\x12\x1a\n\x16LABEL_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:d\xea\x41\x61\n\x1f\x63ss.googleapis.com/AccountLabel\x12!accounts/{account}/labels/{label}*\raccountLabels2\x0c\x61\x63\x63ountLabelB\x0f\n\r_display_nameB\x0e\n\x0c_description\"z\n\x18ListAccountLabelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x19ListAccountLabelsResponse\x12<\n\x0e\x61\x63\x63ount_labels\x18\x01 \x03(\x0b\x32$.google.shopping.css.v1.AccountLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x19\x43reateAccountLabelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12@\n\raccount_label\x18\x02 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"]\n\x19UpdateAccountLabelRequest\x12@\n\raccount_label\x18\x01 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"R\n\x19\x44\x65leteAccountLabelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ss.googleapis.com/AccountLabel2\x97\x06\n\x14\x41\x63\x63ountLabelsService\x12\xa9\x01\n\x11ListAccountLabels\x12\x30.google.shopping.css.v1.ListAccountLabelsRequest\x1a\x31.google.shopping.css.v1.ListAccountLabelsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/labels\x12\xbb\x01\n\x12\x43reateAccountLabel\x12\x31.google.shopping.css.v1.CreateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"L\xda\x41\x14parent,account_label\x82\xd3\xe4\x93\x02/\"\x1e/v1/{parent=accounts/*}/labels:\raccount_label\x12\xc2\x01\n\x12UpdateAccountLabel\x12\x31.google.shopping.css.v1.UpdateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"S\xda\x41\raccount_label\x82\xd3\xe4\x93\x02=2,/v1/{account_label.name=accounts/*/labels/*}:\raccount_label\x12\x8e\x01\n\x12\x44\x65leteAccountLabel\x12\x31.google.shopping.css.v1.DeleteAccountLabelRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=accounts/*/labels/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb5\x01\n\x1a\x63om.google.shopping.css.v1B\x13\x41\x63\x63ountsLabelsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - AccountLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel").msgclass - AccountLabel::LabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel.LabelType").enummodule - ListAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsRequest").msgclass - ListAccountLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsResponse").msgclass - CreateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CreateAccountLabelRequest").msgclass - UpdateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelRequest").msgclass - DeleteAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteAccountLabelRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb deleted file mode 100644 index 1d0c4f3552e2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_labels_pb' - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Manages Merchant Center and CSS accounts labels. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountLabelsService' - - # Lists the labels owned by an account. - rpc :ListAccountLabels, ::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Google::Shopping::Css::V1::ListAccountLabelsResponse - # Creates a new label, not assigned to any account. - rpc :CreateAccountLabel, ::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Updates a label. - rpc :UpdateAccountLabel, ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Deletes a label and removes it from all accounts to which it was assigned. - rpc :DeleteAccountLabel, ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb deleted file mode 100644 index 4c0a1eaabeb1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n%google/shopping/css/v1/accounts.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x01\n\x18ListChildAccountsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x15\n\x08label_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tfull_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\t_label_idB\x0c\n\n_full_name\"g\n\x19ListChildAccountsResponse\x12\x31\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1f.google.shopping.css.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x89\x01\n\x11GetAccountRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x37\n\x06parent\x18\x02 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xa5\x01\n\x1aUpdateAccountLabelsRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x11\n\tlabel_ids\x18\x02 \x03(\x03\x12\x37\n\x06parent\x18\x03 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xbb\x04\n\x07\x41\x63\x63ount\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\tfull_name\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x0chomepage_uri\x18\x04 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x13\n\x06parent\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x11\n\tlabel_ids\x18\x06 \x03(\x03\x12\x1b\n\x13\x61utomatic_label_ids\x18\x07 \x03(\x03\x12\x46\n\x0c\x61\x63\x63ount_type\x18\x08 \x01(\x0e\x32+.google.shopping.css.v1.Account.AccountTypeB\x03\xe0\x41\x03\"\xc6\x01\n\x0b\x41\x63\x63ountType\x12\x1c\n\x18\x41\x43\x43OUNT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCSS_GROUP\x10\x01\x12\x0e\n\nCSS_DOMAIN\x10\x02\x12\x16\n\x12MC_PRIMARY_CSS_MCA\x10\x03\x12\x0e\n\nMC_CSS_MCA\x10\x04\x12\x16\n\x12MC_MARKETPLACE_MCA\x10\x05\x12\x10\n\x0cMC_OTHER_MCA\x10\x06\x12\x11\n\rMC_STANDALONE\x10\x07\x12\x15\n\x11MC_MCA_SUBACCOUNT\x10\x08:F\xea\x41\x43\n\x1a\x63ss.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x0f\n\r_display_nameB\x0f\n\r_homepage_uriB\t\n\x07_parent2\xa5\x04\n\x0f\x41\x63\x63ountsService\x12\xb4\x01\n\x11ListChildAccounts\x12\x30.google.shopping.css.v1.ListChildAccountsRequest\x1a\x31.google.shopping.css.v1.ListChildAccountsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=accounts/*}:listChildAccounts\x12~\n\nGetAccount\x12).google.shopping.css.v1.GetAccountRequest\x1a\x1f.google.shopping.css.v1.Account\"$\xda\x41\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=accounts/*}\x12\x99\x01\n\x0cUpdateLabels\x12\x32.google.shopping.css.v1.UpdateAccountLabelsRequest\x1a\x1f.google.shopping.css.v1.Account\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=accounts/*}:updateLabels:\x01*\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaf\x01\n\x1a\x63om.google.shopping.css.v1B\rAccountsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - ListChildAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsRequest").msgclass - ListChildAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsResponse").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetAccountRequest").msgclass - UpdateAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelsRequest").msgclass - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account").msgclass - Account::AccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account.AccountType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb deleted file mode 100644 index cbe6be04f569..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/client" -require "google/shopping/css/v1/accounts_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/accounts_service" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/css/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb deleted file mode 100644 index da91d95b8f0c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb +++ /dev/null @@ -1,709 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - ## - # Client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/css/v1/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_child_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_labels, request, 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 AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb deleted file mode 100644 index 4584fe4873de..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb deleted file mode 100644 index e069680bdb33..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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 Shopping - module Css - module V1 - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb deleted file mode 100644 index 996c51dd8cec..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb deleted file mode 100644 index 8a279b8f7067..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb +++ /dev/null @@ -1,645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_child_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_labels request, 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 AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Css::V1::AccountsService::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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb deleted file mode 100644 index afe5123dbfaa..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST service stub for the AccountsService 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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # A result object deserialized from the server's reply - def list_child_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_child_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_child_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def update_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_child_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:listChildAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateLabels", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb deleted file mode 100644 index 6528ad62148c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_pb' - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Service for managing CSS/MC account information. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountsService' - - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - rpc :ListChildAccounts, ::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Google::Shopping::Css::V1::ListChildAccountsResponse - # Retrieves a single CSS/MC account by ID. - rpc :GetAccount, ::Google::Shopping::Css::V1::GetAccountRequest, ::Google::Shopping::Css::V1::Account - # Updates labels assigned to CSS/MC accounts by a CSS domain. - rpc :UpdateLabels, ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Google::Shopping::Css::V1::Account - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb deleted file mode 100644 index bd5bfbf234cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_common.proto\x12\x16google.shopping.css.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xbc\x13\n\nAttributes\x12\x15\n\x08\x63pp_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63pp_mobile_link\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x63pp_ads_redirect\x18* \x01(\tH\x02\x88\x01\x01\x12.\n\tlow_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nhigh_price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1d\n\x10number_of_offers\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18headline_offer_condition\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x14headline_offer_price\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12 \n\x13headline_offer_link\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\'\n\x1aheadline_offer_mobile_link\x18\t \x01(\tH\x06\x88\x01\x01\x12\x42\n\x1dheadline_offer_shipping_price\x18) \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x12\n\x05title\x18\n \x01(\tH\x07\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x18\n\x0b\x64\x65scription\x18\r \x01(\tH\t\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x0e \x01(\tH\n\x88\x01\x01\x12\x10\n\x03mpn\x18\x0f \x01(\tH\x0b\x88\x01\x01\x12\x11\n\x04gtin\x18\x10 \x01(\tH\x0c\x88\x01\x01\x12\x15\n\rproduct_types\x18$ \x03(\t\x12$\n\x17google_product_category\x18\x11 \x01(\tH\r\x88\x01\x01\x12\x12\n\x05\x61\x64ult\x18\x12 \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\tmultipack\x18\x13 \x01(\x03H\x0f\x88\x01\x01\x12\x16\n\tis_bundle\x18\x14 \x01(\x08H\x10\x88\x01\x01\x12\x16\n\tage_group\x18\x15 \x01(\tH\x11\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x12\x88\x01\x01\x12\x13\n\x06gender\x18\x17 \x01(\tH\x13\x88\x01\x01\x12\x15\n\x08material\x18\x18 \x01(\tH\x14\x88\x01\x01\x12\x14\n\x07pattern\x18\x19 \x01(\tH\x15\x88\x01\x01\x12\x11\n\x04size\x18\x1a \x01(\tH\x16\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x1b \x01(\tH\x17\x88\x01\x01\x12\x12\n\nsize_types\x18\x1c \x03(\t\x12\x1a\n\ritem_group_id\x18\x1d \x01(\tH\x18\x88\x01\x01\x12>\n\x0fproduct_details\x18\x1e \x03(\x0b\x32%.google.shopping.css.v1.ProductDetail\x12=\n\x0eproduct_weight\x18\x1f \x01(\x0b\x32%.google.shopping.css.v1.ProductWeight\x12@\n\x0eproduct_length\x18 \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12?\n\rproduct_width\x18! \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12@\n\x0eproduct_height\x18\" \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12\x1a\n\x12product_highlights\x18# \x03(\t\x12=\n\x0e\x63\x65rtifications\x18\' \x03(\x0b\x32%.google.shopping.css.v1.Certification\x12\x33\n\x0f\x65xpiration_date\x18( \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15included_destinations\x18+ \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18, \x03(\t\x12\x12\n\x05pause\x18- \x01(\tH\x19\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18. \x01(\tH\x1a\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18/ \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18\x30 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18\x31 \x01(\tH\x1d\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18\x32 \x01(\tH\x1e\x88\x01\x01\x12T\n\x1aheadline_offer_installment\x18\x33 \x01(\x0b\x32\x30.google.shopping.css.v1.HeadlineOfferInstallment\x12_\n headline_offer_subscription_cost\x18\x34 \x01(\x0b\x32\x35.google.shopping.css.v1.HeadlineOfferSubscriptionCost\x12\x19\n\x0creview_count\x18\x36 \x01(\x03H\x1f\x88\x01\x01\x12\x17\n\nmin_rating\x18\x37 \x01(\x03H \x88\x01\x01\x12\x17\n\nmax_rating\x18\x38 \x01(\x03H!\x88\x01\x01\x12\x13\n\x06rating\x18\x39 \x01(\x01H\"\x88\x01\x01\x42\x0b\n\t_cpp_linkB\x12\n\x10_cpp_mobile_linkB\x13\n\x11_cpp_ads_redirectB\x13\n\x11_number_of_offersB\x1b\n\x19_headline_offer_conditionB\x16\n\x14_headline_offer_linkB\x1d\n\x1b_headline_offer_mobile_linkB\x08\n\x06_titleB\r\n\x0b_image_linkB\x0e\n\x0c_descriptionB\x08\n\x06_brandB\x06\n\x04_mpnB\x07\n\x05_gtinB\x1a\n\x18_google_product_categoryB\x08\n\x06_adultB\x0c\n\n_multipackB\x0c\n\n_is_bundleB\x0c\n\n_age_groupB\x08\n\x06_colorB\t\n\x07_genderB\x0b\n\t_materialB\n\n\x08_patternB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x10\n\x0e_item_group_idB\x08\n\x06_pauseB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x0f\n\r_review_countB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_rating\">\n\rCertification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x05\n\x10\x43ssProductStatus\x12X\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32:.google.shopping.css.v1.CssProductStatus.DestinationStatus\x12R\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x37.google.shopping.css.v1.CssProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x11\x44\x65stinationStatus\x12\x13\n\x0b\x64\x65stination\x18\x01 \x01(\t\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xc9\x01\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0bservability\x18\x02 \x01(\t\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"\x9f\x01\n\x1dHeadlineOfferSubscriptionCost\x12:\n\x06period\x18\x01 \x01(\x0e\x32*.google.shopping.css.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\x89\x01\n\x18HeadlineOfferInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x30\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductCommonProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Attributes").msgclass - Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Certification").msgclass - ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDetail").msgclass - ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDimension").msgclass - ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductWeight").msgclass - CssProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus").msgclass - CssProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.DestinationStatus").msgclass - CssProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.ItemLevelIssue").msgclass - HeadlineOfferSubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferSubscriptionCost").msgclass - HeadlineOfferInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferInstallment").msgclass - SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.SubscriptionPeriod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb deleted file mode 100644 index 4b67b42e62d4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_inputs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_inputs.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"\xa7\x03\n\x0f\x43ssProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nfinal_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fraw_provided_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x66reshness_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x36\n\nattributes\x18\x07 \x01(\x0b\x32\".google.shopping.css.v1.Attributes\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:`\xea\x41]\n\"css.googleapis.com/CssProductInput\x12\x37\x61\x63\x63ounts/{account}/cssProductInputs/{css_product_input}\"\xbb\x01\n\x1cInsertCssProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"css.googleapis.com/CssProductInput\x12G\n\x11\x63ss_product_input\x18\x02 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12\x16\n\x07\x66\x65\x65\x64_id\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x01\"\x98\x01\n\x1cUpdateCssProductInputRequest\x12G\n\x11\x63ss_product_input\x18\x01 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n\x1c\x44\x65leteCssProductInputRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"css.googleapis.com/CssProductInput\x12!\n\x14supplemental_feed_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x17\n\x15_supplemental_feed_id2\xb0\x05\n\x17\x43ssProductInputsService\x12\xc2\x01\n\x15InsertCssProductInput\x12\x34.google.shopping.css.v1.InsertCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"J\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accounts/*}/cssProductInputs:insert:\x11\x63ss_product_input\x12\xed\x01\n\x15UpdateCssProductInput\x12\x34.google.shopping.css.v1.UpdateCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"u\xda\x41\x1d\x63ss_product_input,update_mask\x82\xd3\xe4\x93\x02O2:/v1/{css_product_input.name=accounts/*/cssProductInputs/*}:\x11\x63ss_product_input\x12\x9e\x01\n\x15\x44\x65leteCssProductInput\x12\x34.google.shopping.css.v1.DeleteCssProductInputRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=accounts/*/cssProductInputs/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductInputsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - CssProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductInput").msgclass - InsertCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.InsertCssProductInputRequest").msgclass - UpdateCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateCssProductInputRequest").msgclass - DeleteCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteCssProductInputRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb deleted file mode 100644 index d9b82213398f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/client" -require "google/shopping/css/v1/css_product_inputs_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_product_inputs_service" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_product_inputs_service", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb deleted file mode 100644 index 79c357cee408..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +++ /dev/null @@ -1,716 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - ## - # Client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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/shopping/css/v1/css_product_inputs_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 - - @css_product_inputs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductInputsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :insert_css_product_input, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.css_product_input&.name - header_params["css_product_input.name"] = request.css_product_input.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :update_css_product_input, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :delete_css_product_input, request, 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 CssProductInputsService API. - # - # This class represents the configuration for CssProductInputsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb deleted file mode 100644 index 066f5ca9210d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Credentials for the CssProductInputsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb deleted file mode 100644 index b71796db1d3e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Path helper methods for the CssProductInputsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProductInput resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProductInputs/{css_product_input}` - # - # @param account [String] - # @param css_product_input [String] - # - # @return [::String] - def css_product_input_path account:, css_product_input: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProductInputs/#{css_product_input}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb deleted file mode 100644 index 06be63d42390..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb deleted file mode 100644 index 42512d523193..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +++ /dev/null @@ -1,652 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::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 - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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 - - @css_product_inputs_service_stub = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.insert_css_product_input request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.update_css_product_input request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.delete_css_product_input request, 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 CssProductInputsService REST API. - # - # This class represents the configuration for CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb deleted file mode 100644 index 3eb2aa0f1884..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST service stub for the CssProductInputsService 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def insert_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def update_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/cssProductInputs:insert", - body: "css_product_input", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{css_product_input.name}", - body: "css_product_input", - matches: [ - ["css_product_input.name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb deleted file mode 100644 index a872c72a6951..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_product_inputs_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductInputsService' - - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - rpc :InsertCssProductInput, ::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - rpc :UpdateCssProductInput, ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - rpc :DeleteCssProductInput, ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb deleted file mode 100644 index b23a373fe93d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_products.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/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n)google/shopping/css/v1/css_products.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"K\n\x14GetCssProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63ss.googleapis.com/CssProduct\"\xaa\x03\n\nCssProduct\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fraw_provided_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12;\n\nattributes\x18\x05 \x01(\x0b\x32\".google.shopping.css.v1.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\x06 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12I\n\x12\x63ss_product_status\x18\x08 \x01(\x0b\x32(.google.shopping.css.v1.CssProductStatusB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/CssProduct\x12,accounts/{account}/cssProducts/{css_product}*\x0b\x63ssProducts2\ncssProduct\"v\n\x16ListCssProductsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/CssProduct\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListCssProductsResponse\x12\x38\n\x0c\x63ss_products\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.CssProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x98\x03\n\x12\x43ssProductsService\x12\x95\x01\n\rGetCssProduct\x12,.google.shopping.css.v1.GetCssProductRequest\x1a\".google.shopping.css.v1.CssProduct\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=accounts/*/cssProducts/*}\x12\xa8\x01\n\x0fListCssProducts\x12..google.shopping.css.v1.ListCssProductsRequest\x1a/.google.shopping.css.v1.ListCssProductsResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=accounts/*}/cssProducts\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb2\x01\n\x1a\x63om.google.shopping.css.v1B\x10\x43ssProductsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - GetCssProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetCssProductRequest").msgclass - CssProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProduct").msgclass - ListCssProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsRequest").msgclass - ListCssProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb deleted file mode 100644 index ace56839641d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/client" -require "google/shopping/css/v1/css_products_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_products_service" - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_products_service", "helpers.rb" -require "google/shopping/css/v1/css_products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb deleted file mode 100644 index 5f43148a4403..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb +++ /dev/null @@ -1,606 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - ## - # Client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "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_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.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 CssProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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/shopping/css/v1/css_products_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 - - @css_products_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_css_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :get_css_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_css_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :list_css_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @css_products_service_stub, :list_css_products, request, response, 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 CssProductsService API. - # - # This class represents the configuration for CssProductsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb deleted file mode 100644 index 5656f955c92c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Credentials for the CssProductsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb deleted file mode 100644 index e311ef6467e0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Path helper methods for the CssProductsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProduct resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProducts/{css_product}` - # - # @param account [String] - # @param css_product [String] - # - # @return [::String] - def css_product_path account:, css_product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProducts/#{css_product}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb deleted file mode 100644 index 6c5a8ef0a46d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb deleted file mode 100644 index ca2c12860121..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb +++ /dev/null @@ -1,549 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "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_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.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 CssProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductsService::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 - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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 - - @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_css_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.get_css_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_css_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.list_css_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_products", request, result, 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 CssProductsService REST API. - # - # This class represents the configuration for CssProductsService 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::Shopping::Css::V1::CssProductsService::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_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb deleted file mode 100644 index d7eea4bfc0da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST service stub for the CssProductsService 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_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # A result object deserialized from the server's reply - def get_css_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_css_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_css_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProduct.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListCssProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListCssProductsResponse] - # A result object deserialized from the server's reply - def list_css_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_css_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_css_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListCssProductsResponse.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_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_css_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProducts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_css_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cssProducts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb deleted file mode 100644 index 50ec396539bb..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_products_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductsService' - - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - rpc :GetCssProduct, ::Google::Shopping::Css::V1::GetCssProductRequest, ::Google::Shopping::Css::V1::CssProduct - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - rpc :ListCssProducts, ::Google::Shopping::Css::V1::ListCssProductsRequest, ::Google::Shopping::Css::V1::ListCssProductsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb deleted file mode 100644 index 6f35b13b6859..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/quota.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n\"google/shopping/css/v1/quota.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0emethod_details\x18\x04 \x03(\x0b\x32%.google.shopping.css.v1.MethodDetailsB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/QuotaGroup\x12,accounts/{account}/quotaGroups/{quota_group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x80\x01\n\x16ListQuotaGroupsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/QuotaGroup\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\"l\n\x17ListQuotaGroupsResponse\x12\x38\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf5\x01\n\x0cQuotaService\x12\xa3\x01\n\x0fListQuotaGroups\x12..google.shopping.css.v1.ListQuotaGroupsRequest\x1a/.google.shopping.css.v1.ListQuotaGroupsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/quotas\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xac\x01\n\x1a\x63om.google.shopping.css.v1B\nQuotaProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.QuotaGroup").msgclass - MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.MethodDetails").msgclass - ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsRequest").msgclass - ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb deleted file mode 100644 index 8318f2e1b7a3..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/client" -require "google/shopping/css/v1/quota_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/quota_service" - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_service", "helpers.rb" -require "google/shopping/css/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb deleted file mode 100644 index cb7d6d1fe847..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb +++ /dev/null @@ -1,495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - ## - # Client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService 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/shopping/css/v1/quota_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::QuotaService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService API. - # - # This class represents the configuration for QuotaService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::QuotaService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb deleted file mode 100644 index 300c3137cdf6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Credentials for the QuotaService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb deleted file mode 100644 index d6952334dd8d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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 Shopping - module Css - module V1 - module QuotaService - # Path helper methods for the QuotaService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb deleted file mode 100644 index d008263afad8..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb deleted file mode 100644 index becee6c58f15..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb +++ /dev/null @@ -1,445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.list_quota_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService REST API. - # - # This class represents the configuration for QuotaService 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::Shopping::Css::V1::QuotaService::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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb deleted file mode 100644 index 0104aec48d94..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST service stub for the QuotaService 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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # A result object deserialized from the server's reply - def list_quota_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_quota_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_quota_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/quotas", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb deleted file mode 100644 index 2176f57358bf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/quota_pb' - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Service to get method call quota information per CSS API method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.QuotaService' - - # Lists the daily call quota and usage per group for your CSS Center account. - rpc :ListQuotaGroups, ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Google::Shopping::Css::V1::ListQuotaGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb deleted file mode 100644 index 2cc3b855b50d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_service/rest" -require "google/shopping/css/v1/account_labels_service/rest" -require "google/shopping/css/v1/css_product_inputs_service/rest" -require "google/shopping/css/v1/css_products_service/rest" -require "google/shopping/css/v1/quota_service/rest" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/css/v1/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb deleted file mode 100644 index d1011ac40878..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/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 Shopping - module Css - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md deleted file mode 100644 index d5bb47472267..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# CSS 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-shopping-css-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb deleted file mode 100644 index eba13c9a7aad..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # The request message for the `ListChildAccounts` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @!attribute [rw] label_id - # @return [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @!attribute [rw] full_name - # @return [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - class ListChildAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListChildAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Css::V1::Account>] - # The CSS/MC accounts returned for the specified CSS parent account. - # @!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 ListChildAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `UpdateLabels` method. - # @!attribute [rw] name - # @return [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class UpdateAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about CSS/MC account. - # @!attribute [rw] name - # @return [::String] - # The label resource name. - # Format: accounts/\\{account} - # @!attribute [r] full_name - # @return [::String] - # Output only. Immutable. The CSS/MC account's full name. - # @!attribute [rw] display_name - # @return [::String] - # The CSS/MC account's short display name. - # @!attribute [r] homepage_uri - # @return [::String] - # Output only. Immutable. The CSS/MC account's homepage. - # @!attribute [rw] parent - # @return [::String] - # The CSS/MC account's parent resource. CSS group for CSS domains; CSS - # domain for MC accounts. Returned only if the user has access to the - # parent account. - # Note: For MC sub-accounts, this is also the CSS domain that is the parent - # resource of the MCA account, since we are effectively flattening the - # hierarchy." - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # Manually created label IDs assigned to the CSS/MC account by a CSS parent - # account. - # @!attribute [rw] automatic_label_ids - # @return [::Array<::Integer>] - # Automatically created label IDs assigned to the MC account by - # CSS Center. - # @!attribute [r] account_type - # @return [::Google::Shopping::Css::V1::Account::AccountType] - # Output only. The type of this account. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The account type. - module AccountType - # Unknown account type. - ACCOUNT_TYPE_UNSPECIFIED = 0 - - # CSS group account. - CSS_GROUP = 1 - - # CSS domain account. - CSS_DOMAIN = 2 - - # MC Primary CSS MCA account. - MC_PRIMARY_CSS_MCA = 3 - - # MC CSS MCA account. - MC_CSS_MCA = 4 - - # MC Marketplace MCA account. - MC_MARKETPLACE_MCA = 5 - - # MC Other MCA account. - MC_OTHER_MCA = 6 - - # MC Standalone account. - MC_STANDALONE = 7 - - # MC MCA sub-account. - MC_MCA_SUBACCOUNT = 8 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb deleted file mode 100644 index 055f23e04511..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Label assigned by CSS domain or CSS group to one of its sub-accounts. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the label. - # Format: accounts/\\{account}/labels/\\{label} - # @!attribute [r] label_id - # @return [::Integer] - # Output only. The ID of the label. - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of account this label belongs to. - # @!attribute [rw] display_name - # @return [::String] - # The display name of this label. - # @!attribute [rw] description - # @return [::String] - # The description of this label. - # @!attribute [r] label_type - # @return [::Google::Shopping::Css::V1::AccountLabel::LabelType] - # Output only. The type of this label. - class AccountLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The label type. - module LabelType - # Unknown label type. - LABEL_TYPE_UNSPECIFIED = 0 - - # Indicates that the label was created manually. - MANUAL = 1 - - # Indicates that the label was created automatically by CSS Center. - AUTOMATIC = 2 - end - end - - # Request message for the `ListAccountLabels` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - class ListAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountLabels` method. - # @!attribute [rw] account_labels - # @return [::Array<::Google::Shopping::Css::V1::AccountLabel>] - # The labels from the specified account. - # @!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 ListAccountLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'CreateAccountLanel' method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The label to create. - class CreateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccountLabel` method. - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The updated label. All fields must be provided. - class UpdateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'DeleteAccountLabel' method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - class DeleteAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb deleted file mode 100644 index c00f0c3460d5..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Attributes for CSS Product. - # @!attribute [rw] cpp_link - # @return [::String] - # URL directly linking to your the Product Detail Page of the CSS. - # @!attribute [rw] cpp_mobile_link - # @return [::String] - # URL for the mobile-optimized version of the Product Detail Page of the CSS. - # @!attribute [rw] cpp_ads_redirect - # @return [::String] - # Allows advertisers to override the item URL when the product is shown - # within the context of Product Ads. - # @!attribute [rw] low_price - # @return [::Google::Shopping::Type::Price] - # Low Price of the CSS Product. - # @!attribute [rw] high_price - # @return [::Google::Shopping::Type::Price] - # High Price of the CSS Product. - # @!attribute [rw] number_of_offers - # @return [::Integer] - # The number of CSS Products. - # @!attribute [rw] headline_offer_condition - # @return [::String] - # Condition of the headline offer. - # @!attribute [rw] headline_offer_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] headline_offer_link - # @return [::String] - # Link to the headline offer. - # @!attribute [rw] headline_offer_mobile_link - # @return [::String] - # Mobile Link to the headline offer. - # @!attribute [rw] headline_offer_shipping_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] title - # @return [::String] - # Title of the item. - # @!attribute [rw] image_link - # @return [::String] - # URL of an image of the item. - # @!attribute [rw] additional_image_links - # @return [::Array<::String>] - # Additional URL of images of the item. - # @!attribute [rw] description - # @return [::String] - # Description of the item. - # @!attribute [rw] brand - # @return [::String] - # Product Related Attributes.[14-36] - # Brand of the item. - # @!attribute [rw] mpn - # @return [::String] - # Manufacturer Part Number - # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the - # item. - # @!attribute [rw] gtin - # @return [::String] - # Global Trade Item Number - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # @!attribute [rw] product_types - # @return [::Array<::String>] - # Categories of the item (formatted as in [products data - # specification](https://support.google.com/merchants/answer/6324406)). - # @!attribute [rw] google_product_category - # @return [::String] - # Google's category of the item (see [Google product - # taxonomy](https://support.google.com/merchants/answer/1705911)). When - # querying products, this field will contain the user provided value. There - # is currently no way to get back the auto assigned google product - # categories through the API. - # @!attribute [rw] adult - # @return [::Boolean] - # Set to true if the item is targeted towards adults. - # @!attribute [rw] multipack - # @return [::Integer] - # The number of identical products in a merchant-defined multipack. - # @!attribute [rw] is_bundle - # @return [::Boolean] - # Whether the item is a merchant-defined bundle. A bundle is a custom - # grouping of different products sold by a merchant for a single price. - # @!attribute [rw] age_group - # @return [::String] - # Target age group of the item. - # @!attribute [rw] color - # @return [::String] - # Color of the item. - # @!attribute [rw] gender - # @return [::String] - # Target gender of the item. - # @!attribute [rw] material - # @return [::String] - # The material of which the item is made. - # @!attribute [rw] pattern - # @return [::String] - # The item's pattern (e.g. polka dots). - # @!attribute [rw] size - # @return [::String] - # Size of the item. Only one value is allowed. For variants with different - # sizes, insert a separate product for each size with the same - # `itemGroupId` value (see - # [https://support.google.com/merchants/answer/6324492](size definition)). - # @!attribute [rw] size_system - # @return [::String] - # System in which the size is specified. Recommended for apparel items. - # @!attribute [rw] size_types - # @return [::Array<::String>] - # The cut of the item. It can be used to represent combined size types for - # apparel items. Maximum two of size types can be provided (see - # [size type](https://support.google.com/merchants/answer/6324497). - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] product_details - # @return [::Array<::Google::Shopping::Css::V1::ProductDetail>] - # Technical specification or additional product details. - # @!attribute [rw] product_weight - # @return [::Google::Shopping::Css::V1::ProductWeight] - # The weight of the product in the units provided. The value must be - # between 0 (exclusive) and 2000 (inclusive). - # @!attribute [rw] product_length - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The length of the product in the units provided. The value must be - # between 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_width - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The width of the product in the units provided. The value must be between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_height - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The height of the product in the units provided. The value must be - # between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_highlights - # @return [::Array<::String>] - # Bullet points describing the most relevant highlights of a product. - # @!attribute [rw] certifications - # @return [::Array<::Google::Shopping::Css::V1::Certification>] - # A list of certificates claimed by the CSS for the given product. - # @!attribute [rw] expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item should expire, as specified upon insertion, in - # [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual - # expiration date is exposed in `productstatuses` as - # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) - # and might be earlier if `expirationDate` is too far in the future. - # Note: It may take 2+ days from the expiration date for the item to - # actually get deleted. - # @!attribute [rw] included_destinations - # @return [::Array<::String>] - # The list of destinations to include for this target (corresponds to - # checked check boxes in Merchant Center). Default destinations are always - # included unless provided in `excludedDestinations`. - # @!attribute [rw] excluded_destinations - # @return [::Array<::String>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # @!attribute [rw] pause - # @return [::String] - # Publication of this item will be temporarily paused. - # @!attribute [rw] custom_label_0 - # @return [::String] - # Custom label 0 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # Custom label 1 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # Custom label 2 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # Custom label 3 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # Custom label 4 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] headline_offer_installment - # @return [::Google::Shopping::Css::V1::HeadlineOfferInstallment] - # Number and amount of installments to pay for an item. - # @!attribute [rw] headline_offer_subscription_cost - # @return [::Google::Shopping::Css::V1::HeadlineOfferSubscriptionCost] - # Number of periods (months or years) and amount of payment per period - # for an item with an associated subscription contract. - # @!attribute [rw] review_count - # @return [::Integer] - # Number of reviews of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] min_rating - # @return [::Integer] - # Minimum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] max_rating - # @return [::Integer] - # Maximum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] rating - # @return [::Float] - # Average rating score of the product. The value must be within the - # range of [`min_rating`, `max_rating`], inclusive. When displayed on the - # product page, this rating is normalized to a scale of [1, 5] with one - # decimal place. If provided, - # {::Google::Shopping::Css::V1::Attributes#review_count `review_count`}, - # {::Google::Shopping::Css::V1::Attributes#min_rating `min_rating`}, and - # {::Google::Shopping::Css::V1::Attributes#max_rating `max_rating`} are also - # required. This field is for an upcoming feature and is not yet used. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The certification for the product. Use the this attribute to describe - # certifications, such as energy efficiency ratings, associated with a product. - # @!attribute [rw] name - # @return [::String] - # The name of the certification. At this time, the most common value is - # "EPREL", which represents energy efficiency certifications in the EU - # European Registry for Energy Labeling (EPREL) database. - # @!attribute [rw] authority - # @return [::String] - # The authority or certification body responsible for issuing the - # certification. At this time, the most common value is "EC" or - # “European_Commission” for energy labels in the EU. - # @!attribute [rw] code - # @return [::String] - # The code of the certification. For example, for the EPREL certificate with - # the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 - # the code is 123456. The code is required for European Energy Labels. - class Certification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product details. - # @!attribute [rw] section_name - # @return [::String] - # The section header used to group a set of product details. - # @!attribute [rw] attribute_name - # @return [::String] - # The name of the product detail. - # @!attribute [rw] attribute_value - # @return [::String] - # The value of the product detail. - class ProductDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dimension of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The dimension value represented as a number. The value can have a - # maximum precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The dimension units. - # Acceptable values are: - # * "`in`" - # * "`cm`" - class ProductDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The weight of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The weight represented as a number. The weight can have a maximum - # precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The weight unit. - # Acceptable values are: - # * "`g`" - # * "`kg`" - # * "`oz`" - # * "`lb`" - class ProductWeight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the Css Product, data validation issues, that is, - # information about the Css Product computed asynchronously. - # @!attribute [rw] destination_statuses - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::DestinationStatus>] - # The intended destinations for the product. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::ItemLevelIssue>] - # A list of all issues associated with the product. - # @!attribute [rw] creation_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been created, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] last_update_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been last updated, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] google_expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item expires, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - class CssProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product status. - # @!attribute [rw] destination - # @return [::String] - # The name of the destination - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # approved. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # pending approval. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # disapproved. - class DestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product status. - # @!attribute [rw] code - # @return [::String] - # The error code of the issue. - # @!attribute [rw] servability - # @return [::String] - # How this issue affects serving of the CSS Product. - # @!attribute [rw] resolution - # @return [::String] - # Whether the issue can be resolved by the merchant. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] destination - # @return [::String] - # The destination the issue applies to. - # @!attribute [rw] description - # @return [::String] - # A short issue description in English. - # @!attribute [rw] detail - # @return [::String] - # A detailed issue description in English. - # @!attribute [rw] documentation - # @return [::String] - # The URL of a web page to help with resolving this issue. - # @!attribute [rw] applicable_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where issue applies to the - # CSS Product. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The SubscriptionCost of the product. - # @!attribute [rw] period - # @return [::Google::Shopping::Css::V1::SubscriptionPeriod] - # The type of subscription period. - # Supported values are: - # * "`month`" - # * "`year`" - # @!attribute [rw] period_length - # @return [::Integer] - # The number of subscription periods the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per subscription period. - class HeadlineOfferSubscriptionCost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents installment. - # @!attribute [rw] months - # @return [::Integer] - # The number of installments the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per month. - # @!attribute [rw] downpayment - # @return [::Google::Shopping::Type::Price] - # The up-front down payment amount the buyer has to pay. - class HeadlineOfferInstallment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The subscription period of the product. - module SubscriptionPeriod - # Indicates that the subscription period is unspecified. - SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 - - # Indicates that the subscription period is month. - MONTH = 1 - - # Indicates that the subscription period is year. - YEAR = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb deleted file mode 100644 index c6945a0046a9..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # This resource represents input data you submit for a CSS Product, not - # the processed CSS Product that you see in CSS Center, in Shopping Ads, or - # across Google surfaces. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the CSS Product input. - # Format: - # `accounts/{account}/cssProductInputs/{css_product_input}`, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [r] final_name - # @return [::String] - # Output only. The name of the processed CSS Product. - # Format: - # `accounts/{account}/cssProducts/{css_product}` - # " - # @!attribute [rw] raw_provided_id - # @return [::String] - # Required. Your unique identifier for the CSS Product. This is the same for - # the CSS Product input and processed CSS Product. We only allow ids with - # alphanumerics, underscores and dashes. See the [products feed - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the CSS - # Product. - # @!attribute [rw] feed_label - # @return [::String] - # Required. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the CSS Product. - # Feed Label is synonymous to "target country" and hence should always be a - # valid region code. For example: 'DE' for Germany, 'FR' for France. - # @!attribute [rw] freshness_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # DEPRECATED. Use expiration_date instead. - # Represents the existing version (freshness) of the CSS Product, which - # can be used to preserve the right order when multiple updates are done at - # the same time. - # - # This field must not be set to the future time. - # - # If set, the update is prevented if a newer version of the item already - # exists in our system (that is the last update time of the existing - # CSS products is later than the freshness time set in the update). If - # the update happens, the last update time is then set to this freshness - # time. - # - # If not set, the update will not be prevented and the last update time will - # default to when this request was received by the CSS API. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # A list of CSS Product attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (CSS-provided) attributes. It can also be used for - # submitting any attribute of the feed specification in its generic - # form (for example: - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - class CssProductInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertCssProductInput method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS Product Input to insert. - # @!attribute [rw] feed_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - class InsertCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateCssProductInput method. - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - class UpdateCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteCssProductInput method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [rw] supplemental_feed_id - # @return [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - class DeleteCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb deleted file mode 100644 index d61414008787..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.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 Shopping - module Css - module V1 - # The request message for the `GetCssProduct` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - class GetCssProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The processed CSS Product. - # @!attribute [rw] name - # @return [::String] - # The name of the CSS Product. - # Format: - # `"accounts/{account}/cssProducts/{css_product}"` - # @!attribute [r] raw_provided_id - # @return [::String] - # Output only. Your unique raw identifier for the product. - # @!attribute [r] content_language - # @return [::String] - # Output only. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the - # product. - # @!attribute [r] feed_label - # @return [::String] - # Output only. The feed label for the product. - # @!attribute [r] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # Output only. A list of product attributes. - # @!attribute [r] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Output only. A list of custom (CSS-provided) attributes. It can also be - # used to submit any attribute of the feed specification in its generic form - # (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - # @!attribute [r] css_product_status - # @return [::Google::Shopping::Css::V1::CssProductStatus] - # Output only. The status of a product, data validation issues, that is, - # information about a product computed asynchronously. - class CssProduct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListCssProducts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - class ListCssProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListCssProducts method. - # @!attribute [rw] css_products - # @return [::Array<::Google::Shopping::Css::V1::CssProduct>] - # The processed CSS products from the specified account. These are your - # processed CSS products after applying rules and supplemental feeds. - # @!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 ListCssProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb deleted file mode 100644 index d0d83c380b21..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.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 Shopping - module Css - module V1 - # The group information for methods in the CSS API. The quota is shared - # between all methods in the group. Even if none of the methods within the - # group have usage the information for the group is returned. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the quota group. - # Format: accounts/\\{account}/quotas/\\{group} - # Example: `accounts/12345678/quotas/css-products-insert` - # Note: The \\{group} part is not guaranteed to follow a specific pattern. - # @!attribute [r] quota_usage - # @return [::Integer] - # Output only. The current quota usage, meaning the number of calls already - # made on a given day to the methods in the group. The daily quota limits - # reset at at 12:00 PM midday UTC. - # @!attribute [r] quota_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per day for the group. - # @!attribute [r] quota_minute_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per minute for the group. - # @!attribute [r] method_details - # @return [::Array<::Google::Shopping::Css::V1::MethodDetails>] - # Output only. List of all methods group quota applies to. - class QuotaGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The method details per method in the CSS API. - # @!attribute [r] method - # @return [::String] - # Output only. The name of the method for example - # `cssproductsservice.listcssproducts`. - # @!attribute [r] version - # @return [::String] - # Output only. The API version that the method belongs to. - # @!attribute [r] subapi - # @return [::String] - # Output only. The sub-API that the method belongs to. In the CSS API, this - # is always `css`. - # @!attribute [r] path - # @return [::String] - # Output only. The path for the method such as - # `v1/cssproductsservice.listcssproducts`. - class MethodDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListQuotaGroups method. - # @!attribute [rw] parent - # @return [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - class ListQuotaGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListMethodGroups method. - # @!attribute [rw] quota_groups - # @return [::Array<::Google::Shopping::Css::V1::QuotaGroup>] - # The methods, current quota usage and limits per each group. The quota is - # shared between all methods in the group. The groups are sorted in - # descending order based on - # {::Google::Shopping::Css::V1::QuotaGroup#quota_usage quota_usage}. - # @!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 ListQuotaGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile deleted file mode 100644 index 64af0f406f42..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1", path: "../" -else - gem "google-shopping-css-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-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb deleted file mode 100644 index 3e0da7936320..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the create_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label. -# -def create_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - - # Call the create_account_label method. - result = client.create_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb deleted file mode 100644 index 37acf2da6b88..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label. -# -def delete_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - - # Call the delete_account_label method. - result = client.delete_account_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb deleted file mode 100644 index b6e45b80ec3f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_ListAccountLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_account_labels call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels. -# -def list_account_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - - # Call the list_account_labels method. - result = client.list_account_labels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - p item - end -end -# [END css_v1_generated_AccountLabelsService_ListAccountLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb deleted file mode 100644 index 3a87e7d4688c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label. -# -def update_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - - # Call the update_account_label method. - result = client.update_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb deleted file mode 100644 index 99a758913d47..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_GetAccount_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb deleted file mode 100644 index 56b92aa4cccf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_ListChildAccounts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_child_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts. -# -def list_child_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - - # Call the list_child_accounts method. - result = client.list_child_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::Account. - p item - end -end -# [END css_v1_generated_AccountsService_ListChildAccounts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb deleted file mode 100644 index d5f667ab066e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_UpdateLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_labels call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#update_labels. -# -def update_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - - # Call the update_labels method. - result = client.update_labels request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_UpdateLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb deleted file mode 100644 index 006857df17cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input. -# -def delete_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - - # Call the delete_css_product_input method. - result = client.delete_css_product_input request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb deleted file mode 100644 index 1acf0e41e05a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the insert_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input. -# -def insert_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - - # Call the insert_css_product_input method. - result = client.insert_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb deleted file mode 100644 index b0f42257db06..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input. -# -def update_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - - # Call the update_css_product_input method. - result = client.update_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb deleted file mode 100644 index 859163887d62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductsService_GetCssProduct_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_css_product call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#get_css_product. -# -def get_css_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetCssProductRequest.new - - # Call the get_css_product method. - result = client.get_css_product request - - # The returned object is of type Google::Shopping::Css::V1::CssProduct. - p result -end -# [END css_v1_generated_CssProductsService_GetCssProduct_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb deleted file mode 100644 index e65a9a1d0a0a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductsService_ListCssProducts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_css_products call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#list_css_products. -# -def list_css_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListCssProductsRequest.new - - # Call the list_css_products method. - result = client.list_css_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - p item - end -end -# [END css_v1_generated_CssProductsService_ListCssProducts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb deleted file mode 100644 index 3efd74d00a2a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_QuotaService_ListQuotaGroups_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_quota_groups call in the QuotaService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups. -# -def list_quota_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::QuotaService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - - # Call the list_quota_groups method. - result = client.list_quota_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - p item - end -end -# [END css_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json deleted file mode 100644 index eef1fd62fe59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-css-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.css.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "css_v1_generated_AccountsService_ListChildAccounts_sync", - "title": "Snippet for the list_child_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts.", - "file": "accounts_service/list_child_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_child_accounts", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListChildAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListChildAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "ListChildAccounts", - "full_name": "google.shopping.css.v1.AccountsService.ListChildAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.css.v1.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_UpdateLabels_sync", - "title": "Snippet for the update_labels call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#update_labels.", - "file": "accounts_service/update_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_labels", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#update_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "UpdateLabels", - "full_name": "google.shopping.css.v1.AccountsService.UpdateLabels", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_ListAccountLabels_sync", - "title": "Snippet for the list_account_labels call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels.", - "file": "account_labels_service/list_account_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_labels", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListAccountLabelsResponse", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "ListAccountLabels", - "full_name": "google.shopping.css.v1.AccountLabelsService.ListAccountLabels", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_CreateAccountLabel_sync", - "title": "Snippet for the create_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label.", - "file": "account_labels_service/create_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::CreateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "CreateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.CreateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync", - "title": "Snippet for the update_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label.", - "file": "account_labels_service/update_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "UpdateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.UpdateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync", - "title": "Snippet for the delete_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label.", - "file": "account_labels_service/delete_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "DeleteAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.DeleteAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_InsertCssProductInput_sync", - "title": "Snippet for the insert_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input.", - "file": "css_product_inputs_service/insert_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::InsertCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "InsertCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.InsertCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync", - "title": "Snippet for the update_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input.", - "file": "css_product_inputs_service/update_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "UpdateCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.UpdateCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync", - "title": "Snippet for the delete_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input.", - "file": "css_product_inputs_service/delete_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "DeleteCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.DeleteCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_GetCssProduct_sync", - "title": "Snippet for the get_css_product call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#get_css_product.", - "file": "css_products_service/get_css_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_css_product", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#get_css_product", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetCssProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProduct", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "GetCssProduct", - "full_name": "google.shopping.css.v1.CssProductsService.GetCssProduct", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_ListCssProducts_sync", - "title": "Snippet for the list_css_products call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#list_css_products.", - "file": "css_products_service/list_css_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_css_products", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#list_css_products", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListCssProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListCssProductsResponse", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "ListCssProducts", - "full_name": "google.shopping.css.v1.CssProductsService.ListCssProducts", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_QuotaService_ListQuotaGroups_sync", - "title": "Snippet for the list_quota_groups call in the QuotaService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups.", - "file": "quota_service/list_quota_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_quota_groups", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListQuotaGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListQuotaGroupsResponse", - "client": { - "short_name": "QuotaService::Client", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client" - }, - "method": { - "short_name": "ListQuotaGroups", - "full_name": "google.shopping.css.v1.QuotaService.ListQuotaGroups", - "service": { - "short_name": "QuotaService", - "full_name": "google.shopping.css.v1.QuotaService" - } - } - }, - "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-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb deleted file mode 100644 index 06be5bd23520..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_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/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_label_path account: "value0", label: "value1" - assert_equal "accounts/value0/labels/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb deleted file mode 100644 index 0b1bb88d645a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb +++ /dev/null @@ -1,318 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest" - - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - http_response = OpenStruct.new 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_account_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_list_account_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_count - end - end - end - - def test_create_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_create_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_account_label({ parent: parent, account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_account_label parent: parent, account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_account_label({ parent: parent, account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_count - end - end - end - - def test_update_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_update_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account_label({ account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account_label account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account_label({ account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_count - end - end - end - - def test_delete_account_label - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_delete_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_account_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_account_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_account_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb deleted file mode 100644 index 309bc3a0ae62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ /dev/null @@ -1,347 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_labels, name - assert_kind_of ::Google::Shopping::Css::V1::ListAccountLabelsRequest, 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_account_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_rpc_count - end - end - - def test_create_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::CreateAccountLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_account_label({ parent: parent, account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_account_label parent: parent, account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_account_label({ parent: parent, account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_rpc_count - end - end - - def test_update_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account_label({ account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account_label account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account_label({ account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_rpc_count - end - end - - def test_delete_account_label - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_account_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_account_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_account_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(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_account_label_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountLabelsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb deleted file mode 100644 index 5958f212e0cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_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/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb deleted file mode 100644 index 292ecc543790..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb +++ /dev/null @@ -1,268 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest" - - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_child_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_child_accounts_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_count - end - end - end - - def test_get_account - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account({ name: name, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account name: name, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account({ name: name, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_update_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_labels name: name, label_ids: label_ids, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_labels({ name: name, label_ids: label_ids, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb deleted file mode 100644 index 6abde8ec7b17..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb +++ /dev/null @@ -1,301 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_child_accounts, name - assert_kind_of ::Google::Shopping::Css::V1::ListChildAccountsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["label_id"] - assert request.has_label_id? - assert_equal "hello world", request["full_name"] - assert request.has_full_name? - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_child_accounts_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_rpc_count - end - end - - def test_get_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Css::V1::GetAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account({ name: name, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account name: name, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account({ name: name, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_update_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_labels, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, request - assert_equal "hello world", request["name"] - assert_equal [42], request["label_ids"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_labels name: name, label_ids: label_ids, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_labels({ name: name, label_ids: label_ids, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_labels_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb deleted file mode 100644 index 6f08e5fdf404..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_input_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_input_path account: "value0", css_product_input: "value1" - assert_equal "accounts/value0/cssProductInputs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb deleted file mode 100644 index 2e9aedae5c1b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_insert_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_count - end - end - end - - def test_update_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_update_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_css_product_input_client_stub.call_count - end - end - end - - def test_delete_css_product_input - # 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" - supplemental_feed_id = 42 - - delete_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_delete_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb deleted file mode 100644 index cae9bfab46aa..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb +++ /dev/null @@ -1,287 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::InsertCssProductInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal 42, request["feed_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_rpc_count - end - end - - def test_update_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input_client_stub.call_rpc_count - end - end - - def test_delete_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - supplemental_feed_id = 42 - - delete_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["supplemental_feed_id"] - assert request.has_supplemental_feed_id? - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_css_product_input_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductInputsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb deleted file mode 100644 index 7e9ac41a013e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_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/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_path account: "value0", css_product: "value1" - assert_equal "accounts/value0/cssProducts/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb deleted file mode 100644 index 8482e96080f6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb +++ /dev/null @@ -1,209 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductsService::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_css_product - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProduct.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_get_css_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_css_product_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_css_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_css_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_css_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_count - end - end - end - - def test_list_css_products - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - http_response = OpenStruct.new 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_css_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_list_css_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_css_products_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb deleted file mode 100644 index 693ba1506589..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::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_css_product - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProduct.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_css_product, name - assert_kind_of ::Google::Shopping::Css::V1::GetCssProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_css_product_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_css_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_css_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_css_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_rpc_count - end - end - - def test_list_css_products - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_css_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_css_products, name - assert_kind_of ::Google::Shopping::Css::V1::ListCssProductsRequest, 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_css_products_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb deleted file mode 100644 index ebdbed9d44c1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_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/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb deleted file mode 100644 index a8c80cc10365..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest" - - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - http_response = OpenStruct.new 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_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb deleted file mode 100644 index 5454c9c25375..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_quota_groups, name - assert_kind_of ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, 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_quota_groups_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::QuotaService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/helper.rb b/owl-bot-staging/google-shopping-css-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json deleted file mode 100644 index 788a554a5593..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta", - "distribution_name": "google-shopping-merchant-accounts-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml deleted file mode 100644 index 5fa9eb10ddf1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-accounts-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md deleted file mode 100644 index 456fb36054bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md deleted file mode 100644 index be41cd32e2eb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-accounts-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new -request = ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new # (request fields as keyword arguments...) -response = client.get_account_tax request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/accounts/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-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-shopping-merchant-accounts`. -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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile deleted file mode 100644 index dc4519177094..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta/account_tax_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts-v1beta" - header "google-shopping-merchant-accounts-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json deleted file mode 100644 index c3348ff56d9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.accounts.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1beta", - "services": { - "AccountTaxService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client", - "rpcs": { - "GetAccountTax": { - "methods": [ - "get_account_tax" - ] - }, - "ListAccountTax": { - "methods": [ - "list_account_tax" - ] - }, - "UpdateAccountTax": { - "methods": [ - "update_account_tax" - ] - } - } - } - } - }, - "AccountIssueService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client", - "rpcs": { - "ListAccountIssues": { - "methods": [ - "list_account_issues" - ] - } - } - } - } - }, - "UserService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client", - "rpcs": { - "GetUser": { - "methods": [ - "get_user" - ] - }, - "CreateUser": { - "methods": [ - "create_user" - ] - }, - "DeleteUser": { - "methods": [ - "delete_user" - ] - }, - "UpdateUser": { - "methods": [ - "update_user" - ] - }, - "ListUsers": { - "methods": [ - "list_users" - ] - } - } - } - } - }, - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "CreateAndConfigureAccount": { - "methods": [ - "create_and_configure_account" - ] - }, - "DeleteAccount": { - "methods": [ - "delete_account" - ] - }, - "UpdateAccount": { - "methods": [ - "update_account" - ] - }, - "ListAccounts": { - "methods": [ - "list_accounts" - ] - }, - "ListSubAccounts": { - "methods": [ - "list_sub_accounts" - ] - } - } - } - } - }, - "AutofeedSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client", - "rpcs": { - "GetAutofeedSettings": { - "methods": [ - "get_autofeed_settings" - ] - }, - "UpdateAutofeedSettings": { - "methods": [ - "update_autofeed_settings" - ] - } - } - } - } - }, - "AutomaticImprovementsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client", - "rpcs": { - "GetAutomaticImprovements": { - "methods": [ - "get_automatic_improvements" - ] - }, - "UpdateAutomaticImprovements": { - "methods": [ - "update_automatic_improvements" - ] - } - } - } - } - }, - "BusinessIdentityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client", - "rpcs": { - "GetBusinessIdentity": { - "methods": [ - "get_business_identity" - ] - }, - "UpdateBusinessIdentity": { - "methods": [ - "update_business_identity" - ] - } - } - } - } - }, - "BusinessInfoService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client", - "rpcs": { - "GetBusinessInfo": { - "methods": [ - "get_business_info" - ] - }, - "UpdateBusinessInfo": { - "methods": [ - "update_business_info" - ] - } - } - } - } - }, - "CheckoutSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", - "rpcs": { - "GetCheckoutSettings": { - "methods": [ - "get_checkout_settings" - ] - }, - "CreateCheckoutSettings": { - "methods": [ - "create_checkout_settings" - ] - }, - "UpdateCheckoutSettings": { - "methods": [ - "update_checkout_settings" - ] - }, - "DeleteCheckoutSettings": { - "methods": [ - "delete_checkout_settings" - ] - } - } - } - } - }, - "EmailPreferencesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client", - "rpcs": { - "GetEmailPreferences": { - "methods": [ - "get_email_preferences" - ] - }, - "UpdateEmailPreferences": { - "methods": [ - "update_email_preferences" - ] - } - } - } - } - }, - "GbpAccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client", - "rpcs": { - "ListGbpAccounts": { - "methods": [ - "list_gbp_accounts" - ] - }, - "LinkGbpAccount": { - "methods": [ - "link_gbp_account" - ] - } - } - } - } - }, - "HomepageService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client", - "rpcs": { - "GetHomepage": { - "methods": [ - "get_homepage" - ] - }, - "UpdateHomepage": { - "methods": [ - "update_homepage" - ] - }, - "ClaimHomepage": { - "methods": [ - "claim_homepage" - ] - }, - "UnclaimHomepage": { - "methods": [ - "unclaim_homepage" - ] - } - } - } - } - }, - "LfpProvidersService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client", - "rpcs": { - "FindLfpProviders": { - "methods": [ - "find_lfp_providers" - ] - }, - "LinkLfpProvider": { - "methods": [ - "link_lfp_provider" - ] - } - } - } - } - }, - "OmnichannelSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client", - "rpcs": { - "GetOmnichannelSetting": { - "methods": [ - "get_omnichannel_setting" - ] - }, - "ListOmnichannelSettings": { - "methods": [ - "list_omnichannel_settings" - ] - }, - "CreateOmnichannelSetting": { - "methods": [ - "create_omnichannel_setting" - ] - }, - "UpdateOmnichannelSetting": { - "methods": [ - "update_omnichannel_setting" - ] - }, - "RequestInventoryVerification": { - "methods": [ - "request_inventory_verification" - ] - } - } - } - } - }, - "OnlineReturnPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client", - "rpcs": { - "GetOnlineReturnPolicy": { - "methods": [ - "get_online_return_policy" - ] - }, - "ListOnlineReturnPolicies": { - "methods": [ - "list_online_return_policies" - ] - }, - "CreateOnlineReturnPolicy": { - "methods": [ - "create_online_return_policy" - ] - }, - "UpdateOnlineReturnPolicy": { - "methods": [ - "update_online_return_policy" - ] - }, - "DeleteOnlineReturnPolicy": { - "methods": [ - "delete_online_return_policy" - ] - } - } - } - } - }, - "ProgramsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client", - "rpcs": { - "GetProgram": { - "methods": [ - "get_program" - ] - }, - "ListPrograms": { - "methods": [ - "list_programs" - ] - }, - "EnableProgram": { - "methods": [ - "enable_program" - ] - }, - "DisableProgram": { - "methods": [ - "disable_program" - ] - } - } - } - } - }, - "RegionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client", - "rpcs": { - "GetRegion": { - "methods": [ - "get_region" - ] - }, - "CreateRegion": { - "methods": [ - "create_region" - ] - }, - "UpdateRegion": { - "methods": [ - "update_region" - ] - }, - "DeleteRegion": { - "methods": [ - "delete_region" - ] - }, - "ListRegions": { - "methods": [ - "list_regions" - ] - } - } - } - } - }, - "ShippingSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client", - "rpcs": { - "GetShippingSettings": { - "methods": [ - "get_shipping_settings" - ] - }, - "InsertShippingSettings": { - "methods": [ - "insert_shipping_settings" - ] - } - } - } - } - }, - "TermsOfServiceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client", - "rpcs": { - "GetTermsOfService": { - "methods": [ - "get_terms_of_service" - ] - }, - "RetrieveLatestTermsOfService": { - "methods": [ - "retrieve_latest_terms_of_service" - ] - }, - "AcceptTermsOfService": { - "methods": [ - "accept_terms_of_service" - ] - } - } - } - } - }, - "TermsOfServiceAgreementStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client", - "rpcs": { - "GetTermsOfServiceAgreementState": { - "methods": [ - "get_terms_of_service_agreement_state" - ] - }, - "RetrieveForApplicationTermsOfServiceAgreementState": { - "methods": [ - "retrieve_for_application_terms_of_service_agreement_state" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec deleted file mode 100644 index b151765b5d27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts-v1beta" - gem.version = Google::Shopping::Merchant::Accounts::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb deleted file mode 100644 index c0b2d7879e0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb deleted file mode 100644 index e10eb5ebc89c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_service" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" -require "google/shopping/merchant/accounts/v1beta/user_service" -require "google/shopping/merchant/accounts/v1beta/accounts_service" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" -require "google/shopping/merchant/accounts/v1beta/business_info_service" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" -require "google/shopping/merchant/accounts/v1beta/homepage_service" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" -require "google/shopping/merchant/accounts/v1beta/programs_service" -require "google/shopping/merchant/accounts/v1beta/regions_service" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/accounts/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb deleted file mode 100644 index 49903c0040db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accessright.proto - -require 'google/protobuf' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/accessright.proto\x12(google.shopping.merchant.accounts.v1beta*_\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x42\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10\x41\x63\x63\x65ssRightProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccessRight").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb deleted file mode 100644 index b613248a4cd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/client" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb deleted file mode 100644 index 43a790ecc274..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +++ /dev/null @@ -1,509 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - ## - # Client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1beta/accountissue_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 - - @account_issue_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountIssueService API. - # - # This class represents the configuration for AccountIssueService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb deleted file mode 100644 index bec671601e38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Credentials for the AccountIssueService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb deleted file mode 100644 index 71d24f829fad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Path helper methods for the AccountIssueService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb deleted file mode 100644 index 3b76683c97dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb deleted file mode 100644 index 83ae8b227f30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +++ /dev/null @@ -1,459 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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 - - @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.list_account_issues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountIssueService REST API. - # - # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb deleted file mode 100644 index 625c0f5e9a9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST service stub for the AccountIssueService 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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # A result object deserialized from the server's reply - def list_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/issues", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb deleted file mode 100644 index 45fafd29eba8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/account_tax.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/tax_rule_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/account_tax.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x37google/shopping/merchant/accounts/v1beta/tax_rule.proto\"\xe6\x01\n\nAccountTax\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\ttax_rules\x18\x03 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.TaxRule:i\xea\x41\x66\n%merchantapi.googleapis.com/AccountTax\x12#accounts/{account}/accounttax/{tax}*\x0c\x61\x63\x63ountTaxes2\naccountTax\"S\n\x14GetAccountTaxRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/AccountTax\"\x9a\x01\n\x17UpdateAccountTaxRequest\x12N\n\x0b\x61\x63\x63ount_tax\x18\x01 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTaxB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"}\n\x15ListAccountTaxRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/AccountTax\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x16ListAccountTaxResponse\x12K\n\raccount_taxes\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTax\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x84\x06\n\x11\x41\x63\x63ountTaxService\x12\xc5\x01\n\rGetAccountTax\x12>.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/accounttax/*}\x12\xd5\x01\n\x0eListAccountTax\x12?.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest\x1a@.google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{parent=accounts/*}/accounttax\x12\x85\x02\n\x10UpdateAccountTax\x12\x41.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\"x\xda\x41\x17\x61\x63\x63ount_tax,update_mask\xda\x41\x0b\x61\x63\x63ount_tax\x82\xd3\xe4\x93\x02J2;/accounts/v1beta/{account_tax.name=accounts/*/accounttax/*}:\x0b\x61\x63\x63ount_tax\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x91\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0f\x41\x63\x63ountTaxProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountTax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountTax").msgclass - GetAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest").msgclass - UpdateAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest").msgclass - ListAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest").msgclass - ListAccountTaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb deleted file mode 100644 index fe883ee6aa6c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/client" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_tax_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb deleted file mode 100644 index e854d0f8fc83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +++ /dev/null @@ -1,688 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - ## - # Client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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/shopping/merchant/accounts/v1beta/account_tax_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 - - @account_tax_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :get_account_tax, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :list_account_tax, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.account_tax&.name - header_params["account_tax.name"] = request.account_tax.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :update_account_tax, request, 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 AccountTaxService API. - # - # This class represents the configuration for AccountTaxService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb deleted file mode 100644 index fdecfb93cd56..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Credentials for the AccountTaxService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb deleted file mode 100644 index 327a514a749b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Path helper methods for the AccountTaxService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountTax resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/accounttax/{tax}` - # - # @param account [String] - # @param tax [String] - # - # @return [::String] - def account_tax_path account:, tax: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/accounttax/#{tax}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb deleted file mode 100644 index 539c364b6e47..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb deleted file mode 100644 index 82f756ae1010..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +++ /dev/null @@ -1,624 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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 - - @account_tax_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.get_account_tax request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.list_account_tax request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, "account_taxes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.update_account_tax request, 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 AccountTaxService REST API. - # - # This class represents the configuration for AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb deleted file mode 100644 index 1793880416fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST service stub for the AccountTaxService 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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def get_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # A result object deserialized from the server's reply - def list_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def update_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/accounttax", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account_tax.name}", - body: "account_tax", - matches: [ - ["account_tax.name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb deleted file mode 100644 index 91544da451e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/account_tax_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountTaxService' - - # Returns the tax rules that match the conditions of GetAccountTaxRequest - rpc :GetAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - rpc :ListAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse - # Updates the tax settings of the account. - rpc :UpdateAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb deleted file mode 100644 index 1221df9fb2c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountissue.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/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/accountissue.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12Q\n\x08severity\x18\x03 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.Severity\x12i\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32J.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xde\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x62\n\x07impacts\x18\x02 \x03(\x0b\x32Q.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact\x1ap\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12Q\n\x08severity\x18\x02 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x19ListAccountIssuesResponse\x12N\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbb\x02\n\x13\x41\x63\x63ountIssueService\x12\xda\x01\n\x11ListAccountIssues\x12\x42.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest\x1a\x43.google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x41\x63\x63ountIssueProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue").msgclass - AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination").msgclass - AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact").msgclass - AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.Severity").enummodule - ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest").msgclass - ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb deleted file mode 100644 index c925c068fe0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accountissue_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Service to support `AccountIssueService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountIssueService' - - # Lists all account issues of a Merchant Center account. - rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb deleted file mode 100644 index ea1e691e4169..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accountservices_pb' -require 'google/shopping/merchant/accounts/v1beta/user_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/accounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/accountservices.proto\x1a\x33google/shopping/merchant/accounts/v1beta/user.proto\x1a\x1agoogle/type/datetime.proto\"\x8a\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\radult_content\x18\x04 \x01(\x08\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:;\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\x9f\x06\n CreateAndConfigureAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12O\n\x05users\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.accounts.v1beta.CreateUserRequestB\x03\xe0\x41\x01\x12\x8a\x01\n\x17\x61\x63\x63\x65pt_terms_of_service\x18\x03 \x01(\x0b\x32_.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfServiceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12r\n\x07service\x18\x04 \x03(\x0b\x32\\.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1aq\n\x14\x41\x63\x63\x65ptTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xd0\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12[\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.AccountAggregationH\x00\x12\x41\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"merchantapi.googleapis.com/AccountH\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_providerB\x1a\n\x18_accept_terms_of_service\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x14UpdateAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"w\n\x17ListSubAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\t\n\x0f\x41\x63\x63ountsService\x12\xaf\x01\n\nGetAccount\x12;.google.shopping.merchant.accounts.v1beta.GetAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/accounts/v1beta/{name=accounts/*}\x12\xd3\x01\n\x19\x43reateAndConfigureAccount\x12J.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"7\x82\xd3\xe4\x93\x02\x31\",/accounts/v1beta/accounts:createAndConfigure:\x01*\x12\x9a\x01\n\rDeleteAccount\x12>.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$*\"/accounts/v1beta/{name=accounts/*}\x12\xd5\x01\n\rUpdateAccount\x12>.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"Q\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x35\x32*/accounts/v1beta/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xb0\x01\n\x0cListAccounts\x12=.google.shopping.merchant.accounts.v1beta.ListAccountsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListAccountsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/accounts/v1beta/accounts\x12\xe1\x01\n\x0fListSubAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse\"I\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x38\x12\x36/accounts/v1beta/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Account").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountRequest").msgclass - CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest").msgclass - CreateAndConfigureAccountRequest::AcceptTermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfService").msgclass - CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountService").msgclass - DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteAccountRequest").msgclass - UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountRequest").msgclass - ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsRequest").msgclass - ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsResponse").msgclass - ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest").msgclass - ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb deleted file mode 100644 index 1db2def8535c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb deleted file mode 100644 index cfa723ef8c94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +++ /dev/null @@ -1,1000 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - ## - # Client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1beta/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.create_and_configure_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :create_and_configure_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.account&.name - header_params["account.name"] = request.account.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.list_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.provider - header_params["provider"] = request.provider - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb deleted file mode 100644 index d2510c2f46bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb deleted file mode 100644 index 2be49373540a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb deleted file mode 100644 index 0d514d6bb48c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb deleted file mode 100644 index cdf36e4c6b04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +++ /dev/null @@ -1,931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to an 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_and_configure_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.create_and_configure_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.delete_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_sub_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_sub_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb deleted file mode 100644 index d62c09e78506..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST service stub for the AccountsService 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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def create_and_configure_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_and_configure_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def update_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # A result object deserialized from the server's reply - def list_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # A result object deserialized from the server's reply - def list_sub_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sub_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # 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_and_configure_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/accounts:createAndConfigure", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account.name}", - body: "account", - matches: [ - ["account.name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/accounts", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sub_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{provider}:listSubaccounts", - matches: [ - ["provider", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb deleted file mode 100644 index df57e5bd28dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Service to support Accounts API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountsService' - - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Google::Protobuf::Empty - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb deleted file mode 100644 index cf8e6a5da5cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountservices.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/accountservices.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x14\n\x12\x41\x63\x63ountAggregationB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x41\x63\x63ountServicesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountAggregation").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb deleted file mode 100644 index 2d2bb35eeb25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb deleted file mode 100644 index 6b3c5f535190..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +++ /dev/null @@ -1,579 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - ## - # Client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1beta/autofeedsettings_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 - - @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.autofeed_settings&.name - header_params["autofeed_settings.name"] = request.autofeed_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutofeedSettingsService API. - # - # This class represents the configuration for AutofeedSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb deleted file mode 100644 index 2ebbb8b964ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Credentials for the AutofeedSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb deleted file mode 100644 index 4e13a4e879c1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Path helper methods for the AutofeedSettingsService API. - module Paths - ## - # Create a fully-qualified AutofeedSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/autofeedSettings` - # - # @param account [String] - # - # @return [::String] - def autofeed_settings_path account: - "accounts/#{account}/autofeedSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb deleted file mode 100644 index 089d4e01e4f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb deleted file mode 100644 index 21ef0349a01e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +++ /dev/null @@ -1,522 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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 - - @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.get_autofeed_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.update_autofeed_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutofeedSettingsService REST API. - # - # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb deleted file mode 100644 index 31c104de3eab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST service stub for the AutofeedSettingsService 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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def get_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def update_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{autofeed_settings.name}", - body: "autofeed_settings", - matches: [ - ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb deleted file mode 100644 index d9f92c16c605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/autofeedsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xb1\x01\n\x1dUpdateAutofeedSettingsRequest\x12Z\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x41utofeedSettingsService\x12\xdb\x01\n\x13GetAutofeedSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/autofeedSettings}\x12\xa0\x02\n\x16UpdateAutofeedSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"\x80\x01\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x41utofeedSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutofeedSettings").msgclass - GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest").msgclass - UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb deleted file mode 100644 index 700b9a9139ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/autofeedsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutofeedSettingsService' - - # Retrieves the autofeed settings of an account. - rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - # Updates the autofeed settings of an account. - rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb deleted file mode 100644 index f49e147087f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb deleted file mode 100644 index 954914055c6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - ## - # Client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1beta/automaticimprovements_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 - - @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.automatic_improvements&.name - header_params["automatic_improvements.name"] = request.automatic_improvements.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. - # - # This class represents the configuration for AutomaticImprovementsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb deleted file mode 100644 index f8387a866b10..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Credentials for the AutomaticImprovementsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb deleted file mode 100644 index 9450fc09a397..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Path helper methods for the AutomaticImprovementsService API. - module Paths - ## - # Create a fully-qualified AutomaticImprovements resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/automaticImprovements` - # - # @param account [String] - # - # @return [::String] - def automatic_improvements_path account: - "accounts/#{account}/automaticImprovements" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb deleted file mode 100644 index 351bcf6d3b94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb deleted file mode 100644 index 771dbbb7ade0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb +++ /dev/null @@ -1,532 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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 - - @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.get_automatic_improvements request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. - # - # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb deleted file mode 100644 index 3b8079dd1fa9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST service stub for the AutomaticImprovementsService 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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def get_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def update_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{automatic_improvements.name}", - body: "automatic_improvements", - matches: [ - ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb deleted file mode 100644 index d9465d26faaa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/accounts/v1beta/automaticimprovements.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Y\n\x0citem_updates\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x65\n\x12image_improvements\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovementsH\x01\x88\x01\x01\x12k\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xaa\x05\n\x14\x41utomaticItemUpdates\x12\x8a\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32^.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa4\x03\n\x1a\x41utomaticImageImprovements\x12\xa1\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32j.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xc0\x01\n\"UpdateAutomaticImprovementsRequest\x12\x64\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x9f\x05\n\x1c\x41utomaticImprovementsService\x12\xef\x01\n\x18GetAutomaticImprovements\x12I.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/accounts/v1beta/{name=accounts/*/automaticImprovements}\x12\xc3\x02\n\x1bUpdateAutomaticImprovements\x12L.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"\x94\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02i2O/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1a\x41utomaticImprovementsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImprovements").msgclass - AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates").msgclass - AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass - AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements").msgclass - AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass - AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements").msgclass - GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest").msgclass - UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb deleted file mode 100644 index 50bbf1aa06a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/automaticimprovements_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' - - # Retrieves the automatic improvements of an account. - rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - # Updates the automatic improvements of an account. - rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb deleted file mode 100644 index d43f48202612..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/client" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb deleted file mode 100644 index 6cd2a1560400..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +++ /dev/null @@ -1,580 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - ## - # Client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1beta/businessidentity_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 - - @business_identity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :get_business_identity, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_identity&.name - header_params["business_identity.name"] = request.business_identity.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. - # - # This class represents the configuration for BusinessIdentityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb deleted file mode 100644 index 411d0a8452ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Credentials for the BusinessIdentityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb deleted file mode 100644 index 684dbc65841c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Path helper methods for the BusinessIdentityService API. - module Paths - ## - # Create a fully-qualified BusinessIdentity resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessIdentity` - # - # @param account [String] - # - # @return [::String] - def business_identity_path account: - "accounts/#{account}/businessIdentity" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb deleted file mode 100644 index d1f0814edc5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb deleted file mode 100644 index c3efad2cf64d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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 - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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 - - @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.get_business_identity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. - # - # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb deleted file mode 100644 index 650d5181843f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST service stub for the BusinessIdentityService 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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def get_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def update_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_identity.name}", - body: "business_identity", - matches: [ - ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb deleted file mode 100644 index 6bc1a26ad17a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/client" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb deleted file mode 100644 index a58943d63128..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +++ /dev/null @@ -1,579 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - ## - # Client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1beta/businessinfo_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 - - @business_info_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :get_business_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_info&.name - header_params["business_info.name"] = request.business_info.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :update_business_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BusinessInfoService API. - # - # This class represents the configuration for BusinessInfoService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb deleted file mode 100644 index 0308f8a5ad24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Credentials for the BusinessInfoService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb deleted file mode 100644 index 0a2e4aaaee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Path helper methods for the BusinessInfoService API. - module Paths - ## - # Create a fully-qualified BusinessInfo resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessInfo` - # - # @param account [String] - # - # @return [::String] - def business_info_path account: - "accounts/#{account}/businessInfo" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb deleted file mode 100644 index 1a834ba1e2c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb deleted file mode 100644 index 04bf182d6111..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +++ /dev/null @@ -1,522 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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 - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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 - - @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.get_business_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.update_business_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BusinessInfoService REST API. - # - # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb deleted file mode 100644 index b7cc0315c746..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST service stub for the BusinessInfoService 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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def get_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def update_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_info.name}", - body: "business_info", - matches: [ - ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb deleted file mode 100644 index 9dc1403d6850..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass - BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass - BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule - BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule - GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass - UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb deleted file mode 100644 index 91a6e86252b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessidentity_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService' - - # Retrieves the business identity of an account. - rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - # Updates the business identity of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb deleted file mode 100644 index 254aa9f643ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/customerservice_pb' -require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb' -require 'google/type/phone_number_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xeb\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass - GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass - UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb deleted file mode 100644 index b69a18296f1e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessinfo_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Service to support business info API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService' - - # Retrieves the business info of an account. - rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - # Updates the business info of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb deleted file mode 100644 index 6510004f596a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb deleted file mode 100644 index 16ed9683aad9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb +++ /dev/null @@ -1,776 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - ## - # Client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 - - @checkout_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.checkout_settings&.name - header_params["checkout_settings.name"] = request.checkout_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CheckoutSettingsService API. - # - # This class represents the configuration for CheckoutSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb deleted file mode 100644 index 59b479846819..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Credentials for the CheckoutSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb deleted file mode 100644 index c2ce599e591d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Path helper methods for the CheckoutSettingsService API. - module Paths - ## - # Create a fully-qualified CheckoutSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}/checkoutSettings` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def checkout_settings_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}/checkoutSettings" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb deleted file mode 100644 index 88121fed97ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb deleted file mode 100644 index ea68b31ea7d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb +++ /dev/null @@ -1,705 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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 - - @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.get_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.create_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.update_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.delete_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CheckoutSettingsService REST API. - # - # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb deleted file mode 100644 index ab727cfeab6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST service stub for the CheckoutSettingsService 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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def get_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def create_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def update_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/checkoutSettings", - body: "checkout_settings", - matches: [ - ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{checkout_settings.name}", - body: "checkout_settings", - matches: [ - ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb deleted file mode 100644 index 6d4141e47877..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass - CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass - UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass - DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass - CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass - CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule - CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule - UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb deleted file mode 100644 index bd81b765e3d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' - - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Creates `CheckoutSettings` for the given merchant. - rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Updates `CheckoutSettings` for the given merchant. - rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb deleted file mode 100644 index c17c763ded0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/customerservice.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/type/phone_number_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb deleted file mode 100644 index d06d098a05ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/client" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb deleted file mode 100644 index 6bb8c12c7625..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +++ /dev/null @@ -1,594 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - ## - # Client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1beta/emailpreferences_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 - - @email_preferences_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :get_email_preferences, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.email_preferences&.name - header_params["email_preferences.name"] = request.email_preferences.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. - # - # This class represents the configuration for EmailPreferencesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb deleted file mode 100644 index 720eb9a879d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Credentials for the EmailPreferencesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb deleted file mode 100644 index fd9c9497e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Path helper methods for the EmailPreferencesService API. - module Paths - ## - # Create a fully-qualified EmailPreferences resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}/emailPreferences` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def email_preferences_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}/emailPreferences" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb deleted file mode 100644 index b2676240e767..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb deleted file mode 100644 index 9e62fc5d7d5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +++ /dev/null @@ -1,537 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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 - - @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.get_email_preferences request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. - # - # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb deleted file mode 100644 index 9193d3947fc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST service stub for the EmailPreferencesService 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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def get_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def update_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{email_preferences.name}", - body: "email_preferences", - matches: [ - ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb deleted file mode 100644 index 37d52395e2bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/emailpreferences.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xed\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x61\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xb1\x01\n\x1dUpdateEmailPreferencesRequest\x12Z\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf3\x04\n\x17\x45mailPreferencesService\x12\xe3\x01\n\x13GetEmailPreferences\x12\x44.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/accounts/v1beta/{name=accounts/*/users/*/emailPreferences}\x12\xa8\x02\n\x16UpdateEmailPreferences\x12G.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"\x88\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02\x62\x32M/accounts/v1beta/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x45mailPreferencesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences").msgclass - EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState").enummodule - GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest").msgclass - UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb deleted file mode 100644 index 4d4ab5d746e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/emailpreferences_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.EmailPreferencesService' - - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb deleted file mode 100644 index cdcf6b1c5dfd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb deleted file mode 100644 index e66a0c58044a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +++ /dev/null @@ -1,600 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - ## - # Client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1beta/gbpaccounts_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 - - @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the GbpAccountsService API. - # - # This class represents the configuration for GbpAccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb deleted file mode 100644 index 293bf2160f68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Credentials for the GbpAccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb deleted file mode 100644 index a10be9d7033a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Path helper methods for the GbpAccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb deleted file mode 100644 index e9b645d1dcbe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb deleted file mode 100644 index e50f06e555cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +++ /dev/null @@ -1,543 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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 - - @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.link_gbp_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the GbpAccountsService REST API. - # - # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb deleted file mode 100644 index d969d96d14e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST service stub for the GbpAccountsService 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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # A result object deserialized from the server's reply - def list_gbp_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gbp_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # A result object deserialized from the server's reply - def link_gbp_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_gbp_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gbp_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_gbp_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts:linkGbpAccount", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb deleted file mode 100644 index ccccc7e7699e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/gbpaccounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12G\n\x04type\x18\x03 \x01(\x0e\x32\x39.google.shopping.merchant.accounts.v1beta.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListGbpAccountsResponse\x12J\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xa4\x04\n\x12GbpAccountsService\x12\xd9\x01\n\x0fListGbpAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/accounts/v1beta/{parent=accounts/*}/gbpAccounts\x12\xe8\x01\n\x0eLinkGbpAccount\x12?.google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest\x1a@.google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\"?/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10GbpAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount").msgclass - GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount.Type").enummodule - ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest").msgclass - ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse").msgclass - LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest").msgclass - LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb deleted file mode 100644 index 2e204bc48d59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/gbpaccounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.GbpAccountsService' - - # List the GBP accounts for a given merchant. - rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse - # Link the specified merchant to a GBP account for all countries. - rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb deleted file mode 100644 index 9c3fea67be84..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/homepage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/homepage.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x98\x01\n\x15UpdateHomepageRequest\x12I\n\x08homepage\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Q\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\x8d\x07\n\x0fHomepageService\x12\xbb\x01\n\x0bGetHomepage\x12<.google.shopping.merchant.accounts.v1beta.GetHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{name=accounts/*/homepage}\x12\xe4\x01\n\x0eUpdateHomepage\x12?.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"]\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02@24/accounts/v1beta/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xc1\x01\n\rClaimHomepage\x12>.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"<\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1beta/{name=accounts/*/homepage}:claim:\x01*\x12\xc7\x01\n\x0fUnclaimHomepage\x12@.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\">\x82\xd3\xe4\x93\x02\x38\"3/accounts/v1beta/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rHomepageProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Homepage").msgclass - GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetHomepageRequest").msgclass - UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest").msgclass - ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest").msgclass - UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb deleted file mode 100644 index d3c47366408e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/client" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb deleted file mode 100644 index 79e2601a3950..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +++ /dev/null @@ -1,777 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - ## - # Client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1beta/homepage_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 - - @homepage_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :get_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.homepage&.name - header_params["homepage.name"] = request.homepage.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. - # - # This class represents the configuration for HomepageService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb deleted file mode 100644 index cd945b510c57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Credentials for the HomepageService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb deleted file mode 100644 index 58d7b7105437..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Path helper methods for the HomepageService API. - module Paths - ## - # Create a fully-qualified Homepage resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/homepage` - # - # @param account [String] - # - # @return [::String] - def homepage_path account: - "accounts/#{account}/homepage" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb deleted file mode 100644 index 87039ee3847c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb deleted file mode 100644 index 5c6975a7e0d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +++ /dev/null @@ -1,706 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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 - - @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.get_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.update_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.claim_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. - # - # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb deleted file mode 100644 index 9c3d3c797d7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST service stub for the HomepageService 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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def get_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def update_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def claim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "claim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def unclaim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unclaim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{homepage.name}", - body: "homepage", - matches: [ - ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_claim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:claim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unclaim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:unclaim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb deleted file mode 100644 index 9767309ba008..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/homepage_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Service to support an API for a store's homepage. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.HomepageService' - - # Retrieves a store's homepage. - rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Updates a store's homepage. Executing this method requires admin access. - rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Unclaims a store's homepage. Executing this method requires admin access. - rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb deleted file mode 100644 index 058cc57bb288..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/client" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb deleted file mode 100644 index 5b337c8254dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - ## - # Client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1beta/lfpproviders_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 - - @lfp_providers_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, 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 LfpProvidersService API. - # - # This class represents the configuration for LfpProvidersService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb deleted file mode 100644 index 4e45d13facbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Credentials for the LfpProvidersService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb deleted file mode 100644 index 668327ff63dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Path helper methods for the LfpProvidersService API. - module Paths - ## - # Create a fully-qualified LfpProvider resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # - # @param account [String] - # @param omnichannel_setting [String] - # @param lfp_provider [String] - # - # @return [::String] - def lfp_provider_path account:, omnichannel_setting:, lfp_provider: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb deleted file mode 100644 index 501c902dee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb deleted file mode 100644 index 6a4e33bf15c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +++ /dev/null @@ -1,546 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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 - - @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.link_lfp_provider request, 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 LfpProvidersService REST API. - # - # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb deleted file mode 100644 index 490af09ca942..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # A result object deserialized from the server's reply - def find_lfp_providers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "find_lfp_providers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # A result object deserialized from the server's reply - def link_lfp_provider request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_lfp_provider", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_find_lfp_providers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/lfpProviders:find", - matches: [ - ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_lfp_provider_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:linkLfpProvider", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb deleted file mode 100644 index 672686b1abaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/lfpproviders.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\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\"\x81\x01\n\x18\x46indLfpProvidersResponse\x12L\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xdd\x04\n\x13LfpProvidersService\x12\xf8\x01\n\x10\x46indLfpProviders\x12\x41.google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest\x1a\x42.google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\x81\x02\n\x0fLinkLfpProvider\x12@.google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\"W/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11LfpProvidersProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LfpProvider").msgclass - FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest").msgclass - FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse").msgclass - LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest").msgclass - LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb deleted file mode 100644 index f8deaf08100e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/lfpproviders_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.LfpProvidersService' - - # Find the LFP provider candidates in a given country. - rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse - # Link the specified merchant to a LFP provider for the specified country. - rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb deleted file mode 100644 index a05a5462fd00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb deleted file mode 100644 index 50ace30f1702..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +++ /dev/null @@ -1,894 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - ## - # Client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1beta/omnichannelsettings_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 - - @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.omnichannel_setting&.name - header_params["omnichannel_setting.name"] = request.omnichannel_setting.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, - metadata: metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. - # - # This class represents the configuration for OmnichannelSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb deleted file mode 100644 index b68c12fb3003..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Credentials for the OmnichannelSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb deleted file mode 100644 index e50d1ca4f146..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Path helper methods for the OmnichannelSettingsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb deleted file mode 100644 index 263f2eb40bce..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb deleted file mode 100644 index 072ffc5c5e3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +++ /dev/null @@ -1,816 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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 - - @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. - # - # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb deleted file mode 100644 index 6ceefbcd5ee9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST service stub for the OmnichannelSettingsService 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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def get_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # A result object deserialized from the server's reply - def list_omnichannel_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_omnichannel_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def create_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def update_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # A result object deserialized from the server's reply - def request_inventory_verification request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "request_inventory_verification", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_omnichannel_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - body: "omnichannel_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{omnichannel_setting.name}", - body: "omnichannel_setting", - matches: [ - ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_request_inventory_verification_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:requestInventoryVerification", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb deleted file mode 100644 index 7c74b858526a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/omnichannelsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/shopping/merchant/accounts/v1beta/omnichannelsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe3\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x08lsf_type\x18\x0c \x01(\x0e\x32\x44.google.shopping.merchant.accounts.v1beta.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12H\n\x08in_stock\x18\r \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.InStockB\x03\xe0\x41\x01\x12\x45\n\x06pickup\x18\x0e \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.PickupB\x03\xe0\x41\x01\x12H\n\x08lfp_link\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.LfpLinkB\x03\xe0\x41\x03\x12L\n\x03odo\x18\x06 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.OnDisplayToOrderB\x03\xe0\x41\x01\x12\x43\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.AboutB\x03\xe0\x41\x01\x12\x64\n\x16inventory_verification\x18\x08 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :create_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.online_return_policy&.name - header_params["online_return_policy.name"] = request.online_return_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :update_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :delete_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the OnlineReturnPolicyService API. - # - # This class represents the configuration for OnlineReturnPolicyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb deleted file mode 100644 index 65cce8eedd0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Credentials for the OnlineReturnPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb deleted file mode 100644 index 99da2a7379d2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Path helper methods for the OnlineReturnPolicyService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OnlineReturnPolicy resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @param account [String] - # @param return_policy [String] - # - # @return [::String] - def online_return_policy_path account:, return_policy: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/onlineReturnPolicies/#{return_policy}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb deleted file mode 100644 index aae7187d3bc3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - module OnlineReturnPolicyService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb deleted file mode 100644 index 444f346f95aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ /dev/null @@ -1,821 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST client for the OnlineReturnPolicyService service. - # - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :online_return_policy_service_stub - - ## - # Configure the OnlineReturnPolicyService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OnlineReturnPolicyService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OnlineReturnPolicyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 - @online_return_policy_service_stub.universe_domain - end - - ## - # Create a new OnlineReturnPolicyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OnlineReturnPolicyService 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 - - @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @online_return_policy_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @online_return_policy_service_stub.logger - end - - # Service calls - - ## - # Gets an existing return policy for a given merchant. - # - # @overload get_online_return_policy(request, options = nil) - # Pass arguments to `get_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_online_return_policy(name: nil) - # Pass arguments to `get_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - # - # # Call the get_online_return_policy method. - # result = client.get_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def get_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.get_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an 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_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.create_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.update_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.delete_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the OnlineReturnPolicyService REST API. - # - # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb deleted file mode 100644 index dedd98287a41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST service stub for the OnlineReturnPolicyService 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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def get_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # A result object deserialized from the server's reply - def list_online_return_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_online_return_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def create_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def update_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_online_return_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # 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_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - body: "online_return_policy", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{online_return_policy.name}", - body: "online_return_policy", - matches: [ - ["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb deleted file mode 100644 index 0fe2ffb749d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/online_return_policy_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService' - - # Gets an existing return policy for a given merchant. - rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Lists all existing return policies for a given merchant. - rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse - # Creates a new return policy for a given merchant. - rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Updates an existing return policy for a given merchant. - rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Deletes an existing return policy. - rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb deleted file mode 100644 index 54a151690147..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto - -require 'google/protobuf' - - -descriptor_data = "\nEgoogle/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x12(google.shopping.merchant.accounts.v1beta*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x9d\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1bPhoneVerificationStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.PhoneVerificationState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb deleted file mode 100644 index b4a19137e869..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/programs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/programs.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12K\n\x05state\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12^\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\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\"t\n\x14ListProgramsResponse\x12\x43\n\x08programs\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\x84\x07\n\x0fProgramsService\x12\xba\x01\n\nGetProgram\x12;.google.shopping.merchant.accounts.v1beta.GetProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{name=accounts/*/programs/*}\x12\xcd\x01\n\x0cListPrograms\x12=.google.shopping.merchant.accounts.v1beta.ListProgramsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListProgramsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{parent=accounts/*}/programs\x12\xca\x01\n\rEnableProgram\x12>.google.shopping.merchant.accounts.v1beta.EnableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1beta/{name=accounts/*/programs/*}:enable:\x01*\x12\xcd\x01\n\x0e\x44isableProgram\x12?.google.shopping.merchant.accounts.v1beta.DisableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/accounts/v1beta/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rProgramsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program").msgclass - Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.Requirement").msgclass - Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.State").enummodule - GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetProgramRequest").msgclass - ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsRequest").msgclass - ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsResponse").msgclass - EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EnableProgramRequest").msgclass - DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DisableProgramRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb deleted file mode 100644 index 5c31844c5c2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/client" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "programs_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb deleted file mode 100644 index 361868712e90..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +++ /dev/null @@ -1,788 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - ## - # Client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1beta/programs_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 - - @programs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :get_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. - # - # This class represents the configuration for ProgramsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb deleted file mode 100644 index 2935731c5fc6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Credentials for the ProgramsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb deleted file mode 100644 index 3b9b815133bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Path helper methods for the ProgramsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb deleted file mode 100644 index ffbd61628a98..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.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" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb deleted file mode 100644 index 13115347e581..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +++ /dev/null @@ -1,717 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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 - - @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.get_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.list_programs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.enable_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.disable_program request, 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 ProgramsService REST API. - # - # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb deleted file mode 100644 index bb7144364d14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/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/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST service stub for the ProgramsService 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_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def get_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # A result object deserialized from the server's reply - def list_programs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_programs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def enable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def disable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.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_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_programs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/programs", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:enable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:disable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb deleted file mode 100644 index 8282a0f080fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/programs_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService' - - # Retrieves the specified program for the account. - rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Retrieves all programs for the account. - rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb deleted file mode 100644 index 012299b8a9d6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/regions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"q\n\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass - CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass - UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass - DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass - ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass - ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass - Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass - Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass - Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass - Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb deleted file mode 100644 index a6f7d439e86b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/client" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regions_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb deleted file mode 100644 index a240185dfa7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +++ /dev/null @@ -1,888 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - ## - # Client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1beta/regions_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 - - @regions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :create_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.region&.name - header_params["region.name"] = request.region.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :update_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :delete_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, request, response, 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 RegionsService API. - # - # This class represents the configuration for RegionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb deleted file mode 100644 index 536fce1bdfaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Credentials for the RegionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb deleted file mode 100644 index b6f5e812e70d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Path helper methods for the RegionsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Region resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/regions/{region}` - # - # @param account [String] - # @param region [String] - # - # @return [::String] - def region_path account:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/regions/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb deleted file mode 100644 index f359bf4bc293..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb deleted file mode 100644 index 2068a53a1b70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +++ /dev/null @@ -1,810 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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 - - @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.create_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.update_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.delete_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.list_regions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. - # - # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb deleted file mode 100644 index 2705002746ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST service stub for the RegionsService 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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def get_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def create_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def update_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # A result object deserialized from the server's reply - def list_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/regions", - body: "region", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{region.name}", - body: "region", - matches: [ - ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/regions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb deleted file mode 100644 index dcb5e918d1ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/regions_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.RegionsService' - - # Retrieves a region defined in your Merchant Center account. - rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Creates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Google::Protobuf::Empty - # Lists the regions in your Merchant Center account. - rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb deleted file mode 100644 index 7a948b075dea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/accounts/v1beta/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb deleted file mode 100644 index 883a132363a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb deleted file mode 100644 index 98d6c89c513f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +++ /dev/null @@ -1,576 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - ## - # Client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1beta/shippingsettings_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 - - @shipping_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ShippingSettingsService API. - # - # This class represents the configuration for ShippingSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb deleted file mode 100644 index b3b8b543ed1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Credentials for the ShippingSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb deleted file mode 100644 index 29bb68e960e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Path helper methods for the ShippingSettingsService API. - module Paths - ## - # Create a fully-qualified ShippingSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/shippingSettings` - # - # @param account [String] - # - # @return [::String] - def shipping_settings_path account: - "accounts/#{account}/shippingSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb deleted file mode 100644 index 0d14c8f4c394..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb deleted file mode 100644 index cbb1cb183061..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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 - - @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.insert_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ShippingSettingsService REST API. - # - # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb deleted file mode 100644 index 40faa8e51671..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST service stub for the ShippingSettingsService 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_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def get_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def insert_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.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_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/shippingSettings:insert", - body: "shipping_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb deleted file mode 100644 index c3a11939d0fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/shippingsettings.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/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/shippingsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xcb\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x08services\x18\x02 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.ServiceB\x03\xe0\x41\x01\x12L\n\nwarehouses\x18\x03 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xc7\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12W\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12M\n\x0brate_groups\x18\x06 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.RateGroupB\x03\xe0\x41\x01\x12Z\n\rshipment_type\x18\x07 \x01(\x0e\x32>.google.shopping.merchant.accounts.v1beta.Service.ShipmentTypeH\x04\x88\x01\x01\x12=\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x05\x88\x01\x01\x12h\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32@.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTableH\x06\x88\x01\x01\x12X\n\x0cstore_config\x18\n \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Service.StoreConfigH\x07\x88\x01\x01\x12_\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32@.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xe2\x06\n\x0bStoreConfig\x12o\n\x12store_service_type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\rcutoff_config\x18\x03 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12O\n\x0eservice_radius\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.DistanceH\x02\x88\x01\x01\x1a\xf5\x02\n\x0c\x43utoffConfig\x12z\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf7\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb6\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12J\n\x04unit\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xb0\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12U\n\x10shipping_address\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\\\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12]\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xb5\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12N\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12W\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.TransitTableH\x05\x88\x01\x01\x12\x66\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x06\x88\x01\x01\x12\x65\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x07\x88\x01\x01\x12q\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf4\x01\n\x11\x42usinessDayConfig\x12_\n\rbusiness_days\x18\x01 \x03(\x0e\x32\x43.google.shopping.merchant.accounts.v1beta.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\xa7\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12J\n\x0csingle_value\x18\x02 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueH\x00\x88\x01\x01\x12H\n\nmain_table\x18\x03 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableH\x01\x88\x01\x01\x12G\n\tsubtables\x18\x04 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableB\x03\xe0\x41\x01\x12Q\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\xaa\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12P\n\x0brow_headers\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12N\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersH\x02\x88\x01\x01\x12@\n\x04rows\x18\x04 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1beta.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xac\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12X\n\x04rows\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf9\x01\n\x0eTransitTimeRow\x12k\n\x06values\x18\x01 \x03(\x0b\x32V.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\x81\x02\n\x16MinimumOrderValueTable\x12{\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x84\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12O\n\tlocations\x18\x05 \x03(\x0b\x32\x37.google.shopping.merchant.accounts.v1beta.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"J\n\x03Row\x12\x43\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\x8f\x01\n\x1dInsertShippingSettingsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10shipping_setting\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.ShippingSettingsB\x03\xe0\x41\x02\x32\xb8\x04\n\x17ShippingSettingsService\x12\xdb\x01\n\x13GetShippingSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/shippingSettings}\x12\xf5\x01\n\x16InsertShippingSettings\x12G.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"V\x82\xd3\xe4\x93\x02P\" e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceAgreementStateService API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb deleted file mode 100644 index 08f405184324..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Credentials for the TermsOfServiceAgreementStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb deleted file mode 100644 index 8f1f50a9834f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Path helper methods for the TermsOfServiceAgreementStateService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfServiceAgreementState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # - # @param account [String] - # @param identifier [String] - # - # @return [::String] - def terms_of_service_agreement_state_path account:, identifier: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb deleted file mode 100644 index 33c9185e4e0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfServiceAgreementState` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - module TermsOfServiceAgreementStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb deleted file mode 100644 index f99ed2289e41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +++ /dev/null @@ -1,521 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST client for the TermsOfServiceAgreementStateService service. - # - # Service to support `TermsOfServiceAgreementState` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_agreement_state_service_stub - - ## - # Configure the TermsOfServiceAgreementStateService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceAgreementStateService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceAgreementStateService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 - @terms_of_service_agreement_state_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceAgreementStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceAgreementStateService 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 - - @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_agreement_state_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 - @terms_of_service_agreement_state_service_stub.logger - end - - # Service calls - - ## - # Returns the state of a terms of service agreement. - # - # @overload get_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service_agreement_state(name: nil) - # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - # - # # Call the get_terms_of_service_agreement_state method. - # result = client.get_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def get_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceAgreementStateService REST API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb deleted file mode 100644 index c0a226adbfbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST service stub for the TermsOfServiceAgreementStateService 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_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def get_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_for_application_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.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_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/termsOfServiceAgreementStates:retrieveForApplication", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb deleted file mode 100644 index 7147a2323140..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/client" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb deleted file mode 100644 index 8ab3d9adf00f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +++ /dev/null @@ -1,672 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - ## - # Client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1beta/termsofservice_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 - - @terms_of_service_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceService API. - # - # This class represents the configuration for TermsOfServiceService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb deleted file mode 100644 index 46f3c20085d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Credentials for the TermsOfServiceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb deleted file mode 100644 index cbc86885e96c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Path helper methods for the TermsOfServiceService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb deleted file mode 100644 index 45348f1253e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb deleted file mode 100644 index 4a0c6f76ea19..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +++ /dev/null @@ -1,616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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 - - @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.get_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.accept_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceService REST API. - # - # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb deleted file mode 100644 index e44a62b60c86..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST service stub for the TermsOfServiceService 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_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def get_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def retrieve_latest_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_latest_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def accept_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "accept_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_latest_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/termsOfService:retrieveLatest", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_accept_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}:accept", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb deleted file mode 100644 index e47173662cd5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservice.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/merchant/accounts/v1beta/termsofservicekind_pb' - - -descriptor_data = "\n=google/shopping/merchant/accounts/v1beta/termsofservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\"\xb2\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12J\n\x04kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x90\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x04kind\x18\x02 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x32\xc7\x05\n\x15TermsOfServiceService\x12\xca\x01\n\x11GetTermsOfService\x12\x42.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1beta/{name=termsOfService/*}\x12\xdf\x01\n\x1cRetrieveLatestTermsOfService\x12M.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"6\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1beta/termsOfService:retrieveLatest\x12\xb5\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x45.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x95\x01\n,com.google.shopping.merchant.accounts.v1betaB\x13TermsOfServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfService").msgclass - GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest").msgclass - RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest").msgclass - AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb deleted file mode 100644 index f300591e6416..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofservice_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Service to support `TermsOfService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceService' - - # Retrieves the `TermsOfService` associated with the provided version. - rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Accepts a `TermsOfService`. Executing this method requires admin access. - rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb deleted file mode 100644 index 1be87bcf62c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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/shopping/merchant/accounts/v1beta/termsofservicekind_pb' -require 'google/type/date_pb' - - -descriptor_data = "\nKgoogle/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12[\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12I\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.AcceptedH\x00\x88\x01\x01\x12I\n\x08required\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.RequiredH\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xcf\x01\n\x08\x41\x63\x63\x65pted\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12<\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB\'\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12+\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"j\n\x08Required\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x14\n\x0ctos_file_uri\x18\x02 \x01(\t\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xcf\x05\n#TermsOfServiceAgreementStateService\x12\x8e\x02\n\x1fGetTermsOfServiceAgreementState\x12P.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/accounts/v1beta/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xcd\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12\x63.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"j\xda\x41\x06parent\x82\xd3\xe4\x93\x02[\x12Y/accounts/v1beta/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x01\n,com.google.shopping.merchant.accounts.v1betaB!TermsOfServiceAgreementStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState").msgclass - Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Accepted").msgclass - Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Required").msgclass - GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest").msgclass - RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb deleted file mode 100644 index edbccf383c55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Service to support `TermsOfServiceAgreementState` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService' - - # Returns the state of a terms of service agreement. - rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - # Retrieves the state of the agreement for the application terms of service. - rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb deleted file mode 100644 index 35ab44903852..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto - -require 'google/protobuf' - - -descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x12(google.shopping.merchant.accounts.v1beta*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17TermsOfServiceKindProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceKind").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb deleted file mode 100644 index a4ae3c613309..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/user.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accessright_pb' - - -descriptor_data = "\n3google/shopping/merchant/accounts/v1beta/user.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1beta/accessright.proto\"\xc6\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.shopping.merchant.accounts.v1beta.User.StateB\x03\xe0\x41\x03\x12Q\n\raccess_rights\x18\x04 \x03(\x0e\x32\x35.google.shopping.merchant.accounts.v1beta.AccessRightB\x03\xe0\x41\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa8\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x04user\x18\x03 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x8c\x01\n\x11UpdateUserRequest\x12\x41\n\x04user\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"k\n\x11ListUsersResponse\x12=\n\x05users\x18\x01 \x03(\x0b\x32..google.shopping.merchant.accounts.v1beta.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xfc\x07\n\x0bUserService\x12\xae\x01\n\x07GetUser\x12\x38.google.shopping.merchant.accounts.v1beta.GetUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{name=accounts/*/users/*}\x12\xc1\x01\n\nCreateUser\x12;.google.shopping.merchant.accounts.v1beta.CreateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"F\xda\x41\x0bparent,user\x82\xd3\xe4\x93\x02\x32\"*/accounts/v1beta/{parent=accounts/*}/users:\x04user\x12\x9c\x01\n\nDeleteUser\x12;.google.shopping.merchant.accounts.v1beta.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/accounts/v1beta/{name=accounts/*/users/*}\x12\xcb\x01\n\nUpdateUser\x12;.google.shopping.merchant.accounts.v1beta.UpdateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"P\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x37\x32//accounts/v1beta/{user.name=accounts/*/users/*}:\x04user\x12\xc1\x01\n\tListUsers\x12:.google.shopping.merchant.accounts.v1beta.ListUsersRequest\x1a;.google.shopping.merchant.accounts.v1beta.ListUsersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8b\x01\n,com.google.shopping.merchant.accounts.v1betaB\tUserProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User").msgclass - User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User.State").enummodule - GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetUserRequest").msgclass - CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateUserRequest").msgclass - DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteUserRequest").msgclass - UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateUserRequest").msgclass - ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersRequest").msgclass - ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb deleted file mode 100644 index 64065f29308c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/client" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/user_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "user_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb deleted file mode 100644 index bd71f6b81cea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +++ /dev/null @@ -1,891 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - ## - # Client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @user_service_stub.universe_domain - end - - ## - # Create a new UserService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1beta/user_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 - - @user_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :create_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :delete_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.user&.name - header_params["user.name"] = request.user.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :update_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, request, response, 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 UserService API. - # - # This class represents the configuration for UserService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb deleted file mode 100644 index b280d41b5a54..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Credentials for the UserService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb deleted file mode 100644 index e0b82b1f8295..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Path helper methods for the UserService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb deleted file mode 100644 index 485719a9a0b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb deleted file mode 100644 index 5c14f5af0f01..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +++ /dev/null @@ -1,813 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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 - - @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.create_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.delete_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.update_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.list_users request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 UserService REST API. - # - # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb deleted file mode 100644 index c297a2b417f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST service stub for the UserService 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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def get_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def create_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def update_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # A result object deserialized from the server's reply - def list_users request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_users", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # 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_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/users", - body: "user", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{user.name}", - body: "user", - matches: [ - ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_users_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/users", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb deleted file mode 100644 index 54dabf37a72e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/user_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Service to support user API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.UserService' - - # Retrieves a Merchant Center account user. - rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Creates a Merchant Center account user. Executing this method requires - # admin access. - rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Google::Protobuf::Empty - # Updates a Merchant Center account user. Executing this method requires - # admin access. - rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Lists all users of a Merchant Center account. - rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb deleted file mode 100644 index 9d433caf1711..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/verificationmailsettings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1beta/verificationmailsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x02\n\x18VerificationMailSettings\x12|\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\xa4\x02\n,com.google.shopping.merchant.accounts.v1betaB\x1dVerificationMailSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb\xaa\x02(Google.Shopping.Merchant.Accounts.V1Beta\xca\x02(Google\\Shopping\\Merchant\\Accounts\\V1beta\xea\x02,Google::Shopping::Merchant::Accounts::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings").msgclass - VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb deleted file mode 100644 index b50ef86acc14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb deleted file mode 100644 index d51673a9fd9a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The access right. - module AccessRight - # Default value. This value is unused. - ACCESS_RIGHT_UNSPECIFIED = 0 - - # Standard access rights. - STANDARD = 1 - - # Admin access rights. - ADMIN = 2 - - # Users with this right have access to performance and insights. - PERFORMANCE_REPORTING = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb deleted file mode 100644 index fb5a0c3c1f9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The tax settings of a merchant account. All methods require the admin role. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the tax setting. - # Format: - # "\\{account_tax.name=accounts/\\{account}}" - # @!attribute [r] account - # @return [::Integer] - # Output only. The ID of the account to which these account tax settings - # belong. - # @!attribute [rw] tax_rules - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TaxRule>] - # Tax rules. "Define the tax rules in each region. - # No tax will be presented if a region has no rule." - class AccountTax - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get tax settings - # @!attribute [rw] name - # @return [::String] - # Required. The name from which tax settings will be retrieved - class GetAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update the tax settings - # @!attribute [rw] account_tax - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # Required. The tax setting that will be updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated - class UpdateAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list all sub-account tax settings only for the requesting merchant - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @!attribute [rw] page_token - # @return [::String] - # The token returned by the previous request. - class ListAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to account tax list request - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] account_taxes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # Page of accounttax settings - # @!attribute [rw] next_page_token - # @return [::String] - # The token for the retrieval of the next page of account tax settings. - class ListAccountTaxResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb deleted file mode 100644 index 5cce1309c12e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An - # [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account issue. - # Format: `accounts/{account}/issues/{id}` - # @!attribute [rw] title - # @return [::String] - # The localized title of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The overall severity of the issue. - # @!attribute [rw] impacted_destinations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination>] - # The impact this issue has on various destinations. - # @!attribute [rw] detail - # @return [::String] - # Further localized details about the issue. - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to Merchant Center Help Center providing further information about the - # issue and how to fix it. - class AccountIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a destination. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The impacted reporting context. - # @!attribute [rw] impacts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination::Impact>] - # The (negative) impact for various regions on the given destination. - class ImpactedDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a region. - # @!attribute [rw] region_code - # @return [::String] - # The [CLDR region code](https://cldr.unicode.org/) where this issue - # applies. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The severity of the issue on the destination and region. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All possible issue severities. - module Severity - # The severity is unknown. - SEVERITY_UNSPECIFIED = 0 - - # The issue causes offers to not serve. - CRITICAL = 1 - - # The issue might affect offers (in the future) or might be an - # indicator of issues with offers. - ERROR = 2 - - # The issue is a suggestion for improvement. - SUGGESTION = 3 - end - end - - # Request message for the `ListAccountIssues` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - class ListAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountIssues` method. - # @!attribute [rw] account_issues - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # The issues from the specified account. - # @!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 ListAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb deleted file mode 100644 index 573b329cfd2a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account. - # Format: `accounts/{account}` - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of the account. - # @!attribute [rw] account_name - # @return [::String] - # Required. A human-readable name of the account. See - # [store name](https://support.google.com/merchants/answer/160556) and - # [business name](https://support.google.com/merchants/answer/12159159) for - # more information. - # @!attribute [rw] adult_content - # @return [::Boolean] - # Whether this account contains adult content. - # @!attribute [r] test_account - # @return [::Boolean] - # Output only. Whether this is a test account. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Required. The time zone of the account. - # - # On writes, `time_zone` sets both the `reporting_time_zone` and the - # `display_time_zone`. - # - # For reads, `time_zone` always returns the `display_time_zone`. If - # `display_time_zone` doesn't exist for your account, `time_zone` is empty. - # @!attribute [rw] language_code - # @return [::String] - # Required. The account's [BCP-47 language - # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateAndConfigureAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The account to be created. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest>] - # Optional. Users to be added to the account. - # @!attribute [rw] accept_terms_of_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @!attribute [rw] service - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - class CreateAndConfigureAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference to a Terms of Service resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version in the format - # `termsOfService/{version}`. To retrieve the latest version, use the - # [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) - # method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). - # This is either a country when the ToS applies specifically to that - # country or `001` when it applies globally. - class AcceptTermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instructions to add account services during creation of the - # account. - # @!attribute [rw] account_aggregation - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountAggregation] - # The provider is an - # [aggregator](https://support.google.com/merchants/answer/188487) for - # the account. Payload for service type Account Aggregation. - # @!attribute [rw] provider - # @return [::String] - # Optional. The provider of the service. - # Format: `accounts/{account}` - class AddAccountService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for the `DeleteAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - class DeleteAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The new version of the account. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListAccounts` method. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - class ListAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts matching the `ListAccountsRequest`. - # @!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 ListAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListSubAccounts` method. - # @!attribute [rw] provider - # @return [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - class ListSubAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListSubAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts for which the given parent account is an aggregator. - # @!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 ListSubAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb deleted file mode 100644 index 19cff87b2479..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.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 Shopping - module Merchant - module Accounts - module V1beta - # `AccountAggregation` payload. - class AccountAggregation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb deleted file mode 100644 index e321368804c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the - # [autofeed](https://support.google.com/merchants/answer/7538732) settings. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings`. - # @!attribute [rw] enable_products - # @return [::Boolean] - # Required. Enables or disables product crawling through the autofeed for the - # given account. Autofeed accounts must meet [certain - # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), - # which can be checked through the `eligible` field. - # The account must **not** be a marketplace. - # When the autofeed is enabled for the first time, the products usually - # appear instantly. When re-enabling, it might take up to 24 hours for - # products to appear. - # @!attribute [r] eligible - # @return [::Boolean] - # Output only. Determines whether merchant is eligible for being enrolled - # into an autofeed. - class AutofeedSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutofeedSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - class GetAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutofeedSettings` method. - # @!attribute [rw] autofeed_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # Required. The new version of the autofeed setting. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb deleted file mode 100644 index 08941d3f76aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [automatic - # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) - # of an account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements`. - # @!attribute [rw] item_updates - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates] - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] image_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements] - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] shipping_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticShippingImprovements] - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning - # on [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times - # shown to shoppers using Google. More accurate delivery times, especially - # when faster, typically lead to better conversion rates. Google will improve - # your estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # This field is only updated (cleared) if provided in the update mask. - class AutomaticImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # @!attribute [rw] account_item_updates_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] - # Optional. Determines which attributes of the items should be automatically - # updated. If this field is not present and provided in the update mask, then - # the settings will be deleted. If there are no settings for subaccount, they - # are inherited from aggregator. - # @!attribute [r] effective_allow_price_updates - # @return [::Boolean] - # Output only. The effective value of allow_price_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_availability_updates - # @return [::Boolean] - # Output only. The effective value of allow_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_strict_availability_updates - # @return [::Boolean] - # Output only. The effective value of - # allow_strict_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_condition_updates - # @return [::Boolean] - # Output only. The effective value of allow_condition_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - class AutomaticItemUpdates - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Item Updates. - # @!attribute [rw] allow_price_updates - # @return [::Boolean] - # If price updates are enabled, Google always updates the active price with - # the crawled information. - # @!attribute [rw] allow_availability_updates - # @return [::Boolean] - # If availability updates are enabled, any previous availability values - # get overwritten if Google finds an out-of-stock annotation on the offer's - # page. - # If additionally `allow_strict_availability_updates` field is set to - # true, values get overwritten if Google finds an in-stock annotation on - # the offer’s page. - # @!attribute [rw] allow_strict_availability_updates - # @return [::Boolean] - # If `allow_availability_updates` is enabled, items are automatically - # updated in all your Shopping target countries. By default, availability - # updates will only be applied to items that are 'out of stock' on your - # website but 'in stock' on Shopping. Set this to true to also update items - # that are 'in stock' on your website, but 'out of stock' on Google - # Shopping. In order for this field to have an effect, you must also set - # `allow_availability_updates`. - # @!attribute [rw] allow_condition_updates - # @return [::Boolean] - # If condition updates are enabled, Google always updates item condition - # with the condition detected from the details of your product. - class ItemUpdatesAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # @!attribute [rw] account_image_improvements_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] - # Optional. Determines how the images should be automatically updated. - # If this field is not present and provided in the update mask, then the - # settings will be deleted. If there are no settings for subaccount, they are - # inherited from aggregator. - # @!attribute [r] effective_allow_automatic_image_improvements - # @return [::Boolean] - # Output only. The effective value of allow_automatic_image_improvements. - # If account_image_improvements_settings is present, then this value is the - # same. Otherwise, it represents the inherited value of the parent account. - # Read-only. - class AutomaticImageImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Image Improvements. - # @!attribute [rw] allow_automatic_image_improvements - # @return [::Boolean] - # Enables automatic image improvements. - class ImageImprovementsAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning on - # [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times shown - # to shoppers using Google. More accurate delivery times, especially when - # faster, typically lead to better conversion rates. Google will improve your - # estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # @!attribute [rw] allow_shipping_improvements - # @return [::Boolean] - # Enables automatic shipping improvements. - class AutomaticShippingImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutomaticImprovements` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - class GetAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutomaticImprovements` method. - # @!attribute [rw] automatic_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # Required. The new version of the automatic imrovements. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - class UpdateAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb deleted file mode 100644 index 0e7e0a4c0677..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [identity of a - # business](https://support.google.com/merchants/answer/12564247). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @!attribute [rw] promotions_consent - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::PromotionsConsent] - # Optional. Whether the identity attributes may be used for promotions. - # @!attribute [rw] black_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # black-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] women_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # women-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] veteran_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # veteran-owned. This optional field will only be available for merchants - # with a business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] latino_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # latino-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] small_business - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as a small - # business. This optional field will only be available for merchants with a - # business country set to `US`. It is also not applicable for marketplaces. - class BusinessIdentity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All information related to an identity attribute. - # @!attribute [rw] identity_declaration - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute::IdentityDeclaration] - # Required. The declaration of identity for this attribute. - class IdentityAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All possible settings regarding the declaration of an identity. - module IdentityDeclaration - # Default value indicating that no selection was made. - IDENTITY_DECLARATION_UNSPECIFIED = 0 - - # Indicates that the account identifies with the attribute. - SELF_IDENTIFIES_AS = 1 - - # Indicates that the account does not identify with the attribute. - DOES_NOT_SELF_IDENTIFY_AS = 2 - end - end - - # All possible settings regarding promotions related to the business - # identity. - module PromotionsConsent - # Default value indicating that no selection was made. - PROMOTIONS_CONSENT_UNSPECIFIED = 0 - - # Indicates that the account consented to having their business identity - # used for promotions. - PROMOTIONS_CONSENT_GIVEN = 1 - - # Indicates that the account did not consent to having their business - # identity used for promotions. - PROMOTIONS_CONSENT_DENIED = 2 - end - end - - # Request message for the `GetBusinessIdentity` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - class GetBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessIdentity` method. - # @!attribute [rw] business_identity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # Required. The new version of the business identity. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb deleted file mode 100644 index 3546fd5ee3a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a business. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @!attribute [rw] address - # @return [::Google::Type::PostalAddress] - # Optional. The address of the business. - # @!attribute [r] phone - # @return [::Google::Type::PhoneNumber] - # Output only. The phone number of the business. - # @!attribute [r] phone_verification_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::PhoneVerificationState] - # Output only. The phone verification state of the business. - # @!attribute [rw] customer_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CustomerService] - # Optional. The customer service of the business. - # @!attribute [rw] korean_business_registration_number - # @return [::String] - # Optional. The 10-digit [Korean business registration - # number](https://support.google.com/merchants/answer/9037766) separated with - # dashes in the format: XXX-XX-XXXXX. - class BusinessInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetBusinessInfo` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - class GetBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessInfo` method. - # @!attribute [rw] business_info - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # Required. The new version of the business info. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb deleted file mode 100644 index 1acb59925679..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.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 Shopping - module Merchant - module Accounts - module V1beta - # Request message for `GetCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class GetCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateCheckoutSettings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The `CheckoutSettings` object to create. - class CreateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateCheckoutSettings` method. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - class UpdateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class DeleteCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for - # a specific merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program configuration settings. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # URI settings for cart or checkout URL. - # @!attribute [rw] eligible_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Optional. The destinations to which the checkout program applies, valid - # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` - # @!attribute [r] enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. Reflects the merchant enrollment state in `Checkout` program. - # @!attribute [r] review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. Reflects the merchant review state in `Checkout` program. - # This is set based on the data quality reviews of the URL provided by - # the merchant. - # A merchant with enrollment state - # as `ENROLLED` can be in the following review states: `IN_REVIEW`, - # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of - # `ENROLLED` before a review can begin for the merchant.For more details, - # check the help center doc. - # @!attribute [r] effective_uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # Output only. The effective value of `uri_settings` for a given merchant. If - # account level settings are present then this value will be a copy of url - # settings. Otherwise, it will have the value of the parent account (for only - # marketplace sellers). - # @!attribute [r] effective_enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. The effective value of enrollment_state for a given merchant - # ID. If account level settings are present then this value will be a copy of - # the account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - # @!attribute [r] effective_review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. The effective value of `review_state` for a given merchant ID. - # If account level settings are present then this value will be a copy of the - # account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - class CheckoutSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum indicating the enrollment state of merchant in `Checkout` - # program. - module CheckoutEnrollmentState - # Default enrollment state when enrollment state is not specified. - CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Merchant has not enrolled into the program. - INACTIVE = 1 - - # Merchant has enrolled into the program by providing either an - # account level URL or checkout URLs as part of their feed. - ENROLLED = 2 - - # Merchant has previously enrolled but opted out of the program. - OPTED_OUT = 3 - end - - # Enum indicating the review state of merchant in `Checkout` - # program. - module CheckoutReviewState - # Default review state when review state is not specified. - CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 - - # Merchant provided URLs are being reviewed for data quality issues. - IN_REVIEW = 1 - - # Merchant account has been approved. Indicates the data quality checks - # have passed. - APPROVED = 2 - - # Merchant account has been disapproved due to data quality issues. - DISAPPROVED = 3 - end - end - - # URL settings for cart or checkout URL. - # @!attribute [rw] checkout_uri_template - # @return [::String] - # Checkout URL template. When the placeholders are expanded will redirect - # the buyer to the merchant checkout page with the item in the cart. For - # more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cart_uri_template - # @return [::String] - # Cart URL template. When the placeholders are expanded will redirect the - # buyer to the cart page on the merchant website with the selected - # item in cart. For more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class UriSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb deleted file mode 100644 index 5a79025d60ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Customer service information. - # @!attribute [rw] uri - # @return [::String] - # Optional. The URI where customer service may be found. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address where customer service may be reached. - # @!attribute [rw] phone - # @return [::Google::Type::PhoneNumber] - # Optional. The phone number where customer service may be called. - class CustomerService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb deleted file mode 100644 index 540f0e3bee48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The categories of notifications the user opted into / opted out of. The email - # preferences do not include mandatory announcements as users can't opt out of - # them. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the EmailPreferences. The endpoint is only - # supported for the authenticated user. - # @!attribute [rw] news_and_tips - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences::OptInState] - # Optional. Updates on new features, tips and best practices. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Opt in state of the email preference. - module OptInState - # Opt-in status is not specified. - OPT_IN_STATE_UNSPECIFIED = 0 - - # User has opted out of receiving this type of email. - OPTED_OUT = 1 - - # User has opted in to receiving this type of email. - OPTED_IN = 2 - - # User has opted in to receiving this type of email and the confirmation - # email has been sent, but user has not yet confirmed the opt in (applies - # only to certain countries). - UNCONFIRMED = 3 - end - end - - # Request message for GetEmailPreferences method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - class GetEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateEmailPreferences method. - # @!attribute [rw] email_preferences - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # Required. Email Preferences to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb deleted file mode 100644 index b8c64f5452ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Google Business Profile (GBP) account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the GBP account. Format: - # `accounts/{account}/gbpAccount/{gbp_account}` - # @!attribute [rw] gbp_account_id - # @return [::String] - # The id of the GBP account. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount::Type] - # The type of the Business Profile. - # @!attribute [rw] gbp_account_name - # @return [::String] - # The name of the Business Profile. - # For personal accounts: Email id of the owner. - # For Business accounts: Name of the Business Account. - # @!attribute [rw] listing_count - # @return [::Integer] - # Number of listings under this account. - class GbpAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the GBP account. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The GBP account is a user account. - USER = 1 - - # The GBP account is a business account. - BUSINESS_ACCOUNT = 2 - end - end - - # Request message for the ListGbpAccounts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - class ListGbpAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListGbpAccounts method. - # @!attribute [rw] gbp_accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # The GBP accounts from the specified merchant in the specified country. - # @!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 ListGbpAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkGbpAccount method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @!attribute [rw] gbp_email - # @return [::String] - # Required. The email address of the Business Profile account. - class LinkGbpAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkGbpAccount method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkGbpAccountResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb deleted file mode 100644 index 24696e1e3b3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A store's homepage. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the store's homepage. - # Format: `accounts/{account}/homepage` - # @!attribute [rw] uri - # @return [::String] - # Required. The URI (typically a URL) of the store's homepage. - # @!attribute [r] claimed - # @return [::Boolean] - # Output only. Whether the homepage is claimed. See - # https://support.google.com/merchants/answer/176793. - class Homepage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - class GetHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateHomepage` method. - # @!attribute [rw] homepage - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # Required. The new version of the homepage. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ClaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - class ClaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UnclaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - class UnclaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb deleted file mode 100644 index f4a962b34c31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Local Feed Partnership (LFP) provider. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LFP provider. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # @!attribute [r] region_code - # @return [::String] - # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). - # @!attribute [rw] display_name - # @return [::String] - # The display name of the LFP provider. - class LfpProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FindLfpProviders method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - class FindLfpProvidersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the FindLfpProviders method. - # @!attribute [rw] lfp_providers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # The LFP providers from the specified merchant in the specified country. - # @!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 FindLfpProvidersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkLfpProvider method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - class LinkLfpProviderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkLfpProvider method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkLfpProviderResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb deleted file mode 100644 index 17d29142b0ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the omnichannel settings of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the omnichannel setting. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @!attribute [rw] region_code - # @return [::String] - # Required. Immutable. Region code defined by - # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, - # and is immutable. - # @!attribute [rw] lsf_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting::LsfType] - # Required. The Local Store Front type for this country. - # @!attribute [rw] in_stock - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InStock] - # Optional. The InStock URI and state for this country. - # @!attribute [rw] pickup - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Pickup] - # Optional. The Pickup URI and state for this country. - # @!attribute [r] lfp_link - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LfpLink] - # Output only. The established link to a LFP provider. - # @!attribute [rw] odo - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnDisplayToOrder] - # Optional. The On Display to Order (ODO) policy URI and state for this - # country. - # @!attribute [rw] about - # @return [::Google::Shopping::Merchant::Accounts::V1beta::About] - # Optional. The about page URI and state for this country. - # @!attribute [rw] inventory_verification - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification] - # Optional. The inventory verification contact and state for this country. - class OmnichannelSetting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The product page experience type, which is also called the Local Store - # Front (LSF) type. Check the [HC - # article](https://support.google.com/merchants/answer/7178526) for more - # details. - module LsfType - # Default value. This value is unused. - LSF_TYPE_UNSPECIFIED = 0 - - # Google-Hosted Local Store Front. Check the [HC - # article](https://support.google.com/merchants/answer/14869424) for more - # details. - GHLSF = 1 - - # Merchant-Hosted Local Store Front Basic. Check the [HC - # article](https://support.google.com/merchants/answer/14615867) for more - # details. - MHLSF_BASIC = 2 - - # Merchant-Hosted Local Store Front Full. Check the [HC - # article](https://support.google.com/merchants/answer/14617076) for more - # details. - MHLSF_FULL = 3 - end - end - - # The state of a omnichannel setting related review process. - class ReviewState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the review process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The review process has concluded successfully. The reviewed item is - # active. - ACTIVE = 1 - - # The review process failed. - FAILED = 2 - - # The review process is running. - RUNNING = 3 - - # The review process is waiting for the merchant to take action. - ACTION_REQUIRED = 4 - end - end - - # Collection of information related to InStock. - # @!attribute [rw] uri - # @return [::String] - # Optional. Product landing page URI. It is only used for the review of MHLSF - # in-stock serving. This URI domain should match with the business's - # homepage. Required to be empty if the lsf_type is GHLSF, and required when - # the lsf_type is MHLSF_FULL or MHLSF_BASIC. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the in-stock serving. - class InStock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to Pickup. - # @!attribute [rw] uri - # @return [::String] - # Required. Pickup product page URI. It is only used for the review of pickup - # serving. This URI domain should match with the business's homepage. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the pickup serving. - class Pickup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the LFP link. - # @!attribute [rw] lfp_provider - # @return [::String] - # Required. The resource name of the LFP provider. - # Format: `lfpProviders/{lfp_provider}` - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The account ID by which this merchant is known to the LFP - # provider. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the LFP link. - class LfpLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the on display to order - # ([ODO](https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The on display to order (ODO) policy URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class OnDisplayToOrder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the about page - # ([impressum](https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The about page URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class About - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification::State] - # Output only. The state of the inventory verification process. - # @!attribute [rw] contact - # @return [::String] - # Required. The name of the contact for the inventory verification process. - # @!attribute [rw] contact_email - # @return [::String] - # Required. The email address of the contact for the inventory verification - # process. - # @!attribute [r] contact_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the contact verification. - class InventoryVerification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC) - # process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # When the merchant needs to initiate the inventory - # verification process. The next state is INACTIVE. - ACTION_REQUIRED = 1 - - # When the merchant is ready to request inventory verification. - INACTIVE = 5 - - # The inventory verification process is running. If the merchant is - # rejected, the next state is INACTIVE. - RUNNING = 2 - - # The inventory verification process succeeded. - SUCCEEDED = 3 - - # When merchant fails the inventory verification process and all attempts - # are exhausted. - SUSPENDED = 4 - end - end - - # Request message for the GetOmnichannelSettings method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class GetOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListOmnichannelSettings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - class ListOmnichannelSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListOmnichannelSettings method. - # @!attribute [rw] omnichannel_settings - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # The omnichannel settings from the specified merchant. - # @!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 ListOmnichannelSettingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateOmnichannelSetting method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to create. - class CreateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateOmnichannelSetting method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - class UpdateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RequestInventoryVerification method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class RequestInventoryVerificationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the RequestInventoryVerification method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # The omnichannel setting that was updated. - class RequestInventoryVerificationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb deleted file mode 100644 index 7e1e51be1a93..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class GetOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateOnlineReturnPolicy` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The return policy object to create. - class CreateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateOnlineReturnPolicy` method. The method - # supports field masks and when the mask is provided, only the fields specified - # in the mask are updated. - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - class UpdateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class DeleteOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListOnlineReturnPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] online_return_policies - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # The retrieved return policies. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOnlineReturnPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [Online return policy](https://support.google.com/merchants/answer/10220642) - # object. This is currently used to represent return policies for ads and free - # listings programs. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `OnlineReturnPolicy` resource. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @!attribute [r] return_policy_id - # @return [::String] - # Output only. Return policy ID generated by Google. - # @!attribute [rw] label - # @return [::String] - # Required. Immutable. This field represents the unique user-defined label of - # the return policy. It is important to note that the same label cannot be - # used in different return policies for the same country. Unless a product - # specifies a specific label attribute, policies will be automatically - # labeled as 'default'. To assign a custom return policy to certain product - # groups, follow the instructions provided in the [Return policy label] - # (https://support.google.com/merchants/answer/9445425). - # The label can contain up to 50 characters. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Required. Immutable. The countries of sale where the return policy applies. - # The values must be a valid 2 letter ISO 3166 code. - # @!attribute [rw] policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy] - # Optional. The return policy. - # @!attribute [rw] seasonal_overrides - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::SeasonalOverride>] - # Optional. Overrides to the general policy for orders placed during a - # specific set of time intervals. - # @!attribute [rw] restocking_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::RestockingFee] - # Optional. The restocking fee that applies to all return reason categories. - # This would be treated as a free restocking fee if the value is not set. - # @!attribute [rw] return_methods - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnMethod>] - # Optional. The return methods of how customers can return an item. This - # value is required to not be empty unless the type of return policy is - # noReturns. - # @!attribute [rw] item_conditions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ItemCondition>] - # Optional. The item conditions accepted for returns must not be empty unless - # the type of return policy is 'noReturns'. - # @!attribute [rw] return_shipping_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee] - # Optional. The return shipping fee. Should be set only when customer need to - # download and print the return label. - # @!attribute [rw] return_policy_uri - # @return [::String] - # Required. The return policy uri. This can used by Google to do a sanity - # check for the policy. It must be a valid URL. - # @!attribute [rw] accept_defective_only - # @return [::Boolean] - # Optional. This field specifies if merchant - # only accepts defective products for returns. - # @!attribute [rw] process_refund_days - # @return [::Integer] - # Optional. The field specifies the number of - # days it takes for merchants to process refunds. - # @!attribute [rw] accept_exchange - # @return [::Boolean] - # Optional. This field specifies if merchant - # allows customers to exchange products. - # @!attribute [rw] return_label_source - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] - # Optional. The field specifies the return - # label source. - class OnlineReturnPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The return shipping fee. This can either be a fixed fee or a boolean to - # indicate that the customer pays the actual shipping cost. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee::Type] - # Required. Type of return shipping fee. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed return shipping fee amount. This value is only applicable when type - # is `FIXED`. We will treat the return shipping fee as free if type is - # `FIXED` and this value is not set. - class ReturnShippingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return shipping fee types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The return shipping fee is a fixed value. - FIXED = 1 - - # Customers will pay the actual return shipping fee. - CUSTOMER_PAYING_ACTUAL_FEE = 2 - end - end - - # The restocking fee. This can be a flat fee or a micro percent. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed restocking fee. - # - # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] micro_percent - # @return [::Integer] - # Percent of total price in micros. 15,000,000 means 15% of the total - # price would be charged. - # - # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RestockingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available policies. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy::Type] - # Policy type. - # @!attribute [rw] days - # @return [::Integer] - # The number of days items can be returned after delivery, where one day - # is defined as 24 hours after the delivery timestamp. Required for - # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return policy types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The number of days within which a return is valid after delivery. - NUMBER_OF_DAYS_AFTER_DELIVERY = 1 - - # No returns. - NO_RETURNS = 2 - - # Life time returns. - LIFETIME_RETURNS = 3 - end - end - - # @!attribute [rw] return_days - # @return [::Integer] - # Number of days (from the delivery date) that the product can be - # returned. - # - # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_until_date - # @return [::Google::Type::Date] - # Fixed end date until which the product can be returned. - # - # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] label - # @return [::String] - # Required. Display name of this seasonal override in Merchant Center. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. Defines the date range when this seasonal override applies. - # Both start_date and end_date are inclusive. - # The dates of the seasonal overrides should not overlap. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Required. seasonal override end date (inclusive). - class SeasonalOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available return methods. - module ReturnMethod - # Default value. This value is unused. - RETURN_METHOD_UNSPECIFIED = 0 - - # Return by mail. - BY_MAIL = 1 - - # Return in store. - IN_STORE = 2 - - # Return at a kiosk. - AT_A_KIOSK = 3 - end - - # The available item conditions. - module ItemCondition - # Default value. This value is unused. - ITEM_CONDITION_UNSPECIFIED = 0 - - # New. - NEW = 1 - - # Used. - USED = 2 - end - - # The available return label sources. - module ReturnLabelSource - # Default value. This value is unused. - RETURN_LABEL_SOURCE_UNSPECIFIED = 0 - - # Download and print. - DOWNLOAD_AND_PRINT = 1 - - # Label include in the package. - IN_THE_PACKAGE = 2 - - # Customer to provide. - CUSTOMER_RESPONSIBILITY = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb deleted file mode 100644 index 8dd1d729cfe1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The phone verification state. - module PhoneVerificationState - # Default value. This value is unused. - PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 - - # The phone is verified. - PHONE_VERIFICATION_STATE_VERIFIED = 1 - - # The phone is unverified - PHONE_VERIFICATION_STATE_UNVERIFIED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb deleted file mode 100644 index 7a16e89b6c29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Defines participation in a given program for the specified account. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program. - # Format: `accounts/{account}/programs/{program}` - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a Merchant Center help page describing the program. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program::State] - # Output only. The participation state of the account in the program. - # @!attribute [r] active_region_codes - # @return [::Array<::String>] - # Output only. The regions in which the account is actively participating in - # the program. Active regions are defined as those where all program - # requirements affecting the regions have been met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country or - # `001` when the program applies globally. - # @!attribute [r] unmet_requirements - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program::Requirement>] - # Output only. The requirements that the account has not yet satisfied that - # are affecting participation in the program. - class Program - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a requirement specified for participation in the program. - # @!attribute [r] title - # @return [::String] - # Output only. Name of the requirement. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a help page describing the requirement. - # @!attribute [r] affected_region_codes - # @return [::Array<::String>] - # Output only. The regions that are currently affected by this requirement - # not being met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country - # or `001` when the program applies globally. - class Requirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible program participation states for the account. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The account is not eligible to participate in the program. - NOT_ELIGIBLE = 1 - - # The account is eligible to participate in the program. - ELIGIBLE = 2 - - # The program is enabled for the account. - ENABLED = 3 - end - end - - # Request message for the GetProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - class GetProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListPrograms method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the account for which to retrieve all programs. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - class ListProgramsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListPrograms method. - # @!attribute [rw] programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # The programs for the given account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. If this - # field is omitted, there are no subsequent pages. - class ListProgramsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the EnableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - class EnableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DisableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - class DisableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb deleted file mode 100644 index 6757ee510eca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +++ /dev/null @@ -1,195 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - class GetRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateRegion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @!attribute [rw] region_id - # @return [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The region to create. - class CreateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateRegion` method. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The updated region. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - class UpdateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - class DeleteRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - class ListRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # The regions from the specified merchant. - # @!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 ListRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographic region that you can use as a target with both the - # `RegionalInventory` and `ShippingSettings` services. You can define regions - # as collections of either postal codes or, in some countries, using predefined - # geotargets. For more information, see [Set up regions - # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) - # for more information. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the region. - # Format: `accounts/{account}/regions/{region}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the region. - # @!attribute [rw] postal_code_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea] - # Optional. A list of postal codes that defines the region area. - # @!attribute [rw] geotarget_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::GeoTargetArea] - # Optional. A list of geotargets that defines the region area. - # @!attribute [r] regional_inventory_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Regional - # Inventory configuration. - # @!attribute [r] shipping_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Shipping - # Services configuration. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of postal codes that defines the region area. - # Note: All regions defined using postal codes are accessible through the - # account's `ShippingSettings.postalCodeGroups` resource. - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # or the country the postal code group applies to. - # @!attribute [rw] postal_codes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea::PostalCodeRange>] - # Required. A range of postal codes. - class PostalCodeArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the region area. - # @!attribute [rw] begin - # @return [::String] - # Required. A postal code or a pattern of the form prefix* denoting the - # inclusive lower bound of the range defining the area. Examples values: - # `94108`, `9410*`, `9*`. - # @!attribute [rw] end - # @return [::String] - # Optional. A postal code or a pattern of the form `prefix*` denoting the - # inclusive upper bound of the range defining the area. It must have the - # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a - # postal code then postalCodeRangeEnd must be a postal code too; if - # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a - # pattern with the same prefix length. Optional: if not set, then the - # area is defined as being all the postal codes matching - # postalCodeRangeBegin. - class PostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A list of geotargets that defines the region area. - # @!attribute [rw] geotarget_criteria_ids - # @return [::Array<::Integer>] - # Required. A non-empty list of [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (for example, state). - class GeoTargetArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb deleted file mode 100644 index e5456e04275e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +++ /dev/null @@ -1,747 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The merchant account's [shipping - # setting](https://support.google.com/merchants/answer/6069284). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the shipping setting. - # Format: `accounts/{account}/shippingSetting` - # @!attribute [rw] services - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service>] - # Optional. The target account's list of services. - # @!attribute [rw] warehouses - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Warehouse>] - # Optional. A list of warehouses which can be referred to in `services`. - # @!attribute [rw] etag - # @return [::String] - # Required. This field is used for avoid async issue. Make sure shipping - # setting data - # didn't change between get call and insert call. The user should do - # following steps: - # - # 1. Set etag field as empty string for initial shipping setting creation. - # - # 2. After initial creation, call get method to obtain an etag and current - # shipping setting data before call insert. - # - # 3. Modify to wanted shipping setting information. - # - # 4. Call insert method with the wanted shipping setting information with - # the etag obtained from step 2. - # - # 5. If shipping setting data changed between step 2 and step 4. Insert - # request will fail because the etag changes every time the shipping setting - # data changes. User should repeate step 2-4 with the new etag. - class ShippingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping service. - # @!attribute [rw] service_name - # @return [::String] - # Required. Free-form name of the service. Must be unique within target - # account. - # @!attribute [rw] active - # @return [::Boolean] - # Required. A boolean exposing the active status of the shipping service. - # @!attribute [rw] delivery_countries - # @return [::Array<::String>] - # Required. The CLDR territory code of the countries to which the service - # applies. - # @!attribute [rw] currency_code - # @return [::String] - # The CLDR code of the currency to which this service applies. Must match - # that of the prices in rate groups. - # @!attribute [rw] delivery_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::DeliveryTime] - # Required. Time spent in various aspects from order to the delivery of the - # product. - # @!attribute [rw] rate_groups - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::RateGroup>] - # Optional. Shipping rate group definitions. Only the last one is allowed to - # have an empty `applicable_shipping_labels`, which means "everything else". - # The other `applicable_shipping_labels` must not overlap. - # @!attribute [rw] shipment_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::ShipmentType] - # Type of locations this service ships orders to. - # @!attribute [rw] minimum_order_value - # @return [::Google::Shopping::Type::Price] - # Minimum order value for this service. If set, indicates that customers - # will have to spend at least this amount. - # All prices within a service must have the same currency. - # Cannot be set together with minimum_order_value_table. - # @!attribute [rw] minimum_order_value_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable] - # Table of per store minimum order values for the pickup fulfillment type. - # Cannot be set together with minimum_order_value. - # @!attribute [rw] store_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig] - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram>] - # Optional. Loyalty programs that this shipping service is limited to. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] store_service_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::StoreServiceType] - # Indicates whether all stores, or selected stores, listed by this - # merchant provide local delivery. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of store codes that provide local delivery. - # If empty, then `all_stores` must be true. - # @!attribute [rw] cutoff_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig] - # Configs related to local delivery ends for the day. - # @!attribute [rw] service_radius - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance] - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - class StoreConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configs related to local delivery ends for the day. - # @!attribute [rw] local_cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig::LocalCutoffTime] - # Time that local delivery ends for the day. - # @!attribute [rw] store_close_offset_hours - # @return [::Integer] - # Only valid with local delivery fulfillment. Represents cutoff time - # as the number of hours before store closing. Mutually exclusive - # with `local_cutoff_time`. - # @!attribute [rw] no_delivery_post_cutoff - # @return [::Boolean] - # Merchants can opt-out of showing n+1 day local delivery when they have - # a shipping service configured to n day local delivery. For example, if - # the shipping service defines same-day delivery, and it's past the - # cut-off, setting this field to `true` results in the calculated - # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - # same example, setting this field to `false` results in the calculated - # shipping time being one day. This is only for local delivery. - class CutoffConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Time that local delivery ends for the day. - # @!attribute [rw] hour - # @return [::Integer] - # Hour local delivery orders must be placed by to process the same - # day. - # @!attribute [rw] minute - # @return [::Integer] - # Minute local delivery orders must be placed by to process the same - # day. - class LocalCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Indicates whether all stores, or selected stores, listed by the - # merchant provide local delivery. - module StoreServiceType - # Did not specify store service type. - STORE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Indicates whether all stores, current and future, listed by this - # merchant provide local delivery. - ALL_STORES = 1 - - # Indicates that only the stores listed in `store_codes` are eligible - # for local delivery. - SELECTED_STORES = 2 - end - end - - # [Loyalty program](https://support.google.com/merchants/answer/12922446) - # provided by a merchant. - # @!attribute [rw] program_label - # @return [::String] - # This is the loyalty program label set in your loyalty program settings in - # Merchant Center. This sub-attribute allows Google to map your loyalty - # program to eligible offers. - # @!attribute [rw] loyalty_program_tiers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram::LoyaltyProgramTiers>] - # Optional. Loyalty program tier of this shipping service. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Subset of a merchants loyalty program. - # @!attribute [rw] tier_label - # @return [::String] - # The tier label [tier_label] sub-attribute differentiates offer level - # benefits between each tier. This value is also set in your program - # settings in Merchant Center, and is required for data source changes - # even if your loyalty program only has 1 tier. - class LoyaltyProgramTiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Shipment type of shipping service. - module ShipmentType - # This service did not specify shipment type. - SHIPMENT_TYPE_UNSPECIFIED = 0 - - # This service ships orders to an address chosen by the customer. - DELIVERY = 1 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a local store near by. - LOCAL_DELIVERY = 2 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a collection point. - COLLECTION_POINT = 3 - end - end - - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - # @!attribute [rw] value - # @return [::Integer] - # Integer value of distance. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance::Unit] - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - class Distance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - module Unit - # Unit unspecified - UNIT_UNSPECIFIED = 0 - - # Unit in miles - MILES = 1 - - # Unit in kilometers - KILOMETERS = 2 - end - end - - # A fulfillment warehouse, which stores and handles inventory. - # Next tag: 7 - # @!attribute [rw] name - # @return [::String] - # Required. The name of the warehouse. Must be unique within account. - # @!attribute [rw] shipping_address - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Address] - # Required. Shipping address of the warehouse. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::WarehouseCutoffTime] - # Required. The latest time of day that an order can be accepted and begin - # processing. Later orders will be processed in the next day. The time is - # based on the warehouse postal code. - # @!attribute [rw] handling_days - # @return [::Integer] - # Required. The number of days it takes for this warehouse to pack up and - # ship an item. This is on the warehouse level, but can be overridden on the - # offer level based on the attributes of an item. - # @!attribute [rw] business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # Business days of the warehouse. - # If not set, will be Monday to Friday by default. - class Warehouse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The latest time of day that an order can be accepted and begin processing. - # Later orders will be processed in the next day. The time is based on the - # warehouse postal code. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day by the warehouse. Hour is based on the - # timezone of warehouse. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day by the warehouse. Minute is based on the - # timezone of warehouse. - class WarehouseCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping address of the warehouse. - # @!attribute [rw] street_address - # @return [::String] - # Street-level part of the address. For example: `111w 31st Street`. - # @!attribute [rw] city - # @return [::String] - # Required. City, town or commune. May also include dependent localities or - # sublocalities (For example neighborhoods or suburbs). - # @!attribute [rw] administrative_area - # @return [::String] - # Required. Top-level administrative subdivision of the country. For example, - # a state like California ("CA") or a province like Quebec ("QC"). - # @!attribute [rw] postal_code - # @return [::String] - # Required. Postal code or ZIP (For example "94043"). - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR country - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # (For example "US"). - class Address - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Time spent in various aspects from order to the delivery of the product. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. - # Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` must be set, but not both. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Maximum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. Must be greater than or equal - # to `min_transit_days`. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CutoffTime] - # Business days cutoff time definition. - # If not configured the cutoff time will be defaulted to 8AM PST. - # @!attribute [rw] min_handling_days - # @return [::Integer] - # Minimum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] max_handling_days - # @return [::Integer] - # Maximum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # Must be greater than or equal to `min_handling_days`. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] transit_time_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TransitTable] - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] handling_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be handled. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] transit_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be in-transit. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] warehouse_based_delivery_times - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::WarehouseBasedDeliveryTime>] - # Optional. Indicates that the delivery time should be calculated per - # warehouse (shipping origin location) based on the settings of the selected - # carrier. When set, no other transit time related field in [delivery - # time][[google.shopping.content.bundles.ShippingSetting.DeliveryTime] should - # be set. - class DeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days cutoff time definition. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day. - # @!attribute [rw] time_zone - # @return [::String] - # Required. [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example "Europe/Zurich". - class CutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days of the warehouse. - # @!attribute [rw] business_days - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig::Weekday>] - # Required. Regular business days. - # May not be empty. - class BusinessDayConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Weekday - WEEKDAY_UNSPECIFIED = 0 - - MONDAY = 1 - - TUESDAY = 2 - - WEDNESDAY = 3 - - THURSDAY = 4 - - FRIDAY = 5 - - SATURDAY = 6 - - SUNDAY = 7 - end - end - - # Indicates that the delivery time should be calculated per warehouse - # (shipping origin location) based on the settings of the selected carrier. - # When set, no other transit time related field in `delivery_time` should be - # set. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of - # the service must be in the eddSupportedServices list. - # @!attribute [rw] warehouse - # @return [::String] - # Required. Warehouse name. This should match - # [warehouse][ShippingSetting.warehouses.name] - class WarehouseBasedDeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping rate group definitions. Only the last one is allowed to have an - # empty `applicable_shipping_labels`, which means - # "everything else". The other `applicable_shipping_labels` must - # not overlap. - # @!attribute [rw] applicable_shipping_labels - # @return [::Array<::String>] - # Required. A list of [shipping - # labels](https://support.google.com/merchants/answer/6324504) defining the - # products to which this rate group applies to. This is a disjunction: only - # one of the labels has to match for the rate group to apply. May only be - # empty for the last rate group of a service. - # @!attribute [rw] single_value - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Value] - # The value of the rate group (For example flat rate $10). Can only be set - # if `main_table` and `subtables` are not set. - # @!attribute [rw] main_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Table] - # A table defining the rate group, when `single_value` is not - # expressive enough. Can only be set if `single_value` is not - # set. - # @!attribute [rw] subtables - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Table>] - # Optional. A list of subtables referred to by `main_table`. Can only - # be set if `main_table` is set. - # @!attribute [rw] carrier_rates - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CarrierRate>] - # Optional. A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the rate group. - # If set has to be unique within shipping service. - class RateGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A table defining the rate group, when `single_value` is not - # expressive enough. - # @!attribute [rw] name - # @return [::String] - # Name of the table. Required for subtables, ignored for the main table. - # @!attribute [rw] row_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Required. Headers of the table's rows. - # @!attribute [rw] column_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Headers of the table's columns. Optional: if not set then the table has - # only one dimension. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Row>] - # Required. The list of rows that constitute the table. Must have the same - # length as `row_headers`. - class Table - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of region names - # {::Google::Shopping::Merchant::Accounts::V1beta::Region#name Region.name} . The - # last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. - # @!attribute [rw] transit_time_labels - # @return [::Array<::String>] - # Required. A list of transit time labels. The last value can be - # `"all other labels"`. Example: - # `["food", "electronics", "all other labels"]`. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow>] - # Required. If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - class TransitTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - # @!attribute [rw] values - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow::TransitTimeValue>] - # Required. Transit time range (min-max) in business days. - class TransitTimeRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transit time range (min-max) in business days. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum transit time range in business days. 0 means same - # day delivery, 1 means next day delivery. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Must be greater than or equal to `min_transit_days`. - class TransitTimeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Table of per store minimum order values for the pickup fulfillment type. - # @!attribute [rw] store_code_set_with_movs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable::StoreCodeSetWithMov>] - # Required. A list of store code sets sharing the same minimum order value - # (MOV). At least two sets are required and the last one must be empty, which - # signifies 'MOV for all other stores'. Each store code can only appear once - # across all the sets. All prices within a service must have the same - # currency. - class MinimumOrderValueTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of store code sets sharing the same minimum order value. At least - # two sets are required and the last one must be empty, which signifies - # 'MOV for all other stores'. - # Each store code can only appear once across all the sets. - # All prices within a service must have the same currency. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of unique store codes or empty for the catch all. - # @!attribute [rw] value - # @return [::Google::Shopping::Type::Price] - # The minimum order value for the given stores. - class StoreCodeSetWithMov - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A non-empty list of row or column headers for a table. - # Exactly one of `prices`, `weights`, - # `num_items`, `postal_code_group_names`, or - # `location` must be set. - # @!attribute [rw] prices - # @return [::Array<::Google::Shopping::Type::Price>] - # Required. A list of inclusive order price upper bounds. The last price's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "currency_code": "USD"}, - # \\{"amount_micros": 500000000, "currency_code": "USD"}, - # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers - # "<= $10", "<= $500", and "> $500". All prices within a service must have - # the same currency. Must be non-empty. Must be positive except -1. Can only - # be set if all other fields are not set. - # @!attribute [rw] weights - # @return [::Array<::Google::Shopping::Type::Weight>] - # Required. A list of inclusive order weight upper bounds. The last weight's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, - # "unit": "kg"}, - # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers - # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have - # the same unit. Must be non-empty. Must be positive except -1. Can only be - # set if all other fields are not set. - # @!attribute [rw] number_of_items - # @return [::Array<::String>] - # Required. A list of inclusive number of items upper bounds. The last value - # can be - # `"infinity"`. For example - # `["10", "50", "infinity"]` represents the headers - # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can - # only be set if all other fields are not set. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of postal group names. The last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. Must - # be non-empty. Can only be set if all other fields are not set. - # @!attribute [rw] locations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LocationIdSet>] - # Required. A list of location ID sets. Must be non-empty. Can only be set if - # all other fields are not set. - class Headers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of location ID sets. Must be non-empty. Can only be set if all - # other fields are not set. - # @!attribute [rw] location_ids - # @return [::Array<::String>] - # Required. A non-empty list of - # [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (For - # example, state). - class LocationIdSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Include a list of cells. - # @!attribute [rw] cells - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Value>] - # Required. The list of cells that constitute the row. Must have the same - # length as `columnHeaders` for two-dimensional tables, a length of 1 for - # one-dimensional tables. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The single value of a rate group or the value of a rate group table's cell. - # Exactly one of `no_shipping`, `flat_rate`, - # `price_percentage`, `carrier_rateName`, - # `subtable_name` must be set. - # @!attribute [rw] no_shipping - # @return [::Boolean] - # If true, then the product can't be shipped. Must be true when set, can only - # be set if all other fields are not set. - # @!attribute [rw] flat_rate - # @return [::Google::Shopping::Type::Price] - # A flat rate. Can only be set if all other fields are not set. - # @!attribute [rw] price_percentage - # @return [::String] - # A percentage of the price represented as a number in decimal notation - # (For example, `"5.4"`). Can only be set if all other fields are not - # set. - # @!attribute [rw] carrier_rate - # @return [::String] - # The name of a carrier rate referring to a carrier rate defined in the - # same rate group. Can only be set if all other fields are not set. - # @!attribute [rw] subtable - # @return [::String] - # The name of a subtable. Can only be set in table cells (For example, not - # for single values), and only if all other fields are not set. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the carrier rate. Must be unique per rate group. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier service, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. Shipping origin for this carrier rate. - # @!attribute [rw] percentage_adjustment - # @return [::String] - # Optional. Multiplicative shipping rate modifier as a number in decimal - # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, - # `"-3"` decreases the rate by 3%. - # @!attribute [rw] flat_adjustment - # @return [::Google::Shopping::Type::Price] - # Optional. Additive shipping rate modifier. Can be negative. For example - # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, - # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the - # rate. - class CarrierRate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetShippingSetting` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - class GetShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertShippingSetting` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] shipping_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # Required. The new version of the account. - class InsertShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb deleted file mode 100644 index 5cbe635b16ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Primary type convension - # - # percent micro : 100% = 1 000 000 and 1% = 10 000 - # cannot be negative. - # - # Information about tax nexus and related parameters applicable to orders - # delivered to the area covered by a single tax admin. Nexus is created when a - # merchant is doing business in an area administered by tax admin (only US - # states are supported for nexus configuration). If merchant has nexus in a US - # state, merchant needs to pay tax to all tax authorities associated with - # the shipping destination. - # Next Id : 8 - # @!attribute [rw] location_id - # @return [::Integer] - # The admin_id or criteria_id of the region in which this rule is - # applicable. - # - # Note: The following fields are mutually exclusive: `location_id`, `post_code_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] post_code_range - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TaxRule::TaxPostalCodeRange] - # The range of postal codes in which this rule is applicable. - # - # Note: The following fields are mutually exclusive: `post_code_range`, `location_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] use_google_rate - # @return [::Boolean] - # Rate that depends on delivery location: if merchant has a nexus in - # corresponding US state, rates from authorities with jurisdiction over - # delivery area are added up. - # - # Note: The following fields are mutually exclusive: `use_google_rate`, `self_specified_rate_micros`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] self_specified_rate_micros - # @return [::Integer] - # A fixed rate specified in micros, where 100% = 1_000_000. - # Suitable for origin-based states. - # - # Note: The following fields are mutually exclusive: `self_specified_rate_micros`, `use_google_rate`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_code - # @return [::String] - # Region code in which this rule is applicable - # @!attribute [rw] shipping_taxed - # @return [::Boolean] - # If set, shipping charge is taxed (at the same rate as product) when - # delivering to this admin's area. - # Can only be set on US states without category. - # @!attribute [rw] effective_time_period - # @return [::Google::Type::Interval] - # Required. Time period when this rule is effective. If the duration is - # missing from effective_time listed, then it is open ended to the future. - # The start of this time period is inclusive, and the end is exclusive. - class TaxRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the area. - # @!attribute [rw] start - # @return [::String] - # Required. The start of the postal code range, which is also the smallest - # in the range. - # @!attribute [rw] end - # @return [::String] - # The end of the postal code range. Will be the same as start if not - # specified. - class TaxPostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb deleted file mode 100644 index 1b414fd1bccf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A `TermsOfService`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either - # a country where the ToS applies specifically to that country or `001` when - # the same `TermsOfService` can be signed in any country. However note that - # when signing a ToS that applies globally we still expect that a specific - # country is provided (this should be merchant business country or program - # country of participation). - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # The Kind this terms of service version applies to. - # @!attribute [rw] file_uri - # @return [::String] - # URI for terms of service file that needs to be displayed to signing users. - # @!attribute [rw] external - # @return [::Boolean] - # Whether this terms of service version is external. External terms of - # service versions can only be agreed through external processes and not - # directly by the merchant through UI or API. - class TermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - class GetTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveLatestTermsOfService` method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - class RetrieveLatestTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `AcceptTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] account - # @return [::String] - # Required. The account for which to accept the ToS. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - class AcceptTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb deleted file mode 100644 index 0390b017c401..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +++ /dev/null @@ -1,135 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # This resource represents the agreement state for a given account and terms of - # service kind. - # The state is as follows: - # - # * If the merchant has accepted a terms of service: - # [accepted](TermsOfServiceAggrementState.accepted) will be populated, - # otherwise it will be empty - # * If the merchant must sign a terms of service: - # [required](TermsOfServiceAggrementState.required) will be populated, - # otherwise it will be empty. - # - # Note that both [required](TermsOfServiceAggrementState.required) and - # [accepted](TermsOfServiceAggrementState.accepted) can be present. In this - # case the `accepted` terms of services will have an expiration date set in the - # [valid_until](Accepted.valid_until) field. The `required` terms of services - # need to be accepted before `valid_until` in order for the account to continue - # having a valid agreement. When accepting new terms of services we expect 3Ps - # to display the text associated with the given terms of service agreement (the - # url to the file containing the text is added in the Required message below as - # [tos_file_uri](Accepted.tos_file_uri). The actual acceptance of the terms of - # service is done by calling accept on the [TermsOfService](TermsOfService) - # resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # For example, an identifier could be: `MERCHANT_CENTER-US` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by https://cldr.unicode.org/. This is the - # country the current state applies to. - # @!attribute [rw] terms_of_service_kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Terms of Service kind associated with the particular version. - # @!attribute [rw] accepted - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Accepted] - # The accepted terms of service of this kind and for the associated - # region_code - # @!attribute [rw] required - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Required] - # The required terms of service - class TermsOfServiceAgreementState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the accepted terms of service. - # @!attribute [rw] terms_of_service - # @return [::String] - # The accepted - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService). - # @!attribute [rw] accepted_by - # @return [::String] - # The account where the acceptance was recorded. This can be the account - # itself or, in the case of subaccounts, the MCA account. - # @!attribute [rw] valid_until - # @return [::Google::Type::Date] - # When set, it states that the accepted - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is only valid until the end of this date (in UTC). A new one must be - # accepted before then. The information of the required - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is found in the [Required](Required) message. - class Accepted - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the terms of service which are required to be accepted. - # @!attribute [rw] terms_of_service - # @return [::String] - # The - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # that need to be accepted. - # @!attribute [rw] tos_file_uri - # @return [::String] - # Full URL to the terms of service file. This field is the same as - # [TermsOfService.file_uri](TermsOfService.file_uri), it is added - # here for convenience only. - class Required - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfServiceAgreementState` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - class GetTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - class RetrieveForApplicationTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb deleted file mode 100644 index 636da0a3420a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The TermsOfService Kind. - module TermsOfServiceKind - # Default value. This value is unused. - TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 - - # Merchant Center application. - MERCHANT_CENTER = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb deleted file mode 100644 index 549b2ff4eff2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.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! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A [user](https://support.google.com/merchants/answer/12160472). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the user. - # Format: `accounts/{account}/user/{email}` - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User::State] - # Output only. The state of the user. - # @!attribute [rw] access_rights - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccessRight>] - # Optional. The [access - # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) - # the user has. - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states of a user. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The user is pending confirmation. In this state, the user first needs to - # accept the invitation before performing other actions. - PENDING = 1 - - # The user is verified. - VERIFIED = 2 - end - end - - # Request message for the `GetUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - class GetUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateUser` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @!attribute [rw] user_id - # @return [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The user to create. - class CreateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - class DeleteUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateUser` method. - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListUsers` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - class ListUsersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListUsers` method. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # The users from the specified account. - # @!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 ListUsersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb deleted file mode 100644 index 50aab1617c36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Settings related to the verification email that is sent after adding a user. - # @!attribute [rw] verification_mail_mode - # @return [::Google::Shopping::Merchant::Accounts::V1beta::VerificationMailSettings::VerificationMailMode] - # Optional. Mode of the verification mail. If not set, the default is - # `SEND_VERIFICATION_MAIL`. - class VerificationMailSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different configuration options for sending a verification email - # when adding a user. - module VerificationMailMode - # Default first member of every enum. Do not use. - VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 - - # An invitation email is sent to the user added shortly after. - SEND_VERIFICATION_MAIL = 1 - - # No invitation email is sent. This can be useful if the user is - # expected to accept the invitation through the API without needing - # another notification. - SUPPRESS_VERIFICATION_MAIL = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb deleted file mode 100644 index f4ad43686e83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.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 Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values. - # * A month and day, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * [google.type.TimeOfDay][google.type.TimeOfDay] - # * {::Google::Type::DateTime google.type.DateTime} - # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb deleted file mode 100644 index 10625864f3dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.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 Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year, month, or day are 0, the DateTime is considered not to have a - # specific year, month, or day respectively. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a - # datetime without a month. - # @!attribute [rw] day - # @return [::Integer] - # Optional. Day of month. Must be from 1 to 31 and valid for the year and - # month, or 0 if specifying a datetime without a day. - # @!attribute [rw] hours - # @return [::Integer] - # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults - # to 0 (midnight). An API may choose to allow the value "24:00:00" for - # scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, - # defaults to 0. An API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999, defaults to 0. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone. For example "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number. For example "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb deleted file mode 100644 index 109db1a50c89..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object representing a phone number, suitable as an API wire format. - # - # This representation: - # - # - should not be used for locale-specific formatting of a phone number, such - # as "+1 (650) 253-0000 ext. 123" - # - # - is not designed for efficient storage - # - may not be suitable for dialing - specialized libraries (see references) - # should be used to parse the number for that purpose - # - # To do something meaningful with this number, such as format it for various - # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. - # - # For instance, in Java this would be: - # - # com.google.type.PhoneNumber wireProto = - # com.google.type.PhoneNumber.newBuilder().build(); - # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = - # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); - # if (!wireProto.getExtension().isEmpty()) { - # phoneNumber.setExtension(wireProto.getExtension()); - # } - # - # Reference(s): - # - https://github.com/google/libphonenumber - # @!attribute [rw] e164_number - # @return [::String] - # The phone number, represented as a leading plus sign ('+'), followed by a - # phone number that uses a relaxed ITU E.164 format consisting of the - # country calling code (1 to 3 digits) and the subscriber number, with no - # additional spaces or formatting. For example: - # - # - correct: "+15552220123" - # - # - incorrect: "+1 (555) 222-01234 x123" - # - # The ITU E.164 format limits the latter to 12 digits, but in practice not - # all countries respect that, so we relax that restriction here. - # National-only numbers are not allowed. - # - # References: - # - # - https://www.itu.int/rec/T-REC-E.164-201011-I - # - # - https://en.wikipedia.org/wiki/E.164. - # - # - https://en.wikipedia.org/wiki/List_of_country_calling_codes - # - # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] short_code - # @return [::Google::Type::PhoneNumber::ShortCode] - # A short code. - # - # Reference(s): - # - https://wikipedia.org/wiki/Short_code - # - # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] extension - # @return [::String] - # The phone number's extension. The extension is not standardized in ITU - # recommendations, except for being defined as a series of numbers with a - # maximum length of 40 digits. Other than digits, some other dialing - # characters such as ',' (indicating a wait) or '#' may be stored here. - # - # Note that no regions currently use extensions with short codes, so this - # field is normally only set in conjunction with an E.164 number. It is held - # separately from the E.164 number to allow for short code extensions in the - # future. - class PhoneNumber - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An object representing a short code, which is a phone number that is - # typically much shorter than regular phone numbers and can be used to - # address messages in MMS and SMS systems, as well as for abbreviated dialing - # (For example "Text 611 to see how many minutes you have remaining on your - # plan."). - # - # Short codes are restricted to a region and are not internationally - # dialable, which means the same short code can exist in different regions, - # with different usage and pricing, even if those regions share the same - # country calling code (For example: US and CA). - # @!attribute [rw] region_code - # @return [::String] - # Required. The BCP-47 region code of the location where calls to this - # short code can be made, such as "US" and "BB". - # - # Reference(s): - # - http://www.unicode.org/reports/tr35/#unicode_region_subtag - # @!attribute [rw] number - # @return [::String] - # Required. The short code digits, without a leading plus ('+') or country - # calling code. For example "611". - class ShortCode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb deleted file mode 100644 index e49308966533..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 postal address, such as for postal delivery or payments - # addresses. With a postal address, a postal service can deliver items to a - # premise, P.O. box, or similar. A postal address is not intended to model - # geographical locations like roads, towns, or mountains. - # - # In typical usage, an address would be created by user input or from importing - # existing data, depending on the type of process. - # - # Advice on address input or editing: - # - # - Use an internationalization-ready address widget such as - # https://github.com/google/libaddressinput. - # - Users should not be presented with UI elements for input or editing of - # fields outside countries where that field is used. - # - # For more guidance on how to use this schema, see: - # https://support.google.com/business/answer/6397478. - # @!attribute [rw] revision - # @return [::Integer] - # The schema revision of the `PostalAddress`. This must be set to 0, which is - # the latest revision. - # - # All new revisions **must** be backward compatible with old revisions. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the country/region of the address. This - # is never inferred and it is up to the user to ensure the value is - # correct. See https://cldr.unicode.org/ and - # https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html - # for details. Example: "CH" for Switzerland. - # @!attribute [rw] language_code - # @return [::String] - # Optional. BCP-47 language code of the contents of this address (if - # known). This is often the UI language of the input form or is expected - # to match one of the languages used in the address' country/region, or their - # transliterated equivalents. - # This can affect formatting in certain countries, but is not critical - # to the correctness of the data and will never affect any validation or - # other non-formatting related operations. - # - # If this value is not known, it should be omitted (rather than specifying a - # possibly incorrect default). - # - # Examples: "zh-Hant", "ja", "ja-Latn", "en". - # @!attribute [rw] postal_code - # @return [::String] - # Optional. Postal code of the address. Not all countries use or require - # postal codes to be present, but where they are used, they may trigger - # additional validation with other parts of the address (for example, - # state or zip code validation in the United States). - # @!attribute [rw] sorting_code - # @return [::String] - # Optional. Additional, country-specific, sorting code. This is not used - # in most regions. Where it is used, the value is either a string like - # "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or just - # a number alone, representing the "sector code" (Jamaica), "delivery area - # indicator" (Malawi) or "post office indicator" (Côte d'Ivoire). - # @!attribute [rw] administrative_area - # @return [::String] - # Optional. Highest administrative subdivision which is used for postal - # addresses of a country or region. - # For example, this can be a state, a province, an oblast, or a prefecture. - # For Spain, this is the province and not the autonomous - # community (for example, "Barcelona" and not "Catalonia"). - # Many countries don't use an administrative area in postal addresses. For - # example, in Switzerland, this should be left unpopulated. - # @!attribute [rw] locality - # @return [::String] - # Optional. Generally refers to the city or town portion of the address. - # Examples: US city, IT comune, UK post town. - # In regions of the world where localities are not well defined or do not fit - # into this structure well, leave `locality` empty and use `address_lines`. - # @!attribute [rw] sublocality - # @return [::String] - # Optional. Sublocality of the address. - # For example, this can be a neighborhood, borough, or district. - # @!attribute [rw] address_lines - # @return [::Array<::String>] - # Unstructured address lines describing the lower levels of an address. - # - # Because values in `address_lines` do not have type information and may - # sometimes contain multiple values in a single field (for example, - # "Austin, TX"), it is important that the line order is clear. The order of - # address lines should be "envelope order" for the country or region of the - # address. In places where this can vary (for example, Japan), - # `address_language` is used to make it explicit (for example, "ja" for - # large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this - # way, the most specific line of an address can be selected based on the - # language. - # - # The minimum permitted structural representation of an address consists - # of a `region_code` with all remaining information placed in the - # `address_lines`. It would be possible to format such an address very - # approximately without geocoding, but no semantic reasoning could be - # made about any of the address components until it was at least - # partially resolved. - # - # Creating an address only containing a `region_code` and `address_lines` and - # then geocoding is the recommended way to handle completely unstructured - # addresses (as opposed to guessing which parts of the address should be - # localities or administrative areas). - # @!attribute [rw] recipients - # @return [::Array<::String>] - # Optional. The recipient at the address. - # This field may, under certain circumstances, contain multiline information. - # For example, it might contain "care of" information. - # @!attribute [rw] organization - # @return [::String] - # Optional. The name of the organization at the address. - class PostalAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile deleted file mode 100644 index 1661c67a33c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta", path: "../" -else - gem "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb deleted file mode 100644 index d2c2f5b7044e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_issues call in the AccountIssueService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues. -# -def list_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - - # Call the list_account_issues method. - result = client.list_account_issues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - p item - end -end -# [END merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb deleted file mode 100644 index a6ee5c5ad6a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax. -# -def get_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - - # Call the get_account_tax method. - result = client.get_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb deleted file mode 100644 index 05f1f64c9431..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax. -# -def list_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - - # Call the list_account_tax method. - result = client.list_account_tax request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p item - end -end -# [END merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb deleted file mode 100644 index eac84cb07759..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax. -# -def update_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - - # Call the update_account_tax method. - result = client.update_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb deleted file mode 100644 index c4b1730282e8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_and_configure_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account. -# -def create_and_configure_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - - # Call the create_and_configure_account method. - result = client.create_and_configure_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb deleted file mode 100644 index be1e82db0406..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account. -# -def delete_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - - # Call the delete_account method. - result = client.delete_account request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb deleted file mode 100644 index ce0c105100dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_GetAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb deleted file mode 100644 index 507751cb8634..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts. -# -def list_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - - # Call the list_accounts method. - result = client.list_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb deleted file mode 100644 index 8db5c917e70c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_sub_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts. -# -def list_sub_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - - # Call the list_sub_accounts method. - result = client.list_sub_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb deleted file mode 100644 index d17466b32f14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account. -# -def update_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - - # Call the update_account method. - result = client.update_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb deleted file mode 100644 index 74c288fe1afe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings. -# -def get_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - - # Call the get_autofeed_settings method. - result = client.get_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb deleted file mode 100644 index fdcde06c5e91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings. -# -def update_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - - # Call the update_autofeed_settings method. - result = client.update_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb deleted file mode 100644 index aae1e325fdef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements. -# -def get_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - - # Call the get_automatic_improvements method. - result = client.get_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb deleted file mode 100644 index 846c9557c5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements. -# -def update_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - - # Call the update_automatic_improvements method. - result = client.update_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb deleted file mode 100644 index b23cc7bee95a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity. -# -def get_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - - # Call the get_business_identity method. - result = client.get_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb deleted file mode 100644 index b6b4835aabd4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity. -# -def update_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - - # Call the update_business_identity method. - result = client.update_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb deleted file mode 100644 index 7c8d4345e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info. -# -def get_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - - # Call the get_business_info method. - result = client.get_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb deleted file mode 100644 index cd34a45a3abd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info. -# -def update_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - - # Call the update_business_info method. - result = client.update_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb deleted file mode 100644 index ea2f979f5cd7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. -# -def create_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - - # Call the create_checkout_settings method. - result = client.create_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb deleted file mode 100644 index b7b8c95e0bf3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. -# -def delete_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - - # Call the delete_checkout_settings method. - result = client.delete_checkout_settings request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb deleted file mode 100644 index c7b80b5590d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. -# -def get_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - - # Call the get_checkout_settings method. - result = client.get_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb deleted file mode 100644 index 4bdc2f2116dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. -# -def update_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - - # Call the update_checkout_settings method. - result = client.update_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb deleted file mode 100644 index f1cfbb47c184..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences. -# -def get_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - - # Call the get_email_preferences method. - result = client.get_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb deleted file mode 100644 index efce339f0560..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences. -# -def update_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - - # Call the update_email_preferences method. - result = client.update_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb deleted file mode 100644 index cb5845dd1e9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_gbp_account call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account. -# -def link_gbp_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - - # Call the link_gbp_account method. - result = client.link_gbp_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - p result -end -# [END merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb deleted file mode 100644 index db5611b0eb27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_gbp_accounts call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts. -# -def list_gbp_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - - # Call the list_gbp_accounts method. - result = client.list_gbp_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - p item - end -end -# [END merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb deleted file mode 100644 index 5d6017d56856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the claim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage. -# -def claim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - - # Call the claim_homepage method. - result = client.claim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb deleted file mode 100644 index b371da4cfb57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage. -# -def get_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - - # Call the get_homepage method. - result = client.get_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb deleted file mode 100644 index 7119627b9aeb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the unclaim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage. -# -def unclaim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - - # Call the unclaim_homepage method. - result = client.unclaim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb deleted file mode 100644 index 19c3e42071a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage. -# -def update_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - - # Call the update_homepage method. - result = client.update_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb deleted file mode 100644 index e093657726da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the find_lfp_providers call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers. -# -def find_lfp_providers - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - - # Call the find_lfp_providers method. - result = client.find_lfp_providers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - p item - end -end -# [END merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb deleted file mode 100644 index 0e786754f919..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_lfp_provider call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider. -# -def link_lfp_provider - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - - # Call the link_lfp_provider method. - result = client.link_lfp_provider request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - p result -end -# [END merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb deleted file mode 100644 index 925b54971955..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting. -# -def create_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - - # Call the create_omnichannel_setting method. - result = client.create_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb deleted file mode 100644 index f41ee01542d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting. -# -def get_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - - # Call the get_omnichannel_setting method. - result = client.get_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb deleted file mode 100644 index 3b764f8ff84d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings. -# -def list_omnichannel_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - - # Call the list_omnichannel_settings method. - result = client.list_omnichannel_settings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p item - end -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb deleted file mode 100644 index 61b421be1805..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification. -# -def request_inventory_verification - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - - # Call the request_inventory_verification method. - result = client.request_inventory_verification request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb deleted file mode 100644 index c9ab04368e53..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting. -# -def update_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - - # Call the update_omnichannel_setting method. - result = client.update_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb deleted file mode 100644 index 83bc00b2c1df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy. -# -def create_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - - # Call the create_online_return_policy method. - result = client.create_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb deleted file mode 100644 index 642b3bdcdc00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy. -# -def delete_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - - # Call the delete_online_return_policy method. - result = client.delete_online_return_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb deleted file mode 100644 index 2105a2c947a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy. -# -def get_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - - # Call the get_online_return_policy method. - result = client.get_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb deleted file mode 100644 index f9a0b2b0a844..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies. -# -def list_online_return_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - - # Call the list_online_return_policies method. - result = client.list_online_return_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p item - end -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb deleted file mode 100644 index 4034ff554461..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy. -# -def update_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - - # Call the update_online_return_policy method. - result = client.update_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb deleted file mode 100644 index 775a998697dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the disable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program. -# -def disable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - - # Call the disable_program method. - result = client.disable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb deleted file mode 100644 index d1bdf22bfbc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the enable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program. -# -def enable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - - # Call the enable_program method. - result = client.enable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb deleted file mode 100644 index ca8e55bfb1f4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program. -# -def get_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - - # Call the get_program method. - result = client.get_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb deleted file mode 100644 index f3249c03a812..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_programs call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs. -# -def list_programs - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - - # Call the list_programs method. - result = client.list_programs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - p item - end -end -# [END merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb deleted file mode 100644 index 8b0ad849b120..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region. -# -def create_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - - # Call the create_region method. - result = client.create_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb deleted file mode 100644 index 97ee0432dab6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region. -# -def delete_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - - # Call the delete_region method. - result = client.delete_region request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb deleted file mode 100644 index 6929030f8c97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_GetRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region. -# -def get_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - - # Call the get_region method. - result = client.get_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb deleted file mode 100644 index 390e2d0f9420..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_ListRegions_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions. -# -def list_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - - # Call the list_regions method. - result = client.list_regions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - p item - end -end -# [END merchantapi_v1beta_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb deleted file mode 100644 index ef1e556cc578..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region. -# -def update_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - - # Call the update_region method. - result = client.update_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb deleted file mode 100644 index e6cbd703b4dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings. -# -def get_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - - # Call the get_shipping_settings method. - result = client.get_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb deleted file mode 100644 index 592e8881b30b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the insert_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings. -# -def insert_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - - # Call the insert_shipping_settings method. - result = client.insert_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json deleted file mode 100644 index 519af736323e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ /dev/null @@ -1,2535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-accounts-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.accounts.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync", - "title": "Snippet for the get_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax.", - "file": "account_tax_service/get_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "GetAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.GetAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync", - "title": "Snippet for the list_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax.", - "file": "account_tax_service/list_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "ListAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.ListAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync", - "title": "Snippet for the update_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax.", - "file": "account_tax_service/update_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "UpdateAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.UpdateAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync", - "title": "Snippet for the list_account_issues call in the AccountIssueService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues.", - "file": "account_issue_service/list_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_issues", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse", - "client": { - "short_name": "AccountIssueService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client" - }, - "method": { - "short_name": "ListAccountIssues", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService.ListAccountIssues", - "service": { - "short_name": "AccountIssueService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_GetUser_sync", - "title": "Snippet for the get_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user.", - "file": "user_service/get_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "GetUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.GetUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_CreateUser_sync", - "title": "Snippet for the create_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user.", - "file": "user_service/create_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "CreateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.CreateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_DeleteUser_sync", - "title": "Snippet for the delete_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user.", - "file": "user_service/delete_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "DeleteUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.DeleteUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_UpdateUser_sync", - "title": "Snippet for the update_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user.", - "file": "user_service/update_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "UpdateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.UpdateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_ListUsers_sync", - "title": "Snippet for the list_users call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users.", - "file": "user_service/list_users.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_users", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "ListUsers", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.ListUsers", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync", - "title": "Snippet for the create_and_configure_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account.", - "file": "accounts_service/create_and_configure_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_and_configure_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "CreateAndConfigureAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.CreateAndConfigureAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync", - "title": "Snippet for the delete_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account.", - "file": "accounts_service/delete_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "DeleteAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.DeleteAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync", - "title": "Snippet for the update_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account.", - "file": "accounts_service/update_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "UpdateAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.UpdateAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListAccounts_sync", - "title": "Snippet for the list_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts.", - "file": "accounts_service/list_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync", - "title": "Snippet for the list_sub_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts.", - "file": "accounts_service/list_sub_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sub_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListSubAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListSubAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync", - "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings.", - "file": "autofeed_settings_service/get_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "GetAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.GetAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", - "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings.", - "file": "autofeed_settings_service/update_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "UpdateAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.UpdateAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", - "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements.", - "file": "automatic_improvements_service/get_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "GetAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", - "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements.", - "file": "automatic_improvements_service/update_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "UpdateAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync", - "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity.", - "file": "business_identity_service/get_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "GetBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.GetBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", - "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity.", - "file": "business_identity_service/update_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "UpdateBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.UpdateBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync", - "title": "Snippet for the get_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info.", - "file": "business_info_service/get_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "GetBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.GetBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync", - "title": "Snippet for the update_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info.", - "file": "business_info_service/update_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "UpdateBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.UpdateBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", - "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", - "file": "checkout_settings_service/get_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "GetCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", - "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", - "file": "checkout_settings_service/create_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "CreateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", - "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", - "file": "checkout_settings_service/update_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "UpdateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", - "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", - "file": "checkout_settings_service/delete_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "DeleteCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", - "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences.", - "file": "email_preferences_service/get_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "GetEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync", - "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences.", - "file": "email_preferences_service/update_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "UpdateEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync", - "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts.", - "file": "gbp_accounts_service/list_gbp_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gbp_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "ListGbpAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync", - "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account.", - "file": "gbp_accounts_service/link_gbp_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_gbp_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "LinkGbpAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_GetHomepage_sync", - "title": "Snippet for the get_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage.", - "file": "homepage_service/get_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "GetHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.GetHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync", - "title": "Snippet for the update_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage.", - "file": "homepage_service/update_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UpdateHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UpdateHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync", - "title": "Snippet for the claim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage.", - "file": "homepage_service/claim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "claim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "ClaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.ClaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync", - "title": "Snippet for the unclaim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage.", - "file": "homepage_service/unclaim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "unclaim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UnclaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UnclaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync", - "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers.", - "file": "lfp_providers_service/find_lfp_providers.rb", - "language": "RUBY", - "client_method": { - "short_name": "find_lfp_providers", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "FindLfpProviders", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync", - "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider.", - "file": "lfp_providers_service/link_lfp_provider.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_lfp_provider", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "LinkLfpProvider", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", - "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting.", - "file": "omnichannel_settings_service/get_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "GetOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.GetOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", - "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings.", - "file": "omnichannel_settings_service/list_omnichannel_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_omnichannel_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "ListOmnichannelSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.ListOmnichannelSettings", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", - "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting.", - "file": "omnichannel_settings_service/create_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "CreateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.CreateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", - "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting.", - "file": "omnichannel_settings_service/update_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "UpdateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.UpdateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", - "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification.", - "file": "omnichannel_settings_service/request_inventory_verification.rb", - "language": "RUBY", - "client_method": { - "short_name": "request_inventory_verification", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "RequestInventoryVerification", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.RequestInventoryVerification", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", - "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy.", - "file": "online_return_policy_service/get_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "GetOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", - "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies.", - "file": "online_return_policy_service/list_online_return_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_online_return_policies", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "ListOnlineReturnPolicies", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.ListOnlineReturnPolicies", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", - "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy.", - "file": "online_return_policy_service/create_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "CreateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.CreateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync", - "title": "Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy.", - "file": "online_return_policy_service/update_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "UpdateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.UpdateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", - "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy.", - "file": "online_return_policy_service/delete_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "DeleteOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_GetProgram_sync", - "title": "Snippet for the get_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program.", - "file": "programs_service/get_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "GetProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.GetProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync", - "title": "Snippet for the list_programs call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs.", - "file": "programs_service/list_programs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_programs", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "ListPrograms", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.ListPrograms", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync", - "title": "Snippet for the enable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program.", - "file": "programs_service/enable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "EnableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.EnableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync", - "title": "Snippet for the disable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program.", - "file": "programs_service/disable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "DisableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.DisableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_GetRegion_sync", - "title": "Snippet for the get_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region.", - "file": "regions_service/get_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "GetRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.GetRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_CreateRegion_sync", - "title": "Snippet for the create_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region.", - "file": "regions_service/create_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "CreateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.CreateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync", - "title": "Snippet for the update_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region.", - "file": "regions_service/update_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "UpdateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.UpdateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync", - "title": "Snippet for the delete_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region.", - "file": "regions_service/delete_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "DeleteRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.DeleteRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_ListRegions_sync", - "title": "Snippet for the list_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions.", - "file": "regions_service/list_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "ListRegions", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.ListRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync", - "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings.", - "file": "shipping_settings_service/get_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "GetShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.GetShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync", - "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings.", - "file": "shipping_settings_service/insert_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "InsertShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.InsertShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync", - "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service.", - "file": "terms_of_service_service/get_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "GetTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.GetTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", - "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", - "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_latest_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "RetrieveLatestTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.RetrieveLatestTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync", - "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service.", - "file": "terms_of_service_service/accept_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "accept_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "AcceptTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.AcceptTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", - "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "GetTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", - "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_for_application_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "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-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb deleted file mode 100644 index 6002493fa06e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. -# -def get_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - - # Call the get_terms_of_service_agreement_state method. - result = client.get_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb deleted file mode 100644 index fce83e3ae057..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. -# -def retrieve_for_application_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - - # Call the retrieve_for_application_terms_of_service_agreement_state method. - result = client.retrieve_for_application_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb deleted file mode 100644 index b1e3c65fd56f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the accept_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service. -# -def accept_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - - # Call the accept_terms_of_service method. - result = client.accept_terms_of_service request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb deleted file mode 100644 index 72780fd192f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service. -# -def get_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - - # Call the get_terms_of_service method. - result = client.get_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb deleted file mode 100644 index e0039a91db2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service. -# -def retrieve_latest_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - - # Call the retrieve_latest_terms_of_service method. - result = client.retrieve_latest_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb deleted file mode 100644 index 99337d55834e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_CreateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user. -# -def create_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - - # Call the create_user method. - result = client.create_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb deleted file mode 100644 index 07a8a692be99..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_DeleteUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user. -# -def delete_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - - # Call the delete_user method. - result = client.delete_user request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb deleted file mode 100644 index 7e279d65f5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_GetUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user. -# -def get_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - - # Call the get_user method. - result = client.get_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb deleted file mode 100644 index 17dca433a258..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_ListUsers_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_users call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users. -# -def list_users - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - - # Call the list_users method. - result = client.list_users request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - p item - end -end -# [END merchantapi_v1beta_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb deleted file mode 100644 index a39e0c84162a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_UpdateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user. -# -def update_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - - # Call the update_user method. - result = client.update_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb deleted file mode 100644 index d759cbee13e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb deleted file mode 100644 index 3b4c93312537..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb deleted file mode 100644 index 1762325f7744..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, 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["language_code"] - assert_equal "hello world", request["time_zone"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_issues_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_issues_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb deleted file mode 100644 index f72de9504a1c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_tax_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_tax_path account: "value0", tax: "value1" - assert_equal "accounts/value0/accounttax/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb deleted file mode 100644 index 2448c1d9965f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_get_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account_tax({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account_tax name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account_tax({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_count - end - end - end - - def test_list_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - http_response = OpenStruct.new 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_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_list_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_count - end - end - end - - def test_update_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_update_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account_tax account_tax: account_tax, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb deleted file mode 100644 index fb9595c10ef5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account_tax({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account_tax name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account_tax({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_rpc_count - end - end - - def test_list_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, 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_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_rpc_count - end - end - - def test_update_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax), request["account_tax"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account_tax account_tax: account_tax, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb deleted file mode 100644 index 62d77fd98b02..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb deleted file mode 100644 index 007709ef9bbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb +++ /dev/null @@ -1,432 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_create_and_configure_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_count - end - end - end - - def test_delete_account - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_account({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_account name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_account({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_count - end - end - end - - def test_update_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account({ account: account, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account account: account, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_count - end - end - end - - def test_list_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_accounts_client_stub.call_count - end - end - end - - def test_list_sub_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb deleted file mode 100644 index b804a96086a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_create_and_configure_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_and_configure_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request["users"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService), request["accept_terms_of_service"] - assert request.has_accept_terms_of_service? - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_rpc_count - end - end - - def test_delete_account - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_account({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_account name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_account({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_rpc_count - end - end - - def test_update_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account({ account: account, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account account: account, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account({ account: account, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_rpc_count - end - end - - def test_list_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, request - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_accounts_client_stub.call_rpc_count - end - end - - def test_list_sub_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sub_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, request - assert_equal "hello world", request["provider"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_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_sub_accounts_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb deleted file mode 100644 index 0d03f7e27cbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.autofeed_settings_path account: "value0" - assert_equal "accounts/value0/autofeedSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb deleted file mode 100644 index e568de354b9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_autofeed_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_autofeed_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_autofeed_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_count - end - end - end - - def test_update_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb deleted file mode 100644 index 81bf70221d6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_autofeed_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_autofeed_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_update_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings), request["autofeed_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb deleted file mode 100644 index 5432846fad2e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.automatic_improvements_path account: "value0" - assert_equal "accounts/value0/automaticImprovements", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb deleted file mode 100644 index 3661fc4b5cb9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_automatic_improvements({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_automatic_improvements name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_automatic_improvements({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_count - end - end - end - - def test_update_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb deleted file mode 100644 index e1e55704cfc9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_automatic_improvements({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_automatic_improvements name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_update_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements), request["automatic_improvements"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb deleted file mode 100644 index 20f3daac2d1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_identity_path account: "value0" - assert_equal "accounts/value0/businessIdentity", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb deleted file mode 100644 index d8cf55cffb39..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_business_identity({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_business_identity name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_business_identity({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_count - end - end - end - - def test_update_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb deleted file mode 100644 index 3ba57bd06fbd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_business_identity({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_business_identity name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_business_identity({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_rpc_count - end - end - - def test_update_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity), request["business_identity"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb deleted file mode 100644 index 128cf717a145..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_info_path account: "value0" - assert_equal "accounts/value0/businessInfo", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb deleted file mode 100644 index 1e3541aadd85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_business_info({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_business_info name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_business_info({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_count - end - end - end - - def test_update_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb deleted file mode 100644 index cd6e3250647c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_business_info({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_business_info name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_business_info({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_rpc_count - end - end - - def test_update_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo), request["business_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_business_info({ business_info: business_info, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb deleted file mode 100644 index 4f838dc12447..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.checkout_settings_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1/checkoutSettings", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb deleted file mode 100644 index d1109975a30a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_count - end - end - end - - def test_create_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_count - end - end - end - - def test_update_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_count - end - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_checkout_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb deleted file mode 100644 index 238e43a52a09..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ /dev/null @@ -1,340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_rpc_count - end - end - - def test_create_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_rpc_count - end - end - - def test_update_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_rpc_count - end - end - - def test_delete_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(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_checkout_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb deleted file mode 100644 index a4b6db6efe0f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_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/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.email_preferences_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1/emailPreferences", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb deleted file mode 100644 index abdc1010bd13..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_email_preferences({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_email_preferences name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_email_preferences({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_count - end - end - end - - def test_update_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb deleted file mode 100644 index 31103ff9a7aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_email_preferences({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_email_preferences name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_email_preferences({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_rpc_count - end - end - - def test_update_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences), request["email_preferences"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb deleted file mode 100644 index 28b36c651b32..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_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/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb deleted file mode 100644 index 7d9ec650854d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count - end - end - end - - def test_link_gbp_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_gbp_account_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb deleted file mode 100644 index 0a94b37e7a87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gbp_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count - end - end - - def test_link_gbp_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_gbp_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gbp_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_gbp_account_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb deleted file mode 100644 index 61d80f67f1a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.homepage_path account: "value0" - assert_equal "accounts/value0/homepage", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb deleted file mode 100644 index 24f5f703463f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb +++ /dev/null @@ -1,316 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_count - end - end - end - - def test_update_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_homepage_client_stub.call_count - end - end - end - - def test_claim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.claim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.claim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.claim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_count - end - end - end - - def test_unclaim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.unclaim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.unclaim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.unclaim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb deleted file mode 100644 index 541f4c4af0ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ /dev/null @@ -1,338 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_rpc_count - end - end - - def test_update_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Homepage), request["homepage"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_homepage({ homepage: homepage, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count - end - end - - def test_claim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :claim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, claim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.claim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.claim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.claim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_rpc_count - end - end - - def test_unclaim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unclaim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.unclaim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.unclaim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.unclaim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unclaim_homepage_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb deleted file mode 100644 index 40c4e008e3f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_lfp_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" - assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb deleted file mode 100644 index 9441edd6a6fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count - end - end - end - - def test_link_lfp_provider - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb deleted file mode 100644 index 95a5bb2889f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :find_lfp_providers, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count - end - end - - def test_link_lfp_provider - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_lfp_provider, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["external_account_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_lfp_provider_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb deleted file mode 100644 index fda485c81acf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb deleted file mode 100644 index 4e97a17d0072..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_omnichannel_setting({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_omnichannel_setting name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_omnichannel_setting({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_count - end - end - end - - def test_list_omnichannel_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count - end - end - end - - def test_create_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_count - end - end - end - - def test_update_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_omnichannel_setting_client_stub.call_count - end - end - end - - def test_request_inventory_verification - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.request_inventory_verification({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.request_inventory_verification name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.request_inventory_verification({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb deleted file mode 100644 index 54fe923feebb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_omnichannel_setting({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_omnichannel_setting name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_list_omnichannel_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_omnichannel_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count - end - end - - def test_create_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_update_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_request_inventory_verification - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :request_inventory_verification, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.request_inventory_verification({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.request_inventory_verification name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.request_inventory_verification({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, request_inventory_verification_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb deleted file mode 100644 index c8399e11c1e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_online_return_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.online_return_policy_path account: "value0", return_policy: "value1" - assert_equal "accounts/value0/onlineReturnPolicies/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb deleted file mode 100644 index 9d60cb71c44e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_count - end - end - end - - def test_list_online_return_policies - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count - end - end - end - - def test_create_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_count - end - end - end - - def test_update_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_update_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_online_return_policy_client_stub.call_count - end - end - end - - def test_delete_online_return_policy - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_online_return_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb deleted file mode 100644 index 0cbc348828d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_rpc_count - end - end - - def test_list_online_return_policies - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_online_return_policies, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count - end - end - - def test_create_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_rpc_count - end - end - - def test_update_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_online_return_policy_client_stub.call_rpc_count - end - end - - def test_delete_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb deleted file mode 100644 index 380202e72500..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_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/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb deleted file mode 100644 index 91c368ce6958..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_count - end - end - end - - def test_list_programs - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_programs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_count - end - end - end - - def test_enable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_count - end - end - end - - def test_disable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb deleted file mode 100644 index 5d47d7fdf72c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_rpc_count - end - end - - def test_list_programs - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_programs, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, 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_programs_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_programs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_rpc_count - end - end - - def test_enable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_rpc_count - end - end - - def test_disable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_program_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb deleted file mode 100644 index 698e3d23528b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_region_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.region_path account: "value0", region: "value1" - assert_equal "accounts/value0/regions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb deleted file mode 100644 index 7a80d1a66e9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_count - end - end - end - - def test_create_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_region parent: parent, region_id: region_id, region: region do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_count - end - end - end - - def test_update_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_region({ region: region, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_region region: region, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_region_client_stub.call_count - end - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_region_client_stub.call_count - end - end - end - - def test_list_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_regions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb deleted file mode 100644 index b8d04e0ec14d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb +++ /dev/null @@ -1,409 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_rpc_count - end - end - - def test_create_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["region_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_region parent: parent, region_id: region_id, region: region do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_rpc_count - end - end - - def test_update_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_region({ region: region, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_region region: region, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_region({ region: region, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count - end - end - - def test_delete_region - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count - end - end - - def test_list_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, 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_regions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_regions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb deleted file mode 100644 index 555555c1a601..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.shipping_settings_path account: "value0" - assert_equal "accounts/value0/shippingSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb deleted file mode 100644 index 12786998e452..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_shipping_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_shipping_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_shipping_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_count - end - end - end - - def test_insert_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb deleted file mode 100644 index a07f02f18b17..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_shipping_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_shipping_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_shipping_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_rpc_count - end - end - - def test_insert_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings), request["shipping_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb deleted file mode 100644 index eecca8da77a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_agreement_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" - assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb deleted file mode 100644 index aa3c6d3f45be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb +++ /dev/null @@ -1,207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_terms_of_service_agreement_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_terms_of_service_agreement_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count - end - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb deleted file mode 100644 index f42810b4c121..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_terms_of_service_agreement_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_terms_of_service_agreement_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_for_application_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.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, retrieve_for_application_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb deleted file mode 100644 index cecc22896b0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb deleted file mode 100644 index 881bf00a9a36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_terms_of_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_terms_of_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_terms_of_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_count - end - end - end - - def test_retrieve_latest_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count - end - end - end - - def test_accept_terms_of_service - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb deleted file mode 100644 index 2e8bb0f3b620..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ /dev/null @@ -1,284 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_terms_of_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_terms_of_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_terms_of_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_rpc_count - end - end - - def test_retrieve_latest_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_latest_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, request - assert_equal "hello world", request["region_code"] - assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count - end - end - - def test_accept_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :accept_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["account"] - assert_equal "hello world", request["region_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb deleted file mode 100644 index e71cf60afd5d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb deleted file mode 100644 index 55c4d6896e48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_count - end - end - end - - def test_create_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_user parent: parent, user_id: user_id, user: user do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_count - end - end - end - - def test_delete_user - # 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_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_count - end - end - end - - def test_update_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_user({ user: user, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_user user: user, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_user_client_stub.call_count - end - end - end - - def test_list_users - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_users_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_users parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb deleted file mode 100644 index 21191fcbe518..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb +++ /dev/null @@ -1,409 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_rpc_count - end - end - - def test_create_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["user_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_user parent: parent, user_id: user_id, user: user do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_rpc_count - end - end - - def test_delete_user - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(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_user_client_stub.call_rpc_count - end - end - - def test_update_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_user({ user: user, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_user user: user, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_user({ user: user, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count - end - end - - def test_list_users - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_users, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, 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_users_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_users parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json deleted file mode 100644 index 20ec393175c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", - "distribution_name": "google-shopping-merchant-conversions-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml deleted file mode 100644 index dc26bdfd3a23..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-conversions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md deleted file mode 100644 index 6489474b1d66..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1" - -::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md deleted file mode 100644 index e7b96a955e31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. -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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile deleted file mode 100644 index 09036b63c7b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1" - header "google-shopping-merchant-conversions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json deleted file mode 100644 index c91c1680b96f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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.shopping.merchant.conversions.v1", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec deleted file mode 100644 index 5c67c8439003..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1" - gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb deleted file mode 100644 index 2992146c576e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb deleted file mode 100644 index d3e68a85ea00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb deleted file mode 100644 index ec823442ad31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb deleted file mode 100644 index db5605285d85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb +++ /dev/null @@ -1,975 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb deleted file mode 100644 index c408f4a3e17b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb deleted file mode 100644 index 58f06044072d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb deleted file mode 100644 index c4ae00d76953..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb deleted file mode 100644 index 172557541b57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,890 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index cba0818d9244..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb deleted file mode 100644 index 4a8730f21f3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb deleted file mode 100644 index 45549ad85a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.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/shopping/merchant/conversions/v1/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb deleted file mode 100644 index 851e5c7243ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb deleted file mode 100644 index 09fb85215856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb deleted file mode 100644 index f308c62c77bc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before - # the colon represent the type of conversion source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # * `galk`: For GoogleAnalyticsLink sources. - # * `mcdn`: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the state of a conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and is currently - # not functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the Youtube Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback window (in days) used for attribution in this source. - # Supported values are `7`, `30` & `40`. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing the type of a conversion event. - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # [models offered by Google Analytics - # 4](https://support.google.com/analytics/answer/10596866). - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Required. Attribution settings used for the Merchant Center Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # The maximum length is 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The new version of the conversion source data. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile deleted file mode 100644 index f46fb0f94950..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1", path: "../" -else - gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 827b4a926e65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index ba6b1ac8bfc2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index d9f971d44b48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 658a5ab951e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p item - end -end -# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 22afe1c1ac8b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index 67c6808b8b3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json deleted file mode 100644 index 141ac1a9a2fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb deleted file mode 100644 index 58ab80ed3978..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb deleted file mode 100644 index 31c68180521e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb deleted file mode 100644 index 407eedb71e02..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json deleted file mode 100644 index 20e6dffcf926..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta", - "distribution_name": "google-shopping-merchant-conversions-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml deleted file mode 100644 index 6d5086c6f1ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-conversions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md deleted file mode 100644 index 2159dc1507a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md deleted file mode 100644 index 63ea9c08d6d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. -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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile deleted file mode 100644 index df7ec62e5251..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1beta" - header "google-shopping-merchant-conversions-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json deleted file mode 100644 index cb28c69efe62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.conversions.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1beta", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec deleted file mode 100644 index 7e23ef15bbad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1beta" - gem.version = Google::Shopping::Merchant::Conversions::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb deleted file mode 100644 index 8aae5f49f6d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb deleted file mode 100644 index efa027bc825f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/conversions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb deleted file mode 100644 index ec937b0d20dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb deleted file mode 100644 index 5b66e173552d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +++ /dev/null @@ -1,975 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Conversions", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1beta/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb deleted file mode 100644 index fc78775e84b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb deleted file mode 100644 index 0957b8b6c5be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb deleted file mode 100644 index 050042f123cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb deleted file mode 100644 index 36efb49acdb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,890 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index fe73baae518b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1beta/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb deleted file mode 100644 index e7ee072fd173..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1beta/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/conversions/v1beta/conversionsources.proto\x12+google.shopping.merchant.conversions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x06\n\x10\x43onversionSource\x12\x66\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12m\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x46.google.shopping.merchant.conversions.v1beta.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12W\n\x05state\x18\x05 \x01(\x0e\x32\x43.google.shopping.merchant.conversions.v1beta.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x61\n\ncontroller\x18\x07 \x01(\x0e\x32H.google.shopping.merchant.conversions.v1beta.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xef\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12q\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32Q.google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12p\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xae\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12]\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\"\xb4\x01\n\x1dUpdateConversionSourceRequest\x12]\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x93\x01\n\x1dListConversionSourcesResponse\x12Y\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd2\x0c\n\x18\x43onversionSourcesService\x12\x94\x02\n\x16\x43reateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"o\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02N\"9/conversions/v1beta/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xac\x02\n\x16UpdateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"\x86\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02`2K/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xc6\x01\n\x16\x44\x65leteConversionSource\x12J.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xf6\x01\n\x18UndeleteConversionSource\x12L.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"M\x82\xd3\xe4\x93\x02G\"B/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xe7\x01\n\x13GetConversionSource\x12G.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xfa\x01\n\x15ListConversionSources\x12I.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest\x1aJ.google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdf\x01\n/com.google.shopping.merchant.conversions.v1betaB\x16\x43onversionSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb;conversionspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb deleted file mode 100644 index f25fc3f2e077..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.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/shopping/merchant/conversions/v1beta/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb deleted file mode 100644 index 9238cbdb5b76..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1beta/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb deleted file mode 100644 index 6860c89e382f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb deleted file mode 100644 index f44123837180..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1beta::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1beta::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: [a-z]\\{4}:.+ The four characters before the - # colon represent the type of conversio source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # - galk: For GoogleAnalyticsLink sources. - # - mcdn: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents state of the conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and not - # currently functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the YT Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback windows (in days) used for attribution in this source. - # Supported values are 7, 30, 40. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing a types of conversion events - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # models offered by Google Analytics 4, as described in: - # https://support.google.com/analytics/answer/10596866. - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Required. Attribution settings being used for the Merchant Center - # Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # Limited to 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) option. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile deleted file mode 100644 index 6a2aef3b6555..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta", path: "../" -else - gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 8081af021563..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index 67d343214d62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index 6c928140a9a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 45183543d605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p item - end -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 88a2acac8a2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index e65690f44b15..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json deleted file mode 100644 index 6649119ca2d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb deleted file mode 100644 index ac9354d66391..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb deleted file mode 100644 index dce67f4f09e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb deleted file mode 100644 index 67b1bc0f16d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" From 10e1bd621517dc3607a8e3a3e4009ee65bf09eb6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:11:14 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-web_security_scanner-v1beta.rb | 2 +- .../cloud/web_security_scanner/v1beta.rb | 2 +- .../cloud/web_security_scanner/v1beta/rest.rb | 2 +- .../v1beta/web_security_scanner.rb | 2 +- .../v1beta/web_security_scanner/client.rb | 2 +- .../web_security_scanner/credentials.rb | 2 +- .../v1beta/web_security_scanner/paths.rb | 2 +- .../v1beta/web_security_scanner/rest.rb | 2 +- .../web_security_scanner/rest/client.rb | 2 +- .../web_security_scanner/rest/service_stub.rb | 2 +- .../web_security_scanner_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../websecurityscanner/v1beta/crawled_url.rb | 2 +- .../websecurityscanner/v1beta/finding.rb | 2 +- .../v1beta/finding_addon.rb | 2 +- .../v1beta/finding_type_stats.rb | 2 +- .../websecurityscanner/v1beta/scan_config.rb | 2 +- .../v1beta/scan_config_error.rb | 2 +- .../websecurityscanner/v1beta/scan_run.rb | 2 +- .../v1beta/scan_run_error_trace.rb | 2 +- .../v1beta/scan_run_warning_trace.rb | 2 +- .../v1beta/web_security_scanner.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../create_scan_config.rb | 2 +- .../delete_scan_config.rb | 2 +- .../web_security_scanner/get_finding.rb | 2 +- .../web_security_scanner/get_scan_config.rb | 2 +- .../web_security_scanner/get_scan_run.rb | 2 +- .../web_security_scanner/list_crawled_urls.rb | 2 +- .../list_finding_type_stats.rb | 2 +- .../web_security_scanner/list_findings.rb | 2 +- .../web_security_scanner/list_scan_configs.rb | 2 +- .../web_security_scanner/list_scan_runs.rb | 2 +- .../web_security_scanner/start_scan_run.rb | 2 +- .../web_security_scanner/stop_scan_run.rb | 2 +- .../update_scan_config.rb | 2 +- .../v1beta/web_security_scanner_paths_test.rb | 2 +- .../v1beta/web_security_scanner_rest_test.rb | 2 +- .../v1beta/web_security_scanner_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-executions-v1/.toys.rb | 2 +- google-cloud-workflows-executions-v1/Rakefile | 2 +- .../google-cloud-workflows-executions-v1.rb | 2 +- .../google/cloud/workflows/executions/v1.rb | 2 +- .../workflows/executions/v1/executions.rb | 2 +- .../executions/v1/executions/client.rb | 2 +- .../executions/v1/executions/credentials.rb | 2 +- .../executions/v1/executions/paths.rb | 2 +- .../executions/v1/executions/rest.rb | 2 +- .../executions/v1/executions/rest/client.rb | 2 +- .../v1/executions/rest/service_stub.rb | 2 +- .../executions/v1/executions_services_pb.rb | 2 +- .../cloud/workflows/executions/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../workflows/executions/v1/executions.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../snippets/executions/cancel_execution.rb | 2 +- .../snippets/executions/create_execution.rb | 2 +- .../snippets/executions/get_execution.rb | 2 +- .../snippets/executions/list_executions.rb | 2 +- .../executions/v1/executions_paths_test.rb | 2 +- .../executions/v1/executions_rest_test.rb | 2 +- .../executions/v1/executions_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-workflows-executions-v1beta.rb | 2 +- .../cloud/workflows/executions/v1beta.rb | 2 +- .../workflows/executions/v1beta/executions.rb | 2 +- .../executions/v1beta/executions/client.rb | 2 +- .../v1beta/executions/credentials.rb | 2 +- .../executions/v1beta/executions/paths.rb | 2 +- .../v1beta/executions_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../workflows/executions/v1beta/executions.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../snippets/executions/cancel_execution.rb | 2 +- .../snippets/executions/create_execution.rb | 2 +- .../snippets/executions/get_execution.rb | 2 +- .../snippets/executions/list_executions.rb | 2 +- .../v1beta/executions_paths_test.rb | 2 +- .../executions/v1beta/executions_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-v1/.toys.rb | 2 +- google-cloud-workflows-v1/Rakefile | 2 +- .../lib/google-cloud-workflows-v1.rb | 2 +- .../lib/google/cloud/workflows/v1.rb | 2 +- .../cloud/workflows/v1/bindings_override.rb | 2 +- .../lib/google/cloud/workflows/v1/rest.rb | 2 +- .../google/cloud/workflows/v1/workflows.rb | 2 +- .../cloud/workflows/v1/workflows/client.rb | 2 +- .../workflows/v1/workflows/credentials.rb | 2 +- .../workflows/v1/workflows/operations.rb | 2 +- .../cloud/workflows/v1/workflows/paths.rb | 2 +- .../cloud/workflows/v1/workflows/rest.rb | 2 +- .../workflows/v1/workflows/rest/client.rb | 2 +- .../workflows/v1/workflows/rest/operations.rb | 2 +- .../v1/workflows/rest/service_stub.rb | 2 +- .../workflows/v1/workflows_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/workflows/v1/workflows.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- google-cloud-workflows-v1/snippets/Gemfile | 2 +- .../snippets/workflows/create_workflow.rb | 2 +- .../snippets/workflows/delete_workflow.rb | 2 +- .../snippets/workflows/get_workflow.rb | 2 +- .../workflows/list_workflow_revisions.rb | 2 +- .../snippets/workflows/list_workflows.rb | 2 +- .../snippets/workflows/update_workflow.rb | 2 +- .../workflows/v1/workflows_operations_test.rb | 2 +- .../workflows/v1/workflows_paths_test.rb | 2 +- .../cloud/workflows/v1/workflows_rest_test.rb | 2 +- .../cloud/workflows/v1/workflows_test.rb | 2 +- google-cloud-workflows-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workflows-v1beta/.toys.rb | 2 +- google-cloud-workflows-v1beta/Rakefile | 2 +- .../lib/google-cloud-workflows-v1beta.rb | 2 +- .../lib/google/cloud/workflows/v1beta.rb | 2 +- .../workflows/v1beta/bindings_override.rb | 2 +- .../lib/google/cloud/workflows/v1beta/rest.rb | 2 +- .../cloud/workflows/v1beta/workflows.rb | 2 +- .../workflows/v1beta/workflows/client.rb | 2 +- .../workflows/v1beta/workflows/credentials.rb | 2 +- .../workflows/v1beta/workflows/operations.rb | 2 +- .../cloud/workflows/v1beta/workflows/paths.rb | 2 +- .../cloud/workflows/v1beta/workflows/rest.rb | 2 +- .../workflows/v1beta/workflows/rest/client.rb | 2 +- .../v1beta/workflows/rest/operations.rb | 2 +- .../v1beta/workflows/rest/service_stub.rb | 2 +- .../workflows/v1beta/workflows_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workflows/v1beta/workflows.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../snippets/workflows/create_workflow.rb | 2 +- .../snippets/workflows/delete_workflow.rb | 2 +- .../snippets/workflows/get_workflow.rb | 2 +- .../snippets/workflows/list_workflows.rb | 2 +- .../snippets/workflows/update_workflow.rb | 2 +- .../v1beta/workflows_operations_test.rb | 2 +- .../workflows/v1beta/workflows_paths_test.rb | 2 +- .../workflows/v1beta/workflows_rest_test.rb | 2 +- .../cloud/workflows/v1beta/workflows_test.rb | 2 +- google-cloud-workflows-v1beta/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- .../.owlbot-manifest.json | 3 +- google-cloud-workstations-v1/.toys.rb | 2 +- google-cloud-workstations-v1/Rakefile | 2 +- .../lib/google-cloud-workstations-v1.rb | 2 +- .../lib/google/cloud/workstations/v1.rb | 2 +- .../workstations/v1/bindings_override.rb | 2 +- .../lib/google/cloud/workstations/v1/rest.rb | 2 +- .../cloud/workstations/v1/workstations.rb | 2 +- .../workstations/v1/workstations/client.rb | 2 +- .../v1/workstations/credentials.rb | 2 +- .../v1/workstations/operations.rb | 2 +- .../workstations/v1/workstations/paths.rb | 2 +- .../workstations/v1/workstations/rest.rb | 2 +- .../v1/workstations/rest/client.rb | 2 +- .../v1/workstations/rest/operations.rb | 2 +- .../v1/workstations/rest/service_stub.rb | 2 +- .../v1/workstations_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workstations/v1/workstations.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- google-cloud-workstations-v1/snippets/Gemfile | 2 +- .../workstations/create_workstation.rb | 2 +- .../create_workstation_cluster.rb | 2 +- .../workstations/create_workstation_config.rb | 2 +- .../workstations/delete_workstation.rb | 2 +- .../delete_workstation_cluster.rb | 2 +- .../workstations/delete_workstation_config.rb | 2 +- .../workstations/generate_access_token.rb | 2 +- .../snippets/workstations/get_workstation.rb | 2 +- .../workstations/get_workstation_cluster.rb | 2 +- .../workstations/get_workstation_config.rb | 2 +- .../list_usable_workstation_configs.rb | 2 +- .../workstations/list_usable_workstations.rb | 2 +- .../workstations/list_workstation_clusters.rb | 2 +- .../workstations/list_workstation_configs.rb | 2 +- .../workstations/list_workstations.rb | 2 +- .../workstations/start_workstation.rb | 2 +- .../snippets/workstations/stop_workstation.rb | 2 +- .../workstations/update_workstation.rb | 2 +- .../update_workstation_cluster.rb | 2 +- .../workstations/update_workstation_config.rb | 2 +- .../v1/workstations_operations_test.rb | 2 +- .../v1/workstations_paths_test.rb | 2 +- .../workstations/v1/workstations_rest_test.rb | 2 +- .../workstations/v1/workstations_test.rb | 2 +- google-cloud-workstations-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-workstations-v1beta/.toys.rb | 2 +- google-cloud-workstations-v1beta/Rakefile | 2 +- .../lib/google-cloud-workstations-v1beta.rb | 2 +- .../lib/google/cloud/workstations/v1beta.rb | 2 +- .../workstations/v1beta/bindings_override.rb | 2 +- .../google/cloud/workstations/v1beta/rest.rb | 2 +- .../cloud/workstations/v1beta/workstations.rb | 2 +- .../v1beta/workstations/client.rb | 2 +- .../v1beta/workstations/credentials.rb | 2 +- .../v1beta/workstations/operations.rb | 2 +- .../workstations/v1beta/workstations/paths.rb | 2 +- .../workstations/v1beta/workstations/rest.rb | 2 +- .../v1beta/workstations/rest/client.rb | 2 +- .../v1beta/workstations/rest/operations.rb | 2 +- .../v1beta/workstations/rest/service_stub.rb | 2 +- .../v1beta/workstations_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/workstations/v1beta/workstations.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../workstations/create_workstation.rb | 2 +- .../create_workstation_cluster.rb | 2 +- .../workstations/create_workstation_config.rb | 2 +- .../workstations/delete_workstation.rb | 2 +- .../delete_workstation_cluster.rb | 2 +- .../workstations/delete_workstation_config.rb | 2 +- .../workstations/generate_access_token.rb | 2 +- .../snippets/workstations/get_workstation.rb | 2 +- .../workstations/get_workstation_cluster.rb | 2 +- .../workstations/get_workstation_config.rb | 2 +- .../list_usable_workstation_configs.rb | 2 +- .../workstations/list_usable_workstations.rb | 2 +- .../workstations/list_workstation_clusters.rb | 2 +- .../workstations/list_workstation_configs.rb | 2 +- .../workstations/list_workstations.rb | 2 +- .../workstations/start_workstation.rb | 2 +- .../snippets/workstations/stop_workstation.rb | 2 +- .../workstations/update_workstation.rb | 2 +- .../update_workstation_cluster.rb | 2 +- .../workstations/update_workstation_config.rb | 2 +- .../v1beta/workstations_operations_test.rb | 2 +- .../v1beta/workstations_paths_test.rb | 2 +- .../v1beta/workstations_rest_test.rb | 2 +- .../workstations/v1beta/workstations_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../proto_docs/google/protobuf/timestamp.rb | 13 +- .../.owlbot-manifest.json | 3 +- google-iam-credentials-v1/.toys.rb | 2 +- google-iam-credentials-v1/Rakefile | 2 +- .../lib/google-iam-credentials-v1.rb | 2 +- .../lib/google/iam/credentials/v1.rb | 2 +- .../iam/credentials/v1/iam_credentials.rb | 2 +- .../credentials/v1/iam_credentials/client.rb | 2 +- .../v1/iam_credentials/credentials.rb | 2 +- .../credentials/v1/iam_credentials/paths.rb | 2 +- .../credentials/v1/iam_credentials/rest.rb | 2 +- .../v1/iam_credentials/rest/client.rb | 2 +- .../v1/iam_credentials/rest/service_stub.rb | 2 +- .../v1/iamcredentials_services_pb.rb | 2 +- .../lib/google/iam/credentials/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/credentials/v1/common.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-credentials-v1/snippets/Gemfile | 2 +- .../iam_credentials/generate_access_token.rb | 2 +- .../iam_credentials/generate_id_token.rb | 2 +- .../snippets/iam_credentials/sign_blob.rb | 2 +- .../snippets/iam_credentials/sign_jwt.rb | 2 +- .../v1/iam_credentials_paths_test.rb | 2 +- .../v1/iam_credentials_rest_test.rb | 2 +- .../credentials/v1/iam_credentials_test.rb | 2 +- google-iam-credentials-v1/test/helper.rb | 2 +- google-iam-v2/.owlbot-manifest.json | 3 +- google-iam-v2/.toys.rb | 2 +- google-iam-v2/Rakefile | 2 +- google-iam-v2/lib/google-iam-v2.rb | 2 +- google-iam-v2/lib/google/iam/v2.rb | 2 +- google-iam-v2/lib/google/iam/v2/policies.rb | 2 +- .../lib/google/iam/v2/policies/client.rb | 2 +- .../lib/google/iam/v2/policies/credentials.rb | 2 +- .../lib/google/iam/v2/policies/operations.rb | 2 +- .../lib/google/iam/v2/policies/rest.rb | 2 +- .../lib/google/iam/v2/policies/rest/client.rb | 2 +- .../google/iam/v2/policies/rest/operations.rb | 2 +- .../iam/v2/policies/rest/service_stub.rb | 2 +- .../lib/google/iam/v2/policy_services_pb.rb | 2 +- google-iam-v2/lib/google/iam/v2/rest.rb | 2 +- google-iam-v2/proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v2/deny.rb | 2 +- .../proto_docs/google/iam/v2/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-v2/proto_docs/google/rpc/status.rb | 2 +- google-iam-v2/proto_docs/google/type/expr.rb | 2 +- google-iam-v2/snippets/Gemfile | 2 +- .../snippets/policies/create_policy.rb | 2 +- .../snippets/policies/delete_policy.rb | 2 +- google-iam-v2/snippets/policies/get_policy.rb | 2 +- .../snippets/policies/list_policies.rb | 2 +- .../snippets/policies/update_policy.rb | 2 +- .../google/iam/v2/policies_operations_test.rb | 2 +- .../test/google/iam/v2/policies_rest_test.rb | 2 +- .../test/google/iam/v2/policies_test.rb | 2 +- google-iam-v2/test/helper.rb | 2 +- google-iam-v3/.owlbot-manifest.json | 3 +- google-iam-v3/.toys.rb | 2 +- google-iam-v3/Rakefile | 2 +- google-iam-v3/lib/google-iam-v3.rb | 2 +- google-iam-v3/lib/google/iam/v3.rb | 2 +- .../lib/google/iam/v3/policy_bindings.rb | 2 +- .../google/iam/v3/policy_bindings/client.rb | 2 +- .../iam/v3/policy_bindings/credentials.rb | 2 +- .../iam/v3/policy_bindings/operations.rb | 2 +- .../google/iam/v3/policy_bindings/paths.rb | 2 +- .../lib/google/iam/v3/policy_bindings/rest.rb | 2 +- .../iam/v3/policy_bindings/rest/client.rb | 2 +- .../iam/v3/policy_bindings/rest/operations.rb | 2 +- .../v3/policy_bindings/rest/service_stub.rb | 2 +- .../v3/policy_bindings_service_services_pb.rb | 2 +- .../v3/principal_access_boundary_policies.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- ...s_boundary_policies_service_services_pb.rb | 2 +- google-iam-v3/lib/google/iam/v3/rest.rb | 2 +- google-iam-v3/proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/v3/operation_metadata.rb | 2 +- .../google/iam/v3/policy_binding_resources.rb | 2 +- .../google/iam/v3/policy_bindings_service.rb | 2 +- ...ncipal_access_boundary_policies_service.rb | 2 +- ...ncipal_access_boundary_policy_resources.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- google-iam-v3/proto_docs/google/rpc/status.rb | 2 +- google-iam-v3/proto_docs/google/type/expr.rb | 2 +- google-iam-v3/snippets/Gemfile | 2 +- .../policy_bindings/create_policy_binding.rb | 2 +- .../policy_bindings/delete_policy_binding.rb | 2 +- .../policy_bindings/get_policy_binding.rb | 2 +- .../policy_bindings/list_policy_bindings.rb | 2 +- .../search_target_policy_bindings.rb | 2 +- .../policy_bindings/update_policy_binding.rb | 2 +- ...create_principal_access_boundary_policy.rb | 2 +- ...delete_principal_access_boundary_policy.rb | 2 +- .../get_principal_access_boundary_policy.rb | 2 +- ...list_principal_access_boundary_policies.rb | 2 +- ...incipal_access_boundary_policy_bindings.rb | 2 +- ...update_principal_access_boundary_policy.rb | 2 +- .../snippet_metadata_google.iam.v3.json | 2 +- .../iam/v3/policy_bindings_operations_test.rb | 2 +- .../iam/v3/policy_bindings_paths_test.rb | 2 +- .../iam/v3/policy_bindings_rest_test.rb | 2 +- .../google/iam/v3/policy_bindings_test.rb | 2 +- ...ccess_boundary_policies_operations_test.rb | 2 +- ...pal_access_boundary_policies_paths_test.rb | 2 +- ...ipal_access_boundary_policies_rest_test.rb | 2 +- ...principal_access_boundary_policies_test.rb | 2 +- google-iam-v3/test/helper.rb | 2 +- google-iam-v3beta/.owlbot-manifest.json | 3 +- google-iam-v3beta/.toys.rb | 2 +- google-iam-v3beta/Rakefile | 2 +- google-iam-v3beta/lib/google/iam/v3beta.rb | 2 +- .../lib/google/iam/v3beta/policy_bindings.rb | 2 +- .../iam/v3beta/policy_bindings/client.rb | 2 +- .../iam/v3beta/policy_bindings/credentials.rb | 2 +- .../iam/v3beta/policy_bindings/operations.rb | 2 +- .../iam/v3beta/policy_bindings/paths.rb | 2 +- .../google/iam/v3beta/policy_bindings/rest.rb | 2 +- .../iam/v3beta/policy_bindings/rest/client.rb | 2 +- .../v3beta/policy_bindings/rest/operations.rb | 2 +- .../policy_bindings/rest/service_stub.rb | 2 +- .../policy_bindings_service_services_pb.rb | 2 +- .../principal_access_boundary_policies.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- ...s_boundary_policies_service_services_pb.rb | 2 +- .../lib/google/iam/v3beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/iam/v3beta/operation_metadata.rb | 2 +- .../iam/v3beta/policy_binding_resources.rb | 2 +- .../iam/v3beta/policy_bindings_service.rb | 2 +- ...ncipal_access_boundary_policies_service.rb | 2 +- ...ncipal_access_boundary_policy_resources.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- google-iam-v3beta/snippets/Gemfile | 2 +- .../policy_bindings/create_policy_binding.rb | 2 +- .../policy_bindings/delete_policy_binding.rb | 2 +- .../policy_bindings/get_policy_binding.rb | 2 +- .../policy_bindings/list_policy_bindings.rb | 2 +- .../search_target_policy_bindings.rb | 2 +- .../policy_bindings/update_policy_binding.rb | 2 +- ...create_principal_access_boundary_policy.rb | 2 +- ...delete_principal_access_boundary_policy.rb | 2 +- .../get_principal_access_boundary_policy.rb | 2 +- ...list_principal_access_boundary_policies.rb | 2 +- ...incipal_access_boundary_policy_bindings.rb | 2 +- ...update_principal_access_boundary_policy.rb | 2 +- .../v3beta/policy_bindings_operations_test.rb | 2 +- .../iam/v3beta/policy_bindings_paths_test.rb | 2 +- .../iam/v3beta/policy_bindings_rest_test.rb | 2 +- .../google/iam/v3beta/policy_bindings_test.rb | 2 +- ...ccess_boundary_policies_operations_test.rb | 2 +- ...pal_access_boundary_policies_paths_test.rb | 2 +- ...ipal_access_boundary_policies_rest_test.rb | 2 +- ...principal_access_boundary_policies_test.rb | 2 +- google-iam-v3beta/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...ogle-identity-access_context_manager-v1.rb | 2 +- .../identity/access_context_manager/v1.rb | 2 +- .../v1/access_context_manager.rb | 2 +- .../v1/access_context_manager/client.rb | 2 +- .../v1/access_context_manager/credentials.rb | 2 +- .../v1/access_context_manager/operations.rb | 2 +- .../v1/access_context_manager/paths.rb | 2 +- .../v1/access_context_manager/rest.rb | 2 +- .../v1/access_context_manager/rest/client.rb | 2 +- .../access_context_manager/rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../access_context_manager/v1/rest.rb | 2 +- .../v1/access_context_manager_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../type/device_resources.rb | 2 +- .../v1/access_context_manager.rb | 2 +- .../accesscontextmanager/v1/access_level.rb | 2 +- .../accesscontextmanager/v1/access_policy.rb | 2 +- .../v1/gcp_user_access_binding.rb | 2 +- .../v1/service_perimeter.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../commit_service_perimeters.rb | 2 +- .../create_access_level.rb | 2 +- .../create_access_policy.rb | 2 +- .../create_gcp_user_access_binding.rb | 2 +- .../create_service_perimeter.rb | 2 +- .../delete_access_level.rb | 2 +- .../delete_access_policy.rb | 2 +- .../delete_gcp_user_access_binding.rb | 2 +- .../delete_service_perimeter.rb | 2 +- .../get_access_level.rb | 2 +- .../get_access_policy.rb | 2 +- .../get_gcp_user_access_binding.rb | 2 +- .../access_context_manager/get_iam_policy.rb | 2 +- .../get_service_perimeter.rb | 2 +- .../list_access_levels.rb | 2 +- .../list_access_policies.rb | 2 +- .../list_gcp_user_access_bindings.rb | 2 +- .../list_service_perimeters.rb | 2 +- .../replace_access_levels.rb | 2 +- .../replace_service_perimeters.rb | 2 +- .../access_context_manager/set_iam_policy.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../update_access_level.rb | 2 +- .../update_access_policy.rb | 2 +- .../update_gcp_user_access_binding.rb | 2 +- .../update_service_perimeter.rb | 2 +- .../access_context_manager_operations_test.rb | 2 +- .../v1/access_context_manager_paths_test.rb | 2 +- .../v1/access_context_manager_rest_test.rb | 2 +- .../v1/access_context_manager_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-maps-fleet_engine-delivery-v1/.toys.rb | 2 +- google-maps-fleet_engine-delivery-v1/Rakefile | 2 +- .../google-maps-fleet_engine-delivery-v1.rb | 2 +- .../google/maps/fleet_engine/delivery/v1.rb | 2 +- .../delivery/v1/delivery_service.rb | 2 +- .../delivery/v1/delivery_service/client.rb | 2 +- .../v1/delivery_service/credentials.rb | 2 +- .../delivery/v1/delivery_service/paths.rb | 2 +- .../delivery/v1/delivery_service/rest.rb | 2 +- .../v1/delivery_service/rest/client.rb | 2 +- .../v1/delivery_service/rest/service_stub.rb | 2 +- .../maps/fleet_engine/delivery/v1/rest.rb | 2 +- .../delivery/v1/delivery_api_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/routing.rb | 2 +- .../proto_docs/google/geo/type/viewport.rb | 2 +- .../maps/fleetengine/delivery/v1/common.rb | 2 +- .../fleetengine/delivery/v1/delivery_api.rb | 2 +- .../delivery/v1/delivery_vehicles.rb | 2 +- .../maps/fleetengine/delivery/v1/header.rb | 2 +- .../delivery/v1/task_tracking_info.rb | 2 +- .../maps/fleetengine/delivery/v1/tasks.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/type/latlng.rb | 2 +- .../snippets/Gemfile | 2 +- .../delivery_service/batch_create_tasks.rb | 2 +- .../create_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/create_task.rb | 2 +- .../delete_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/delete_task.rb | 2 +- .../delivery_service/get_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/get_task.rb | 2 +- .../get_task_tracking_info.rb | 2 +- .../list_delivery_vehicles.rb | 2 +- .../snippets/delivery_service/list_tasks.rb | 2 +- .../update_delivery_vehicle.rb | 2 +- .../snippets/delivery_service/update_task.rb | 2 +- .../v1/delivery_service_paths_test.rb | 2 +- .../delivery/v1/delivery_service_rest_test.rb | 2 +- .../delivery/v1/delivery_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-maps-fleet_engine-v1/.toys.rb | 2 +- google-maps-fleet_engine-v1/Rakefile | 2 +- .../lib/google-maps-fleet_engine-v1.rb | 2 +- .../lib/google/maps/fleet_engine/v1.rb | 2 +- .../lib/google/maps/fleet_engine/v1/rest.rb | 2 +- .../maps/fleet_engine/v1/trip_service.rb | 2 +- .../fleet_engine/v1/trip_service/client.rb | 2 +- .../v1/trip_service/credentials.rb | 2 +- .../fleet_engine/v1/trip_service/paths.rb | 2 +- .../maps/fleet_engine/v1/trip_service/rest.rb | 2 +- .../v1/trip_service/rest/client.rb | 2 +- .../v1/trip_service/rest/service_stub.rb | 2 +- .../maps/fleet_engine/v1/vehicle_service.rb | 2 +- .../fleet_engine/v1/vehicle_service/client.rb | 2 +- .../v1/vehicle_service/credentials.rb | 2 +- .../fleet_engine/v1/vehicle_service/paths.rb | 2 +- .../fleet_engine/v1/vehicle_service/rest.rb | 2 +- .../v1/vehicle_service/rest/client.rb | 2 +- .../v1/vehicle_service/rest/service_stub.rb | 2 +- .../fleetengine/v1/trip_api_services_pb.rb | 2 +- .../fleetengine/v1/vehicle_api_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/routing.rb | 2 +- .../proto_docs/google/geo/type/viewport.rb | 2 +- .../google/maps/fleetengine/v1/fleetengine.rb | 2 +- .../google/maps/fleetengine/v1/header.rb | 2 +- .../google/maps/fleetengine/v1/traffic.rb | 2 +- .../google/maps/fleetengine/v1/trip_api.rb | 2 +- .../google/maps/fleetengine/v1/trips.rb | 2 +- .../google/maps/fleetengine/v1/vehicle_api.rb | 2 +- .../google/maps/fleetengine/v1/vehicles.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/type/latlng.rb | 2 +- google-maps-fleet_engine-v1/snippets/Gemfile | 2 +- .../snippets/trip_service/create_trip.rb | 2 +- .../snippets/trip_service/delete_trip.rb | 2 +- .../snippets/trip_service/get_trip.rb | 2 +- .../trip_service/report_billable_trip.rb | 2 +- .../snippets/trip_service/search_trips.rb | 2 +- .../snippets/trip_service/update_trip.rb | 2 +- .../vehicle_service/create_vehicle.rb | 2 +- .../vehicle_service/delete_vehicle.rb | 2 +- .../snippets/vehicle_service/get_vehicle.rb | 2 +- .../snippets/vehicle_service/list_vehicles.rb | 2 +- .../vehicle_service/search_vehicles.rb | 2 +- .../vehicle_service/update_vehicle.rb | 2 +- .../update_vehicle_attributes.rb | 2 +- .../v1/trip_service_paths_test.rb | 2 +- .../fleet_engine/v1/trip_service_rest_test.rb | 2 +- .../maps/fleet_engine/v1/trip_service_test.rb | 2 +- .../v1/vehicle_service_paths_test.rb | 2 +- .../v1/vehicle_service_rest_test.rb | 2 +- .../fleet_engine/v1/vehicle_service_test.rb | 2 +- google-maps-fleet_engine-v1/test/helper.rb | 2 +- google-shopping-css-v1/.owlbot-manifest.json | 3 +- google-shopping-css-v1/.toys.rb | 2 +- google-shopping-css-v1/Rakefile | 2 +- .../lib/google-shopping-css-v1.rb | 2 +- .../lib/google/shopping/css/v1.rb | 2 +- .../shopping/css/v1/account_labels_service.rb | 2 +- .../css/v1/account_labels_service/client.rb | 2 +- .../v1/account_labels_service/credentials.rb | 2 +- .../css/v1/account_labels_service/paths.rb | 2 +- .../css/v1/account_labels_service/rest.rb | 2 +- .../v1/account_labels_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../css/v1/accounts_labels_services_pb.rb | 2 +- .../shopping/css/v1/accounts_service.rb | 2 +- .../css/v1/accounts_service/client.rb | 2 +- .../css/v1/accounts_service/credentials.rb | 2 +- .../shopping/css/v1/accounts_service/paths.rb | 2 +- .../shopping/css/v1/accounts_service/rest.rb | 2 +- .../css/v1/accounts_service/rest/client.rb | 2 +- .../v1/accounts_service/rest/service_stub.rb | 2 +- .../shopping/css/v1/accounts_services_pb.rb | 2 +- .../css/v1/css_product_inputs_service.rb | 2 +- .../v1/css_product_inputs_service/client.rb | 2 +- .../css_product_inputs_service/credentials.rb | 2 +- .../v1/css_product_inputs_service/paths.rb | 2 +- .../css/v1/css_product_inputs_service/rest.rb | 2 +- .../css_product_inputs_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../css/v1/css_product_inputs_services_pb.rb | 2 +- .../shopping/css/v1/css_products_service.rb | 2 +- .../css/v1/css_products_service/client.rb | 2 +- .../v1/css_products_service/credentials.rb | 2 +- .../css/v1/css_products_service/paths.rb | 2 +- .../css/v1/css_products_service/rest.rb | 2 +- .../v1/css_products_service/rest/client.rb | 2 +- .../css_products_service/rest/service_stub.rb | 2 +- .../css/v1/css_products_services_pb.rb | 2 +- .../google/shopping/css/v1/quota_service.rb | 2 +- .../shopping/css/v1/quota_service/client.rb | 2 +- .../css/v1/quota_service/credentials.rb | 2 +- .../shopping/css/v1/quota_service/paths.rb | 2 +- .../shopping/css/v1/quota_service/rest.rb | 2 +- .../css/v1/quota_service/rest/client.rb | 2 +- .../css/v1/quota_service/rest/service_stub.rb | 2 +- .../shopping/css/v1/quota_services_pb.rb | 2 +- .../lib/google/shopping/css/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../google/shopping/css/v1/accounts.rb | 2 +- .../google/shopping/css/v1/accounts_labels.rb | 2 +- .../shopping/css/v1/css_product_common.rb | 2 +- .../shopping/css/v1/css_product_inputs.rb | 2 +- .../google/shopping/css/v1/css_products.rb | 2 +- .../google/shopping/css/v1/quota.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- google-shopping-css-v1/snippets/Gemfile | 2 +- .../create_account_label.rb | 2 +- .../delete_account_label.rb | 2 +- .../list_account_labels.rb | 2 +- .../update_account_label.rb | 2 +- .../snippets/accounts_service/get_account.rb | 2 +- .../accounts_service/list_child_accounts.rb | 2 +- .../accounts_service/update_labels.rb | 2 +- .../delete_css_product_input.rb | 2 +- .../insert_css_product_input.rb | 2 +- .../update_css_product_input.rb | 2 +- .../css_products_service/get_css_product.rb | 2 +- .../css_products_service/list_css_products.rb | 2 +- .../quota_service/list_quota_groups.rb | 2 +- .../v1/account_labels_service_paths_test.rb | 2 +- .../v1/account_labels_service_rest_test.rb | 2 +- .../css/v1/account_labels_service_test.rb | 2 +- .../css/v1/accounts_service_paths_test.rb | 2 +- .../css/v1/accounts_service_rest_test.rb | 2 +- .../shopping/css/v1/accounts_service_test.rb | 2 +- .../css_product_inputs_service_paths_test.rb | 2 +- .../css_product_inputs_service_rest_test.rb | 2 +- .../css/v1/css_product_inputs_service_test.rb | 2 +- .../css/v1/css_products_service_paths_test.rb | 2 +- .../css/v1/css_products_service_rest_test.rb | 2 +- .../css/v1/css_products_service_test.rb | 2 +- .../css/v1/quota_service_paths_test.rb | 2 +- .../css/v1/quota_service_rest_test.rb | 2 +- .../shopping/css/v1/quota_service_test.rb | 2 +- google-shopping-css-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-shopping-merchant-accounts-v1beta.rb | 2 +- .../shopping/merchant/accounts/v1beta.rb | 2 +- .../accounts/v1beta/account_issue_service.rb | 2 +- .../v1beta/account_issue_service/client.rb | 2 +- .../account_issue_service/credentials.rb | 2 +- .../v1beta/account_issue_service/paths.rb | 2 +- .../v1beta/account_issue_service/rest.rb | 2 +- .../account_issue_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../accounts/v1beta/account_tax_service.rb | 2 +- .../v1beta/account_tax_service/client.rb | 2 +- .../v1beta/account_tax_service/credentials.rb | 2 +- .../v1beta/account_tax_service/paths.rb | 2 +- .../v1beta/account_tax_service/rest.rb | 2 +- .../v1beta/account_tax_service/rest/client.rb | 2 +- .../account_tax_service/rest/service_stub.rb | 2 +- .../v1beta/account_tax_services_pb.rb | 2 +- .../v1beta/accountissue_services_pb.rb | 2 +- .../accounts/v1beta/accounts_service.rb | 2 +- .../v1beta/accounts_service/client.rb | 2 +- .../v1beta/accounts_service/credentials.rb | 2 +- .../accounts/v1beta/accounts_service/paths.rb | 2 +- .../accounts/v1beta/accounts_service/rest.rb | 2 +- .../v1beta/accounts_service/rest/client.rb | 2 +- .../accounts_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/accounts_services_pb.rb | 2 +- .../v1beta/autofeed_settings_service.rb | 2 +- .../autofeed_settings_service/client.rb | 2 +- .../autofeed_settings_service/credentials.rb | 2 +- .../v1beta/autofeed_settings_service/paths.rb | 2 +- .../v1beta/autofeed_settings_service/rest.rb | 2 +- .../autofeed_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/autofeedsettings_services_pb.rb | 2 +- .../v1beta/automatic_improvements_service.rb | 2 +- .../automatic_improvements_service/client.rb | 2 +- .../credentials.rb | 2 +- .../automatic_improvements_service/paths.rb | 2 +- .../automatic_improvements_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/business_identity_service.rb | 2 +- .../business_identity_service/client.rb | 2 +- .../business_identity_service/credentials.rb | 2 +- .../v1beta/business_identity_service/paths.rb | 2 +- .../v1beta/business_identity_service/rest.rb | 2 +- .../business_identity_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../accounts/v1beta/business_info_service.rb | 2 +- .../v1beta/business_info_service/client.rb | 2 +- .../business_info_service/credentials.rb | 2 +- .../v1beta/business_info_service/paths.rb | 2 +- .../v1beta/business_info_service/rest.rb | 2 +- .../business_info_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/businessidentity_services_pb.rb | 2 +- .../v1beta/businessinfo_services_pb.rb | 2 +- .../v1beta/checkout_settings_service.rb | 2 +- .../checkout_settings_service/client.rb | 2 +- .../checkout_settings_service/credentials.rb | 2 +- .../v1beta/checkout_settings_service/paths.rb | 2 +- .../v1beta/checkout_settings_service/rest.rb | 2 +- .../checkout_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/email_preferences_service.rb | 2 +- .../email_preferences_service/client.rb | 2 +- .../email_preferences_service/credentials.rb | 2 +- .../v1beta/email_preferences_service/paths.rb | 2 +- .../v1beta/email_preferences_service/rest.rb | 2 +- .../email_preferences_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/emailpreferences_services_pb.rb | 2 +- .../accounts/v1beta/gbp_accounts_service.rb | 2 +- .../v1beta/gbp_accounts_service/client.rb | 2 +- .../gbp_accounts_service/credentials.rb | 2 +- .../v1beta/gbp_accounts_service/paths.rb | 2 +- .../v1beta/gbp_accounts_service/rest.rb | 2 +- .../gbp_accounts_service/rest/client.rb | 2 +- .../gbp_accounts_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/homepage_service.rb | 2 +- .../v1beta/homepage_service/client.rb | 2 +- .../v1beta/homepage_service/credentials.rb | 2 +- .../accounts/v1beta/homepage_service/paths.rb | 2 +- .../accounts/v1beta/homepage_service/rest.rb | 2 +- .../v1beta/homepage_service/rest/client.rb | 2 +- .../homepage_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/homepage_services_pb.rb | 2 +- .../accounts/v1beta/lfp_providers_service.rb | 2 +- .../v1beta/lfp_providers_service/client.rb | 2 +- .../lfp_providers_service/credentials.rb | 2 +- .../v1beta/lfp_providers_service/paths.rb | 2 +- .../v1beta/lfp_providers_service/rest.rb | 2 +- .../lfp_providers_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/omnichannel_settings_service.rb | 2 +- .../omnichannel_settings_service/client.rb | 2 +- .../credentials.rb | 2 +- .../omnichannel_settings_service/paths.rb | 2 +- .../omnichannel_settings_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/online_return_policy_service.rb | 2 +- .../online_return_policy_service/client.rb | 2 +- .../credentials.rb | 2 +- .../online_return_policy_service/paths.rb | 2 +- .../online_return_policy_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../online_return_policy_services_pb.rb | 2 +- .../accounts/v1beta/programs_service.rb | 2 +- .../v1beta/programs_service/client.rb | 2 +- .../v1beta/programs_service/credentials.rb | 2 +- .../accounts/v1beta/programs_service/paths.rb | 2 +- .../accounts/v1beta/programs_service/rest.rb | 2 +- .../v1beta/programs_service/rest/client.rb | 2 +- .../programs_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/programs_services_pb.rb | 2 +- .../accounts/v1beta/regions_service.rb | 2 +- .../accounts/v1beta/regions_service/client.rb | 2 +- .../v1beta/regions_service/credentials.rb | 2 +- .../accounts/v1beta/regions_service/paths.rb | 2 +- .../accounts/v1beta/regions_service/rest.rb | 2 +- .../v1beta/regions_service/rest/client.rb | 2 +- .../regions_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/regions_services_pb.rb | 2 +- .../shopping/merchant/accounts/v1beta/rest.rb | 2 +- .../v1beta/shipping_settings_service.rb | 2 +- .../shipping_settings_service/client.rb | 2 +- .../shipping_settings_service/credentials.rb | 2 +- .../v1beta/shipping_settings_service/paths.rb | 2 +- .../v1beta/shipping_settings_service/rest.rb | 2 +- .../shipping_settings_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/shippingsettings_services_pb.rb | 2 +- ...erms_of_service_agreement_state_service.rb | 2 +- .../client.rb | 2 +- .../credentials.rb | 2 +- .../paths.rb | 2 +- .../rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/terms_of_service_service.rb | 2 +- .../v1beta/terms_of_service_service/client.rb | 2 +- .../terms_of_service_service/credentials.rb | 2 +- .../v1beta/terms_of_service_service/paths.rb | 2 +- .../v1beta/terms_of_service_service/rest.rb | 2 +- .../terms_of_service_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/termsofservice_services_pb.rb | 2 +- ...ermsofserviceagreementstate_services_pb.rb | 2 +- .../merchant/accounts/v1beta/user_service.rb | 2 +- .../accounts/v1beta/user_service/client.rb | 2 +- .../v1beta/user_service/credentials.rb | 2 +- .../accounts/v1beta/user_service/paths.rb | 2 +- .../accounts/v1beta/user_service/rest.rb | 2 +- .../v1beta/user_service/rest/client.rb | 2 +- .../v1beta/user_service/rest/service_stub.rb | 2 +- .../accounts/v1beta/user_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../merchant/accounts/v1beta/accessright.rb | 2 +- .../merchant/accounts/v1beta/account_tax.rb | 2 +- .../merchant/accounts/v1beta/accountissue.rb | 2 +- .../merchant/accounts/v1beta/accounts.rb | 2 +- .../accounts/v1beta/accountservices.rb | 2 +- .../accounts/v1beta/autofeedsettings.rb | 2 +- .../accounts/v1beta/automaticimprovements.rb | 2 +- .../accounts/v1beta/businessidentity.rb | 2 +- .../merchant/accounts/v1beta/businessinfo.rb | 2 +- .../accounts/v1beta/checkoutsettings.rb | 2 +- .../accounts/v1beta/customerservice.rb | 2 +- .../accounts/v1beta/emailpreferences.rb | 2 +- .../merchant/accounts/v1beta/gbpaccounts.rb | 2 +- .../merchant/accounts/v1beta/homepage.rb | 2 +- .../merchant/accounts/v1beta/lfpproviders.rb | 2 +- .../accounts/v1beta/omnichannelsettings.rb | 2 +- .../accounts/v1beta/online_return_policy.rb | 2 +- .../accounts/v1beta/phoneverificationstate.rb | 2 +- .../merchant/accounts/v1beta/programs.rb | 2 +- .../merchant/accounts/v1beta/regions.rb | 2 +- .../accounts/v1beta/shippingsettings.rb | 2 +- .../merchant/accounts/v1beta/tax_rule.rb | 2 +- .../accounts/v1beta/termsofservice.rb | 2 +- .../v1beta/termsofserviceagreementstate.rb | 2 +- .../accounts/v1beta/termsofservicekind.rb | 2 +- .../shopping/merchant/accounts/v1beta/user.rb | 2 +- .../v1beta/verificationmailsettings.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/date.rb | 2 +- .../proto_docs/google/type/datetime.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../proto_docs/google/type/phone_number.rb | 2 +- .../proto_docs/google/type/postal_address.rb | 2 +- .../snippets/Gemfile | 2 +- .../list_account_issues.rb | 2 +- .../account_tax_service/get_account_tax.rb | 2 +- .../account_tax_service/list_account_tax.rb | 2 +- .../account_tax_service/update_account_tax.rb | 2 +- .../create_and_configure_account.rb | 2 +- .../accounts_service/delete_account.rb | 2 +- .../snippets/accounts_service/get_account.rb | 2 +- .../accounts_service/list_accounts.rb | 2 +- .../accounts_service/list_sub_accounts.rb | 2 +- .../accounts_service/update_account.rb | 2 +- .../get_autofeed_settings.rb | 2 +- .../update_autofeed_settings.rb | 2 +- .../get_automatic_improvements.rb | 2 +- .../update_automatic_improvements.rb | 2 +- .../get_business_identity.rb | 2 +- .../update_business_identity.rb | 2 +- .../get_business_info.rb | 2 +- .../update_business_info.rb | 2 +- .../create_checkout_settings.rb | 2 +- .../delete_checkout_settings.rb | 2 +- .../get_checkout_settings.rb | 2 +- .../update_checkout_settings.rb | 2 +- .../get_email_preferences.rb | 2 +- .../update_email_preferences.rb | 2 +- .../gbp_accounts_service/link_gbp_account.rb | 2 +- .../gbp_accounts_service/list_gbp_accounts.rb | 2 +- .../homepage_service/claim_homepage.rb | 2 +- .../snippets/homepage_service/get_homepage.rb | 2 +- .../homepage_service/unclaim_homepage.rb | 2 +- .../homepage_service/update_homepage.rb | 2 +- .../find_lfp_providers.rb | 2 +- .../link_lfp_provider.rb | 2 +- .../create_omnichannel_setting.rb | 2 +- .../get_omnichannel_setting.rb | 2 +- .../list_omnichannel_settings.rb | 2 +- .../request_inventory_verification.rb | 2 +- .../update_omnichannel_setting.rb | 2 +- .../create_online_return_policy.rb | 2 +- .../delete_online_return_policy.rb | 2 +- .../get_online_return_policy.rb | 2 +- .../list_online_return_policies.rb | 2 +- .../update_online_return_policy.rb | 2 +- .../programs_service/disable_program.rb | 2 +- .../programs_service/enable_program.rb | 2 +- .../snippets/programs_service/get_program.rb | 2 +- .../programs_service/list_programs.rb | 2 +- .../snippets/regions_service/create_region.rb | 2 +- .../snippets/regions_service/delete_region.rb | 2 +- .../snippets/regions_service/get_region.rb | 2 +- .../snippets/regions_service/list_regions.rb | 2 +- .../snippets/regions_service/update_region.rb | 2 +- .../get_shipping_settings.rb | 2 +- .../insert_shipping_settings.rb | 2 +- .../get_terms_of_service_agreement_state.rb | 2 +- ...cation_terms_of_service_agreement_state.rb | 2 +- .../accept_terms_of_service.rb | 2 +- .../get_terms_of_service.rb | 2 +- .../retrieve_latest_terms_of_service.rb | 2 +- .../snippets/user_service/create_user.rb | 2 +- .../snippets/user_service/delete_user.rb | 2 +- .../snippets/user_service/get_user.rb | 2 +- .../snippets/user_service/list_users.rb | 2 +- .../snippets/user_service/update_user.rb | 2 +- .../account_issue_service_paths_test.rb | 2 +- .../v1beta/account_issue_service_rest_test.rb | 2 +- .../v1beta/account_issue_service_test.rb | 2 +- .../v1beta/account_tax_service_paths_test.rb | 2 +- .../v1beta/account_tax_service_rest_test.rb | 2 +- .../v1beta/account_tax_service_test.rb | 2 +- .../v1beta/accounts_service_paths_test.rb | 2 +- .../v1beta/accounts_service_rest_test.rb | 2 +- .../accounts/v1beta/accounts_service_test.rb | 2 +- .../autofeed_settings_service_paths_test.rb | 2 +- .../autofeed_settings_service_rest_test.rb | 2 +- .../v1beta/autofeed_settings_service_test.rb | 2 +- ...tomatic_improvements_service_paths_test.rb | 2 +- ...utomatic_improvements_service_rest_test.rb | 2 +- .../automatic_improvements_service_test.rb | 2 +- .../business_identity_service_paths_test.rb | 2 +- .../business_identity_service_rest_test.rb | 2 +- .../v1beta/business_identity_service_test.rb | 2 +- .../business_info_service_paths_test.rb | 2 +- .../v1beta/business_info_service_rest_test.rb | 2 +- .../v1beta/business_info_service_test.rb | 2 +- .../checkout_settings_service_paths_test.rb | 2 +- .../checkout_settings_service_rest_test.rb | 2 +- .../v1beta/checkout_settings_service_test.rb | 2 +- .../email_preferences_service_paths_test.rb | 2 +- .../email_preferences_service_rest_test.rb | 2 +- .../v1beta/email_preferences_service_test.rb | 2 +- .../v1beta/gbp_accounts_service_paths_test.rb | 2 +- .../v1beta/gbp_accounts_service_rest_test.rb | 2 +- .../v1beta/gbp_accounts_service_test.rb | 2 +- .../v1beta/homepage_service_paths_test.rb | 2 +- .../v1beta/homepage_service_rest_test.rb | 2 +- .../accounts/v1beta/homepage_service_test.rb | 2 +- .../lfp_providers_service_paths_test.rb | 2 +- .../v1beta/lfp_providers_service_rest_test.rb | 2 +- .../v1beta/lfp_providers_service_test.rb | 2 +- ...omnichannel_settings_service_paths_test.rb | 2 +- .../omnichannel_settings_service_rest_test.rb | 2 +- .../omnichannel_settings_service_test.rb | 2 +- ...online_return_policy_service_paths_test.rb | 2 +- .../online_return_policy_service_rest_test.rb | 2 +- .../online_return_policy_service_test.rb | 2 +- .../v1beta/programs_service_paths_test.rb | 2 +- .../v1beta/programs_service_rest_test.rb | 2 +- .../accounts/v1beta/programs_service_test.rb | 2 +- .../v1beta/regions_service_paths_test.rb | 2 +- .../v1beta/regions_service_rest_test.rb | 2 +- .../accounts/v1beta/regions_service_test.rb | 2 +- .../shipping_settings_service_paths_test.rb | 2 +- .../shipping_settings_service_rest_test.rb | 2 +- .../v1beta/shipping_settings_service_test.rb | 2 +- ...vice_agreement_state_service_paths_test.rb | 2 +- ...rvice_agreement_state_service_rest_test.rb | 2 +- ...of_service_agreement_state_service_test.rb | 2 +- .../terms_of_service_service_paths_test.rb | 2 +- .../terms_of_service_service_rest_test.rb | 2 +- .../v1beta/terms_of_service_service_test.rb | 2 +- .../v1beta/user_service_paths_test.rb | 2 +- .../accounts/v1beta/user_service_rest_test.rb | 2 +- .../accounts/v1beta/user_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...google-shopping-merchant-conversions-v1.rb | 2 +- .../shopping/merchant/conversions/v1.rb | 2 +- .../v1/conversion_sources_service.rb | 2 +- .../v1/conversion_sources_service/client.rb | 2 +- .../conversion_sources_service/credentials.rb | 2 +- .../v1/conversion_sources_service/paths.rb | 2 +- .../v1/conversion_sources_service/rest.rb | 2 +- .../conversion_sources_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../shopping/merchant/conversions/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../conversions/v1/conversionsources.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_conversion_source.rb | 2 +- .../delete_conversion_source.rb | 2 +- .../get_conversion_source.rb | 2 +- .../list_conversion_sources.rb | 2 +- .../undelete_conversion_source.rb | 2 +- .../update_conversion_source.rb | 2 +- .../conversion_sources_service_paths_test.rb | 2 +- .../conversion_sources_service_rest_test.rb | 2 +- .../v1/conversion_sources_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...le-shopping-merchant-conversions-v1beta.rb | 2 +- .../shopping/merchant/conversions/v1beta.rb | 2 +- .../v1beta/conversion_sources_service.rb | 2 +- .../conversion_sources_service/client.rb | 2 +- .../conversion_sources_service/credentials.rb | 2 +- .../conversion_sources_service/paths.rb | 2 +- .../v1beta/conversion_sources_service/rest.rb | 2 +- .../conversion_sources_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/conversionsources_services_pb.rb | 2 +- .../merchant/conversions/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../conversions/v1beta/conversionsources.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_conversion_source.rb | 2 +- .../delete_conversion_source.rb | 2 +- .../get_conversion_source.rb | 2 +- .../list_conversion_sources.rb | 2 +- .../undelete_conversion_source.rb | 2 +- .../update_conversion_source.rb | 2 +- .../conversion_sources_service_paths_test.rb | 2 +- .../conversion_sources_service_rest_test.rb | 2 +- .../v1beta/conversion_sources_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 1723 --------- .../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 | 1589 -------- .../web_security_scanner/rest/service_stub.rb | 878 ----- .../v1beta/crawled_url_pb.rb | 21 - .../v1beta/finding_addon_pb.rb | 27 - .../websecurityscanner/v1beta/finding_pb.rb | 24 - .../v1beta/finding_type_stats_pb.rb | 21 - .../v1beta/scan_config_error_pb.rb | 22 - .../v1beta/scan_config_pb.rb | 34 - .../v1beta/scan_run_error_trace_pb.rb | 24 - .../websecurityscanner/v1beta/scan_run_pb.rb | 28 - .../v1beta/scan_run_warning_trace_pb.rb | 22 - .../v1beta/web_security_scanner_pb.rb | 50 - .../web_security_scanner_services_pb.rb | 73 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 804 ---- .../executions/v1/executions/credentials.rb | 53 - .../executions/v1/executions/paths.rb | 75 - .../executions/v1/executions/rest.rb | 55 - .../executions/v1/executions/rest/client.rb | 733 ---- .../v1/executions/rest/service_stub.rb | 329 -- .../workflows/executions/v1/executions_pb.rb | 46 - .../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 | 593 --- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 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 | 791 ---- .../v1beta/executions/credentials.rb | 53 - .../executions/v1beta/executions/paths.rb | 75 - .../executions/v1beta/executions_pb.rb | 37 - .../v1beta/executions_services_pb.rb | 57 - .../workflows/executions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../workflows/executions/v1beta/executions.rb | 200 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../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 | 35 - .../google-cloud-workflows-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 1076 ------ .../workflows/v1/workflows/credentials.rb | 51 - .../workflows/v1/workflows/operations.rb | 843 ----- .../cloud/workflows/v1/workflows/paths.rb | 113 - .../cloud/workflows/v1/workflows/rest.rb | 56 - .../workflows/v1/workflows/rest/client.rb | 999 ----- .../workflows/v1/workflows/rest/operations.rb | 927 ----- .../v1/workflows/rest/service_stub.rb | 449 --- .../google/cloud/workflows/v1/workflows_pb.rb | 44 - .../workflows/v1/workflows_services_pb.rb | 66 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../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 | 128 - .../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 | 35 - .../google-cloud-workflows-v1beta/.gitignore | 20 - .../.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 | 15 - .../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 | 954 ----- .../workflows/v1beta/workflows/credentials.rb | 51 - .../workflows/v1beta/workflows/operations.rb | 843 ----- .../cloud/workflows/v1beta/workflows/paths.rb | 69 - .../cloud/workflows/v1beta/workflows/rest.rb | 56 - .../workflows/v1beta/workflows/rest/client.rb | 884 ----- .../v1beta/workflows/rest/operations.rb | 927 ----- .../v1beta/workflows/rest/service_stub.rb | 388 -- .../cloud/workflows/v1beta/workflows_pb.rb | 38 - .../workflows/v1beta/workflows_services_pb.rb | 64 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-workload_manager-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-workload_manager-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-workload_manager-v1/Rakefile | 169 - .../gapic_metadata.json | 78 - .../google-cloud-workload_manager-v1.gemspec | 29 - .../lib/google-cloud-workload_manager-v1.rb | 21 - .../lib/google/cloud/workload_manager/v1.rb | 45 - .../workload_manager/v1/bindings_override.rb | 75 - .../google/cloud/workload_manager/v1/rest.rb | 38 - .../cloud/workload_manager/v1/version.rb | 28 - .../workload_manager/v1/workload_manager.rb | 57 - .../v1/workload_manager/client.rb | 1774 --------- .../v1/workload_manager/credentials.rb | 47 - .../v1/workload_manager/operations.rb | 843 ----- .../v1/workload_manager/paths.rb | 111 - .../v1/workload_manager/rest.rb | 55 - .../v1/workload_manager/rest/client.rb | 1655 --------- .../v1/workload_manager/rest/operations.rb | 927 ----- .../v1/workload_manager/rest/service_stub.rb | 816 ---- .../cloud/workloadmanager/v1/service_pb.rb | 75 - .../workloadmanager/v1/service_services_pb.rb | 68 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workloadmanager/v1/service.rb | 991 ----- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...adata_google.cloud.workloadmanager.v1.json | 495 --- .../workload_manager/create_evaluation.rb | 54 - .../workload_manager/delete_evaluation.rb | 54 - .../workload_manager/delete_execution.rb | 54 - .../workload_manager/get_evaluation.rb | 47 - .../workload_manager/get_execution.rb | 47 - .../workload_manager/list_evaluations.rb | 51 - .../list_execution_results.rb | 51 - .../workload_manager/list_executions.rb | 51 - .../snippets/workload_manager/list_rules.rb | 47 - .../list_scanned_resources.rb | 51 - .../workload_manager/run_evaluation.rb | 54 - .../workload_manager/update_evaluation.rb | 54 - .../v1/workload_manager_operations_test.rb | 400 -- .../v1/workload_manager_paths_test.rb | 91 - .../v1/workload_manager_rest_test.rb | 779 ---- .../v1/workload_manager_test.rb | 923 ----- .../test/helper.rb | 35 - .../google-cloud-workstations-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 2620 ------------- .../v1/workstations/credentials.rb | 47 - .../v1/workstations/operations.rb | 843 ----- .../workstations/v1/workstations/paths.rb | 113 - .../workstations/v1/workstations/rest.rb | 54 - .../v1/workstations/rest/client.rb | 2445 ------------ .../v1/workstations/rest/operations.rb | 927 ----- .../v1/workstations/rest/service_stub.rb | 1310 ------- .../cloud/workstations/v1/workstations_pb.rb | 85 - .../v1/workstations_services_pb.rb | 88 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1/workstations.rb | 1678 --------- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...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 | 1225 ------ .../workstations/v1/workstations_test.rb | 1451 -------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.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 | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../google-cloud-workstations-v1beta/Rakefile | 169 - .../gapic_metadata.json | 123 - .../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 | 2728 -------------- .../v1beta/workstations/credentials.rb | 47 - .../v1beta/workstations/operations.rb | 843 ----- .../workstations/v1beta/workstations/paths.rb | 113 - .../workstations/v1beta/workstations/rest.rb | 54 - .../v1beta/workstations/rest/client.rb | 2546 ------------- .../v1beta/workstations/rest/operations.rb | 927 ----- .../v1beta/workstations/rest/service_stub.rb | 1372 ------- .../workstations/v1beta/workstations_pb.rb | 92 - .../v1beta/workstations_services_pb.rb | 92 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1beta/workstations.rb | 1874 ---------- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...data_google.cloud.workstations.v1beta.json | 855 ----- .../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 - .../snippets/workstations/push_credentials.rb | 54 - .../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 | 1280 ------- .../workstations/v1beta/workstations_test.rb | 1516 -------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...-developers-developer_knowledge-v1.gemspec | 28 - ...oogle-developers-developer_knowledge-v1.rb | 21 - .../developers/developer_knowledge/v1.rb | 45 - .../v1/developer_knowledge.rb | 70 - .../v1/developer_knowledge/client.rb | 847 ----- .../v1/developer_knowledge/credentials.rb | 47 - .../v1/developer_knowledge/paths.rb | 47 - .../v1/developer_knowledge/rest.rb | 67 - .../v1/developer_knowledge/rest/client.rb | 800 ---- .../developer_knowledge/rest/service_stub.rb | 320 -- .../developers/developer_knowledge/v1/rest.rb | 37 - .../developer_knowledge/v1/version.rb | 28 - .../knowledge/v1/developerknowledge_pb.rb | 41 - .../v1/developerknowledge_services_pb.rb | 77 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../knowledge/v1/developerknowledge.rb | 371 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../snippets/Gemfile | 32 - .../developer_knowledge/answer_query.rb | 47 - .../batch_get_documents.rb | 47 - .../developer_knowledge/get_document.rb | 47 - .../search_document_chunks.rb | 51 - ...tadata_google.developers.knowledge.v1.json | 175 - .../v1/developer_knowledge_paths_test.rb | 55 - .../v1/developer_knowledge_rest_test.rb | 320 -- .../v1/developer_knowledge_test.rb | 351 -- .../test/helper.rb | 35 - .../google-iam-credentials-v1/.gitignore | 20 - .../.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 | 15 - .../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 | 33 - .../iam/credentials/v1/iam_credentials.rb | 63 - .../credentials/v1/iam_credentials/client.rb | 856 ----- .../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 | 785 ---- .../v1/iam_credentials/rest/service_stub.rb | 329 -- .../iam/credentials/v1/iamcredentials_pb.rb | 24 - .../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 | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/iam/credentials/v1/common.rb | 186 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../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 | 35 - owl-bot-staging/google-iam-v2/.gitignore | 20 - .../google-iam-v2/.repo-metadata.json | 17 - owl-bot-staging/google-iam-v2/.rubocop.yml | 33 - owl-bot-staging/google-iam-v2/.toys.rb | 28 - owl-bot-staging/google-iam-v2/.yardopts | 12 - .../google-iam-v2/AUTHENTICATION.md | 122 - owl-bot-staging/google-iam-v2/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v2/Gemfile | 15 - owl-bot-staging/google-iam-v2/LICENSE.md | 201 - owl-bot-staging/google-iam-v2/README.md | 154 - owl-bot-staging/google-iam-v2/Rakefile | 169 - .../google-iam-v2/gapic_metadata.json | 43 - .../google-iam-v2/google-iam-v2.gemspec | 28 - .../google-iam-v2/lib/google-iam-v2.rb | 21 - .../google-iam-v2/lib/google/iam/v2.rb | 43 - .../lib/google/iam/v2/deny_pb.rb | 21 - .../lib/google/iam/v2/policies.rb | 53 - .../lib/google/iam/v2/policies/client.rb | 989 ----- .../lib/google/iam/v2/policies/credentials.rb | 45 - .../lib/google/iam/v2/policies/operations.rb | 841 ----- .../lib/google/iam/v2/policies/rest.rb | 50 - .../lib/google/iam/v2/policies/rest/client.rb | 911 ----- .../google/iam/v2/policies/rest/operations.rb | 925 ----- .../iam/v2/policies/rest/service_stub.rb | 386 -- .../lib/google/iam/v2/policy_pb.rb | 34 - .../lib/google/iam/v2/policy_services_pb.rb | 65 - .../google-iam-v2/lib/google/iam/v2/rest.rb | 35 - .../lib/google/iam/v2/version.rb | 26 - .../google-iam-v2/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/iam/v2/deny.rb | 110 - .../proto_docs/google/iam/v2/policy.rb | 241 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v2/snippets/Gemfile | 32 - .../snippets/policies/create_policy.rb | 54 - .../snippets/policies/delete_policy.rb | 54 - .../snippets/policies/get_policy.rb | 47 - .../snippets/policies/list_policies.rb | 51 - .../snippets/policies/update_policy.rb | 54 - .../snippet_metadata_google.iam.v2.json | 215 -- .../google/iam/v2/policies_operations_test.rb | 400 -- .../test/google/iam/v2/policies_rest_test.rb | 374 -- .../test/google/iam/v2/policies_test.rb | 438 --- owl-bot-staging/google-iam-v2/test/helper.rb | 35 - owl-bot-staging/google-iam-v3/.gitignore | 20 - .../google-iam-v3/.repo-metadata.json | 17 - owl-bot-staging/google-iam-v3/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3/.toys.rb | 28 - owl-bot-staging/google-iam-v3/.yardopts | 12 - .../google-iam-v3/AUTHENTICATION.md | 122 - owl-bot-staging/google-iam-v3/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3/Gemfile | 15 - owl-bot-staging/google-iam-v3/LICENSE.md | 201 - owl-bot-staging/google-iam-v3/README.md | 154 - owl-bot-staging/google-iam-v3/Rakefile | 169 - .../google-iam-v3/gapic_metadata.json | 126 - .../google-iam-v3/google-iam-v3.gemspec | 29 - .../google-iam-v3/lib/google-iam-v3.rb | 21 - .../google-iam-v3/lib/google/iam/v3.rb | 45 - .../lib/google/iam/v3/access_policies.rb | 54 - .../google/iam/v3/access_policies/client.rb | 1113 ------ .../iam/v3/access_policies/credentials.rb | 45 - .../iam/v3/access_policies/operations.rb | 841 ----- .../google/iam/v3/access_policies/paths.rb | 140 - .../lib/google/iam/v3/access_policies/rest.rb | 51 - .../iam/v3/access_policies/rest/client.rb | 1028 ----- .../iam/v3/access_policies/rest/operations.rb | 939 ----- .../v3/access_policies/rest/service_stub.rb | 535 --- .../iam/v3/access_policies_service_pb.rb | 36 - .../v3/access_policies_service_services_pb.rb | 54 - .../iam/v3/access_policy_resources_pb.rb | 29 - .../google/iam/v3/operation_metadata_pb.rb | 22 - .../iam/v3/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3/policy_bindings.rb | 55 - .../google/iam/v3/policy_bindings/client.rb | 1157 ------ .../iam/v3/policy_bindings/credentials.rb | 45 - .../iam/v3/policy_bindings/operations.rb | 841 ----- .../google/iam/v3/policy_bindings/paths.rb | 140 - .../lib/google/iam/v3/policy_bindings/rest.rb | 52 - .../iam/v3/policy_bindings/rest/client.rb | 1072 ------ .../iam/v3/policy_bindings/rest/operations.rb | 939 ----- .../v3/policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3/policy_bindings_service_pb.rb | 36 - .../v3/policy_bindings_service_services_pb.rb | 61 - .../v3/principal_access_boundary_policies.rb | 55 - .../client.rb | 1102 ------ .../credentials.rb | 45 - .../operations.rb | 841 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1017 ----- .../rest/operations.rb | 939 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../google-iam-v3/lib/google/iam/v3/rest.rb | 37 - .../lib/google/iam/v3/version.rb | 26 - .../google-iam-v3/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/iam/v3/access_policies_service.rb | 203 - .../google/iam/v3/access_policy_resources.rb | 223 -- .../google/iam/v3/operation_metadata.rb | 55 - .../google/iam/v3/policy_binding_resources.rb | 193 - .../google/iam/v3/policy_bindings_service.rb | 243 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3/snippets/Gemfile | 32 - .../access_policies/create_access_policy.rb | 54 - .../access_policies/delete_access_policy.rb | 54 - .../access_policies/get_access_policy.rb | 47 - .../access_policies/list_access_policies.rb | 51 - .../search_access_policy_bindings.rb | 51 - .../access_policies/update_access_policy.rb | 54 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3.json | 735 ---- .../iam/v3/access_policies_operations_test.rb | 400 -- .../iam/v3/access_policies_paths_test.rb | 97 - .../iam/v3/access_policies_rest_test.rb | 434 --- .../google/iam/v3/access_policies_test.rb | 513 --- .../iam/v3/policy_bindings_operations_test.rb | 400 -- .../iam/v3/policy_bindings_paths_test.rb | 97 - .../iam/v3/policy_bindings_rest_test.rb | 437 --- .../google/iam/v3/policy_bindings_test.rb | 519 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- owl-bot-staging/google-iam-v3/test/helper.rb | 35 - owl-bot-staging/google-iam-v3beta/.gitignore | 20 - .../google-iam-v3beta/.repo-metadata.json | 17 - .../google-iam-v3beta/.rubocop.yml | 33 - owl-bot-staging/google-iam-v3beta/.toys.rb | 28 - owl-bot-staging/google-iam-v3beta/.yardopts | 12 - .../google-iam-v3beta/AUTHENTICATION.md | 122 - .../google-iam-v3beta/CHANGELOG.md | 2 - owl-bot-staging/google-iam-v3beta/Gemfile | 15 - owl-bot-staging/google-iam-v3beta/LICENSE.md | 201 - owl-bot-staging/google-iam-v3beta/README.md | 154 - owl-bot-staging/google-iam-v3beta/Rakefile | 169 - .../google-iam-v3beta/gapic_metadata.json | 126 - .../google-iam-v3beta.gemspec | 29 - .../lib/google-iam-v3beta.rb | 21 - .../lib/google/iam/v3beta.rb | 45 - .../lib/google/iam/v3beta/access_policies.rb | 54 - .../iam/v3beta/access_policies/client.rb | 1113 ------ .../iam/v3beta/access_policies/credentials.rb | 45 - .../iam/v3beta/access_policies/operations.rb | 841 ----- .../iam/v3beta/access_policies/paths.rb | 140 - .../google/iam/v3beta/access_policies/rest.rb | 51 - .../iam/v3beta/access_policies/rest/client.rb | 1028 ----- .../v3beta/access_policies/rest/operations.rb | 939 ----- .../access_policies/rest/service_stub.rb | 535 --- .../iam/v3beta/access_policies_service_pb.rb | 36 - .../access_policies_service_services_pb.rb | 54 - .../iam/v3beta/access_policy_resources_pb.rb | 29 - .../iam/v3beta/operation_metadata_pb.rb | 22 - .../iam/v3beta/policy_binding_resources_pb.rb | 27 - .../lib/google/iam/v3beta/policy_bindings.rb | 55 - .../iam/v3beta/policy_bindings/client.rb | 1157 ------ .../iam/v3beta/policy_bindings/credentials.rb | 45 - .../iam/v3beta/policy_bindings/operations.rb | 841 ----- .../iam/v3beta/policy_bindings/paths.rb | 140 - .../google/iam/v3beta/policy_bindings/rest.rb | 52 - .../iam/v3beta/policy_bindings/rest/client.rb | 1072 ------ .../v3beta/policy_bindings/rest/operations.rb | 939 ----- .../policy_bindings/rest/service_stub.rb | 535 --- .../iam/v3beta/policy_bindings_service_pb.rb | 36 - .../policy_bindings_service_services_pb.rb | 61 - .../principal_access_boundary_policies.rb | 55 - .../client.rb | 1102 ------ .../credentials.rb | 45 - .../operations.rb | 841 ----- .../paths.rb | 67 - .../rest.rb | 52 - .../rest/client.rb | 1017 ----- .../rest/operations.rb | 939 ----- .../rest/service_stub.rb | 447 --- ...pal_access_boundary_policies_service_pb.rb | 37 - ...s_boundary_policies_service_services_pb.rb | 56 - ...pal_access_boundary_policy_resources_pb.rb | 27 - .../lib/google/iam/v3beta/rest.rb | 37 - .../lib/google/iam/v3beta/version.rb | 26 - .../google-iam-v3beta/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../iam/v3beta/access_policies_service.rb | 203 - .../iam/v3beta/access_policy_resources.rb | 223 -- .../google/iam/v3beta/operation_metadata.rb | 55 - .../iam/v3beta/policy_binding_resources.rb | 193 - .../iam/v3beta/policy_bindings_service.rb | 243 -- ...ncipal_access_boundary_policies_service.rb | 191 - ...ncipal_access_boundary_policy_resources.rb | 127 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-iam-v3beta/snippets/Gemfile | 32 - .../access_policies/create_access_policy.rb | 54 - .../access_policies/delete_access_policy.rb | 54 - .../access_policies/get_access_policy.rb | 47 - .../access_policies/list_access_policies.rb | 51 - .../search_access_policy_bindings.rb | 51 - .../access_policies/update_access_policy.rb | 54 - .../policy_bindings/create_policy_binding.rb | 54 - .../policy_bindings/delete_policy_binding.rb | 54 - .../policy_bindings/get_policy_binding.rb | 47 - .../policy_bindings/list_policy_bindings.rb | 51 - .../search_target_policy_bindings.rb | 51 - .../policy_bindings/update_policy_binding.rb | 54 - ...create_principal_access_boundary_policy.rb | 54 - ...delete_principal_access_boundary_policy.rb | 54 - .../get_principal_access_boundary_policy.rb | 47 - ...list_principal_access_boundary_policies.rb | 51 - ...incipal_access_boundary_policy_bindings.rb | 51 - ...update_principal_access_boundary_policy.rb | 54 - .../snippet_metadata_google.iam.v3beta.json | 735 ---- .../v3beta/access_policies_operations_test.rb | 400 -- .../iam/v3beta/access_policies_paths_test.rb | 97 - .../iam/v3beta/access_policies_rest_test.rb | 434 --- .../google/iam/v3beta/access_policies_test.rb | 513 --- .../v3beta/policy_bindings_operations_test.rb | 400 -- .../iam/v3beta/policy_bindings_paths_test.rb | 97 - .../iam/v3beta/policy_bindings_rest_test.rb | 437 --- .../google/iam/v3beta/policy_bindings_test.rb | 519 --- ...ccess_boundary_policies_operations_test.rb | 400 -- ...pal_access_boundary_policies_paths_test.rb | 67 - ...ipal_access_boundary_policies_rest_test.rb | 435 --- ...principal_access_boundary_policies_test.rb | 515 --- .../google-iam-v3beta/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 148 - ...identity-access_context_manager-v1.gemspec | 29 - ...ogle-identity-access_context_manager-v1.rb | 21 - .../identity/access_context_manager/v1.rb | 45 - .../v1/access_context_manager.rb | 66 - .../v1/access_context_manager/client.rb | 3299 ----------------- .../v1/access_context_manager/credentials.rb | 47 - .../v1/access_context_manager/operations.rb | 843 ----- .../v1/access_context_manager/paths.rb | 112 - .../v1/access_context_manager/rest.rb | 63 - .../v1/access_context_manager/rest/client.rb | 3090 --------------- .../access_context_manager/rest/operations.rb | 927 ----- .../rest/service_stub.rb | 1693 --------- .../access_context_manager/v1/rest.rb | 37 - .../access_context_manager/v1/version.rb | 28 - .../type/device_resources_pb.rb | 23 - .../v1/access_context_manager_pb.rb | 65 - .../v1/access_context_manager_services_pb.rb | 240 -- .../v1/access_level_pb.rb | 32 - .../v1/access_policy_pb.rb | 24 - .../v1/gcp_user_access_binding_pb.rb | 24 - .../v1/service_perimeter_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 --- .../type/device_resources.rb | 84 - .../v1/access_context_manager.rb | 539 --- .../accesscontextmanager/v1/access_level.rb | 201 - .../accesscontextmanager/v1/access_policy.rb | 76 - .../v1/gcp_user_access_binding.rb | 55 - .../v1/service_perimeter.rb | 500 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../commit_service_perimeters.rb | 54 - .../create_access_level.rb | 54 - .../create_access_policy.rb | 54 - .../create_gcp_user_access_binding.rb | 54 - .../create_service_perimeter.rb | 54 - .../delete_access_level.rb | 54 - .../delete_access_policy.rb | 54 - .../delete_gcp_user_access_binding.rb | 54 - .../delete_service_perimeter.rb | 54 - .../get_access_level.rb | 47 - .../get_access_policy.rb | 47 - .../get_gcp_user_access_binding.rb | 47 - .../access_context_manager/get_iam_policy.rb | 47 - .../get_service_perimeter.rb | 47 - .../list_access_levels.rb | 51 - .../list_access_policies.rb | 51 - .../list_gcp_user_access_bindings.rb | 51 - .../list_service_perimeters.rb | 51 - .../replace_access_levels.rb | 54 - .../replace_service_perimeters.rb | 54 - .../access_context_manager/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_access_level.rb | 54 - .../update_access_policy.rb | 54 - .../update_gcp_user_access_binding.rb | 54 - .../update_service_perimeter.rb | 54 - ...ogle.identity.accesscontextmanager.v1.json | 1055 ------ .../access_context_manager_operations_test.rb | 400 -- .../v1/access_context_manager_paths_test.rb | 103 - .../v1/access_context_manager_rest_test.rb | 1535 -------- .../v1/access_context_manager_test.rb | 1785 --------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 78 - ...ogle-maps-fleet_engine-delivery-v1.gemspec | 29 - .../google-maps-fleet_engine-delivery-v1.rb | 21 - .../google/maps/fleet_engine/delivery/v1.rb | 47 - .../delivery/v1/delivery_service.rb | 57 - .../delivery/v1/delivery_service/client.rb | 1757 --------- .../v1/delivery_service/credentials.rb | 49 - .../delivery/v1/delivery_service/paths.rb | 100 - .../delivery/v1/delivery_service/rest.rb | 54 - .../v1/delivery_service/rest/client.rb | 1618 -------- .../v1/delivery_service/rest/service_stub.rb | 820 ---- .../maps/fleet_engine/delivery/v1/rest.rb | 39 - .../maps/fleet_engine/delivery/v1/version.rb | 30 - .../maps/fleetengine/delivery/v1/common_pb.rb | 33 - .../delivery/v1/delivery_api_pb.rb | 50 - .../delivery/v1/delivery_api_services_pb.rb | 81 - .../delivery/v1/delivery_vehicles_pb.rb | 36 - .../maps/fleetengine/delivery/v1/header_pb.rb | 27 - .../delivery/v1/task_tracking_info_pb.rb | 32 - .../maps/fleetengine/delivery/v1/tasks_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../maps/fleetengine/delivery/v1/common.rb | 276 -- .../fleetengine/delivery/v1/delivery_api.rb | 395 -- .../delivery/v1/delivery_vehicles.rb | 276 -- .../maps/fleetengine/delivery/v1/header.rb | 113 - .../delivery/v1/task_tracking_info.rb | 91 - .../maps/fleetengine/delivery/v1/tasks.rb | 291 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../delivery_service/batch_create_tasks.rb | 47 - .../create_delivery_vehicle.rb | 47 - .../snippets/delivery_service/create_task.rb | 47 - .../delete_delivery_vehicle.rb | 47 - .../snippets/delivery_service/delete_task.rb | 47 - .../delivery_service/get_delivery_vehicle.rb | 47 - .../snippets/delivery_service/get_task.rb | 47 - .../get_task_tracking_info.rb | 47 - .../list_delivery_vehicles.rb | 51 - .../snippets/delivery_service/list_tasks.rb | 51 - .../update_delivery_vehicle.rb | 47 - .../snippets/delivery_service/update_task.rb | 47 - ...metadata_maps.fleetengine.delivery.v1.json | 495 --- .../v1/delivery_service_paths_test.rb | 91 - .../delivery/v1/delivery_service_rest_test.rb | 773 ---- .../delivery/v1/delivery_service_test.rb | 862 ----- .../test/helper.rb | 35 - .../google-maps-fleet_engine-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-maps-fleet_engine-v1/.rubocop.yml | 33 - .../google-maps-fleet_engine-v1/.toys.rb | 28 - .../google-maps-fleet_engine-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-maps-fleet_engine-v1/CHANGELOG.md | 2 - .../google-maps-fleet_engine-v1/Gemfile | 15 - .../google-maps-fleet_engine-v1/LICENSE.md | 201 - .../google-maps-fleet_engine-v1/README.md | 154 - .../google-maps-fleet_engine-v1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-maps-fleet_engine-v1.gemspec | 29 - .../lib/google-maps-fleet_engine-v1.rb | 21 - .../lib/google/maps/fleet_engine/v1.rb | 46 - .../lib/google/maps/fleet_engine/v1/rest.rb | 38 - .../maps/fleet_engine/v1/trip_service.rb | 55 - .../fleet_engine/v1/trip_service/client.rb | 1153 ------ .../v1/trip_service/credentials.rb | 47 - .../fleet_engine/v1/trip_service/paths.rb | 50 - .../maps/fleet_engine/v1/trip_service/rest.rb | 52 - .../v1/trip_service/rest/client.rb | 1062 ------ .../v1/trip_service/rest/service_stub.rb | 451 --- .../maps/fleet_engine/v1/vehicle_service.rb | 55 - .../fleet_engine/v1/vehicle_service/client.rb | 1463 -------- .../v1/vehicle_service/credentials.rb | 47 - .../fleet_engine/v1/vehicle_service/paths.rb | 50 - .../fleet_engine/v1/vehicle_service/rest.rb | 52 - .../v1/vehicle_service/rest/client.rb | 1364 ------- .../v1/vehicle_service/rest/service_stub.rb | 512 --- .../google/maps/fleet_engine/v1/version.rb | 28 - .../maps/fleetengine/v1/fleetengine_pb.rb | 39 - .../google/maps/fleetengine/v1/header_pb.rb | 25 - .../google/maps/fleetengine/v1/traffic_pb.rb | 23 - .../google/maps/fleetengine/v1/trip_api_pb.rb | 41 - .../fleetengine/v1/trip_api_services_pb.rb | 58 - .../google/maps/fleetengine/v1/trips_pb.rb | 34 - .../maps/fleetengine/v1/vehicle_api_pb.rb | 52 - .../fleetengine/v1/vehicle_api_services_pb.rb | 108 - .../google/maps/fleetengine/v1/vehicles_pb.rb | 40 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/geo/type/viewport.rb | 70 - .../google/maps/fleetengine/v1/fleetengine.rb | 394 -- .../google/maps/fleetengine/v1/header.rb | 111 - .../google/maps/fleetengine/v1/traffic.rb | 76 - .../google/maps/fleetengine/v1/trip_api.rb | 312 -- .../google/maps/fleetengine/v1/trips.rb | 289 -- .../google/maps/fleetengine/v1/vehicle_api.rb | 674 ---- .../google/maps/fleetengine/v1/vehicles.rb | 365 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../snippet_metadata_maps.fleetengine.v1.json | 535 --- .../snippets/trip_service/create_trip.rb | 47 - .../snippets/trip_service/delete_trip.rb | 47 - .../snippets/trip_service/get_trip.rb | 47 - .../trip_service/report_billable_trip.rb | 47 - .../snippets/trip_service/search_trips.rb | 51 - .../snippets/trip_service/update_trip.rb | 47 - .../vehicle_service/create_vehicle.rb | 47 - .../vehicle_service/delete_vehicle.rb | 47 - .../snippets/vehicle_service/get_vehicle.rb | 47 - .../snippets/vehicle_service/list_vehicles.rb | 51 - .../vehicle_service/search_vehicles.rb | 47 - .../vehicle_service/update_vehicle.rb | 47 - .../update_vehicle_attributes.rb | 47 - .../v1/trip_service_paths_test.rb | 55 - .../fleet_engine/v1/trip_service_rest_test.rb | 447 --- .../maps/fleet_engine/v1/trip_service_test.rb | 505 --- .../v1/vehicle_service_paths_test.rb | 55 - .../v1/vehicle_service_rest_test.rb | 520 --- .../fleet_engine/v1/vehicle_service_test.rb | 601 --- .../test/helper.rb | 35 - .../google-shopping-css-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-shopping-css-v1/.rubocop.yml | 33 - .../google-shopping-css-v1/.toys.rb | 28 - .../google-shopping-css-v1/.yardopts | 12 - .../google-shopping-css-v1/AUTHENTICATION.md | 122 - .../google-shopping-css-v1/CHANGELOG.md | 2 - .../google-shopping-css-v1/Gemfile | 15 - .../google-shopping-css-v1/LICENSE.md | 201 - .../google-shopping-css-v1/README.md | 154 - .../google-shopping-css-v1/Rakefile | 169 - .../gapic_metadata.json | 119 - .../google-shopping-css-v1.gemspec | 29 - .../lib/google-shopping-css-v1.rb | 21 - .../lib/google/shopping/css/v1.rb | 49 - .../shopping/css/v1/account_labels_service.rb | 55 - .../css/v1/account_labels_service/client.rb | 785 ---- .../v1/account_labels_service/credentials.rb | 47 - .../css/v1/account_labels_service/paths.rb | 64 - .../css/v1/account_labels_service/rest.rb | 52 - .../v1/account_labels_service/rest/client.rb | 714 ---- .../rest/service_stub.rb | 327 -- .../shopping/css/v1/accounts_labels_pb.rb | 33 - .../css/v1/accounts_labels_services_pb.rb | 51 - .../lib/google/shopping/css/v1/accounts_pb.rb | 31 - .../shopping/css/v1/accounts_service.rb | 55 - .../css/v1/accounts_service/client.rb | 709 ---- .../css/v1/accounts_service/credentials.rb | 47 - .../shopping/css/v1/accounts_service/paths.rb | 47 - .../shopping/css/v1/accounts_service/rest.rb | 52 - .../css/v1/accounts_service/rest/client.rb | 645 ---- .../v1/accounts_service/rest/service_stub.rb | 265 -- .../shopping/css/v1/accounts_services_pb.rb | 50 - .../shopping/css/v1/css_product_common_pb.rb | 35 - .../shopping/css/v1/css_product_inputs_pb.rb | 34 - .../css/v1/css_product_inputs_service.rb | 56 - .../v1/css_product_inputs_service/client.rb | 716 ---- .../css_product_inputs_service/credentials.rb | 47 - .../v1/css_product_inputs_service/paths.rb | 64 - .../css/v1/css_product_inputs_service/rest.rb | 53 - .../css_product_inputs_service/rest/client.rb | 652 ---- .../rest/service_stub.rb | 266 -- .../css/v1/css_product_inputs_services_pb.rb | 61 - .../google/shopping/css/v1/css_products_pb.rb | 31 - .../shopping/css/v1/css_products_service.rb | 56 - .../css/v1/css_products_service/client.rb | 606 --- .../v1/css_products_service/credentials.rb | 47 - .../css/v1/css_products_service/paths.rb | 64 - .../css/v1/css_products_service/rest.rb | 53 - .../v1/css_products_service/rest/client.rb | 549 --- .../css_products_service/rest/service_stub.rb | 203 - .../css/v1/css_products_services_pb.rb | 56 - .../lib/google/shopping/css/v1/quota_pb.rb | 29 - .../google/shopping/css/v1/quota_service.rb | 55 - .../shopping/css/v1/quota_service/client.rb | 495 --- .../css/v1/quota_service/credentials.rb | 47 - .../shopping/css/v1/quota_service/paths.rb | 47 - .../shopping/css/v1/quota_service/rest.rb | 52 - .../css/v1/quota_service/rest/client.rb | 445 --- .../css/v1/quota_service/rest/service_stub.rb | 142 - .../shopping/css/v1/quota_services_pb.rb | 45 - .../lib/google/shopping/css/v1/rest.rb | 41 - .../lib/google/shopping/css/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../google/shopping/css/v1/accounts.rb | 171 - .../google/shopping/css/v1/accounts_labels.rb | 131 - .../shopping/css/v1/css_product_common.rb | 436 --- .../shopping/css/v1/css_product_inputs.rb | 169 - .../google/shopping/css/v1/css_products.rb | 110 - .../google/shopping/css/v1/quota.rb | 110 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../google-shopping-css-v1/snippets/Gemfile | 32 - .../create_account_label.rb | 47 - .../delete_account_label.rb | 47 - .../list_account_labels.rb | 51 - .../update_account_label.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_child_accounts.rb | 51 - .../accounts_service/update_labels.rb | 47 - .../delete_css_product_input.rb | 47 - .../insert_css_product_input.rb | 47 - .../update_css_product_input.rb | 47 - .../css_products_service/get_css_product.rb | 47 - .../css_products_service/list_css_products.rb | 51 - .../quota_service/list_quota_groups.rb | 51 - ...ippet_metadata_google.shopping.css.v1.json | 535 --- .../v1/account_labels_service_paths_test.rb | 67 - .../v1/account_labels_service_rest_test.rb | 318 -- .../css/v1/account_labels_service_test.rb | 347 -- .../css/v1/accounts_service_paths_test.rb | 55 - .../css/v1/accounts_service_rest_test.rb | 268 -- .../shopping/css/v1/accounts_service_test.rb | 301 -- .../css_product_inputs_service_paths_test.rb | 67 - .../css_product_inputs_service_rest_test.rb | 265 -- .../css/v1/css_product_inputs_service_test.rb | 287 -- .../css/v1/css_products_service_paths_test.rb | 67 - .../css/v1/css_products_service_rest_test.rb | 209 -- .../css/v1/css_products_service_test.rb | 229 -- .../css/v1/quota_service_paths_test.rb | 55 - .../css/v1/quota_service_rest_test.rb | 155 - .../shopping/css/v1/quota_service_test.rb | 171 - .../google-shopping-css-v1/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 504 --- ...-shopping-merchant-accounts-v1beta.gemspec | 29 - ...oogle-shopping-merchant-accounts-v1beta.rb | 21 - .../shopping/merchant/accounts/v1beta.rb | 66 - .../accounts/v1beta/accessright_pb.rb | 23 - .../accounts/v1beta/account_issue_service.rb | 57 - .../v1beta/account_issue_service/client.rb | 509 --- .../account_issue_service/credentials.rb | 49 - .../v1beta/account_issue_service/paths.rb | 49 - .../v1beta/account_issue_service/rest.rb | 54 - .../account_issue_service/rest/client.rb | 459 --- .../rest/service_stub.rb | 144 - .../accounts/v1beta/account_tax_pb.rb | 34 - .../accounts/v1beta/account_tax_service.rb | 61 - .../v1beta/account_tax_service/client.rb | 688 ---- .../v1beta/account_tax_service/credentials.rb | 49 - .../v1beta/account_tax_service/paths.rb | 66 - .../v1beta/account_tax_service/rest.rb | 58 - .../v1beta/account_tax_service/rest/client.rb | 624 ---- .../account_tax_service/rest/service_stub.rb | 267 -- .../v1beta/account_tax_services_pb.rb | 58 - .../accounts/v1beta/accountissue_pb.rb | 34 - .../v1beta/accountissue_services_pb.rb | 47 - .../merchant/accounts/v1beta/accounts_pb.rb | 43 - .../accounts/v1beta/accounts_service.rb | 57 - .../v1beta/accounts_service/client.rb | 1000 ----- .../v1beta/accounts_service/credentials.rb | 49 - .../accounts/v1beta/accounts_service/paths.rb | 80 - .../accounts/v1beta/accounts_service/rest.rb | 54 - .../v1beta/accounts_service/rest/client.rb | 931 ----- .../accounts_service/rest/service_stub.rb | 447 --- .../accounts/v1beta/accounts_services_pb.rb | 75 - .../accounts/v1beta/accountservices_pb.rb | 28 - .../v1beta/autofeed_settings_service.rb | 58 - .../autofeed_settings_service/client.rb | 579 --- .../autofeed_settings_service/credentials.rb | 49 - .../v1beta/autofeed_settings_service/paths.rb | 49 - .../v1beta/autofeed_settings_service/rest.rb | 55 - .../autofeed_settings_service/rest/client.rb | 522 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/autofeedsettings_pb.rb | 31 - .../v1beta/autofeedsettings_services_pb.rb | 50 - .../v1beta/automatic_improvements_service.rb | 59 - .../automatic_improvements_service/client.rb | 589 --- .../credentials.rb | 49 - .../automatic_improvements_service/paths.rb | 49 - .../automatic_improvements_service/rest.rb | 56 - .../rest/client.rb | 532 --- .../rest/service_stub.rb | 206 - .../v1beta/automaticimprovements_pb.rb | 36 - .../automaticimprovements_services_pb.rb | 51 - .../v1beta/business_identity_service.rb | 58 - .../business_identity_service/client.rb | 580 --- .../business_identity_service/credentials.rb | 49 - .../v1beta/business_identity_service/paths.rb | 49 - .../v1beta/business_identity_service/rest.rb | 55 - .../business_identity_service/rest/client.rb | 523 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/business_info_service.rb | 57 - .../v1beta/business_info_service/client.rb | 579 --- .../business_info_service/credentials.rb | 49 - .../v1beta/business_info_service/paths.rb | 49 - .../v1beta/business_info_service/rest.rb | 54 - .../business_info_service/rest/client.rb | 522 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/businessidentity_pb.rb | 34 - .../v1beta/businessidentity_services_pb.rb | 51 - .../accounts/v1beta/businessinfo_pb.rb | 35 - .../v1beta/businessinfo_services_pb.rb | 50 - .../v1beta/checkout_settings_service.rb | 58 - .../checkout_settings_service/client.rb | 776 ---- .../checkout_settings_service/credentials.rb | 49 - .../v1beta/checkout_settings_service/paths.rb | 69 - .../v1beta/checkout_settings_service/rest.rb | 55 - .../checkout_settings_service/rest/client.rb | 705 ---- .../rest/service_stub.rb | 329 -- .../accounts/v1beta/checkoutsettings_pb.rb | 38 - .../v1beta/checkoutsettings_services_pb.rb | 56 - .../accounts/v1beta/customerservice_pb.rb | 26 - .../v1beta/email_preferences_service.rb | 60 - .../email_preferences_service/client.rb | 594 --- .../email_preferences_service/credentials.rb | 49 - .../v1beta/email_preferences_service/paths.rb | 52 - .../v1beta/email_preferences_service/rest.rb | 57 - .../email_preferences_service/rest/client.rb | 537 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/emailpreferences_pb.rb | 32 - .../v1beta/emailpreferences_services_pb.rb | 65 - .../accounts/v1beta/gbp_accounts_service.rb | 60 - .../v1beta/gbp_accounts_service/client.rb | 600 --- .../gbp_accounts_service/credentials.rb | 49 - .../v1beta/gbp_accounts_service/paths.rb | 49 - .../v1beta/gbp_accounts_service/rest.rb | 57 - .../gbp_accounts_service/rest/client.rb | 543 --- .../gbp_accounts_service/rest/service_stub.rb | 206 - .../accounts/v1beta/gbpaccounts_pb.rb | 34 - .../v1beta/gbpaccounts_services_pb.rb | 52 - .../merchant/accounts/v1beta/homepage_pb.rb | 33 - .../accounts/v1beta/homepage_service.rb | 57 - .../v1beta/homepage_service/client.rb | 777 ---- .../v1beta/homepage_service/credentials.rb | 49 - .../accounts/v1beta/homepage_service/paths.rb | 49 - .../accounts/v1beta/homepage_service/rest.rb | 54 - .../v1beta/homepage_service/rest/client.rb | 706 ---- .../homepage_service/rest/service_stub.rb | 330 -- .../accounts/v1beta/homepage_services_pb.rb | 66 - .../accounts/v1beta/lfp_providers_service.rb | 59 - .../v1beta/lfp_providers_service/client.rb | 603 --- .../lfp_providers_service/credentials.rb | 49 - .../v1beta/lfp_providers_service/paths.rb | 71 - .../v1beta/lfp_providers_service/rest.rb | 56 - .../lfp_providers_service/rest/client.rb | 546 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/lfpproviders_pb.rb | 33 - .../v1beta/lfpproviders_services_pb.rb | 51 - .../v1beta/omnichannel_settings_service.rb | 60 - .../omnichannel_settings_service/client.rb | 894 ----- .../credentials.rb | 49 - .../omnichannel_settings_service/paths.rb | 66 - .../omnichannel_settings_service/rest.rb | 57 - .../rest/client.rb | 816 ---- .../rest/service_stub.rb | 391 -- .../accounts/v1beta/omnichannelsettings_pb.rb | 46 - .../v1beta/omnichannelsettings_services_pb.rb | 58 - .../v1beta/online_return_policy_pb.rb | 47 - .../v1beta/online_return_policy_service.rb | 61 - .../online_return_policy_service/client.rb | 899 ----- .../credentials.rb | 49 - .../online_return_policy_service/paths.rb | 66 - .../online_return_policy_service/rest.rb | 58 - .../rest/client.rb | 821 ---- .../rest/service_stub.rb | 390 -- .../online_return_policy_services_pb.rb | 59 - .../v1beta/phoneverificationstate_pb.rb | 23 - .../merchant/accounts/v1beta/programs_pb.rb | 35 - .../accounts/v1beta/programs_service.rb | 67 - .../v1beta/programs_service/client.rb | 788 ---- .../v1beta/programs_service/credentials.rb | 49 - .../accounts/v1beta/programs_service/paths.rb | 66 - .../accounts/v1beta/programs_service/rest.rb | 64 - .../v1beta/programs_service/rest/client.rb | 717 ---- .../programs_service/rest/service_stub.rb | 329 -- .../accounts/v1beta/programs_services_pb.rb | 65 - .../merchant/accounts/v1beta/regions_pb.rb | 40 - .../accounts/v1beta/regions_service.rb | 61 - .../accounts/v1beta/regions_service/client.rb | 888 ----- .../v1beta/regions_service/credentials.rb | 49 - .../accounts/v1beta/regions_service/paths.rb | 66 - .../accounts/v1beta/regions_service/rest.rb | 58 - .../v1beta/regions_service/rest/client.rb | 810 ---- .../regions_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/regions_services_pb.rb | 62 - .../shopping/merchant/accounts/v1beta/rest.rb | 58 - .../v1beta/shipping_settings_service.rb | 58 - .../shipping_settings_service/client.rb | 576 --- .../shipping_settings_service/credentials.rb | 49 - .../v1beta/shipping_settings_service/paths.rb | 49 - .../v1beta/shipping_settings_service/rest.rb | 55 - .../shipping_settings_service/rest/client.rb | 519 --- .../rest/service_stub.rb | 206 - .../accounts/v1beta/shippingsettings_pb.rb | 61 - .../v1beta/shippingsettings_services_pb.rb | 51 - .../merchant/accounts/v1beta/tax_rule_pb.rb | 27 - ...erms_of_service_agreement_state_service.rb | 57 - .../client.rb | 578 --- .../credentials.rb | 49 - .../paths.rb | 66 - .../rest.rb | 54 - .../rest/client.rb | 521 --- .../rest/service_stub.rb | 205 - .../v1beta/terms_of_service_service.rb | 57 - .../v1beta/terms_of_service_service/client.rb | 672 ---- .../terms_of_service_service/credentials.rb | 49 - .../v1beta/terms_of_service_service/paths.rb | 63 - .../v1beta/terms_of_service_service/rest.rb | 54 - .../terms_of_service_service/rest/client.rb | 616 --- .../rest/service_stub.rb | 264 -- .../accounts/v1beta/termsofservice_pb.rb | 33 - .../v1beta/termsofservice_services_pb.rb | 52 - .../v1beta/termsofserviceagreementstate_pb.rb | 34 - ...ermsofserviceagreementstate_services_pb.rb | 49 - .../accounts/v1beta/termsofservicekind_pb.rb | 23 - .../merchant/accounts/v1beta/user_pb.rb | 38 - .../merchant/accounts/v1beta/user_service.rb | 57 - .../accounts/v1beta/user_service/client.rb | 891 ----- .../v1beta/user_service/credentials.rb | 49 - .../accounts/v1beta/user_service/paths.rb | 66 - .../accounts/v1beta/user_service/rest.rb | 54 - .../v1beta/user_service/rest/client.rb | 813 ---- .../v1beta/user_service/rest/service_stub.rb | 390 -- .../accounts/v1beta/user_services_pb.rb | 58 - .../v1beta/verificationmailsettings_pb.rb | 26 - .../merchant/accounts/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../merchant/accounts/v1beta/accessright.rb | 43 - .../merchant/accounts/v1beta/account_tax.rb | 101 - .../merchant/accounts/v1beta/accountissue.rb | 142 - .../merchant/accounts/v1beta/accounts.rb | 231 -- .../accounts/v1beta/accountservices.rb | 34 - .../accounts/v1beta/autofeedsettings.rb | 75 - .../accounts/v1beta/automaticimprovements.rb | 235 -- .../accounts/v1beta/businessidentity.rb | 129 - .../merchant/accounts/v1beta/businessinfo.rb | 77 - .../accounts/v1beta/checkoutsettings.rb | 185 - .../accounts/v1beta/customerservice.rb | 43 - .../accounts/v1beta/emailpreferences.rb | 82 - .../merchant/accounts/v1beta/gbpaccounts.rb | 123 - .../merchant/accounts/v1beta/homepage.rb | 87 - .../merchant/accounts/v1beta/lfpproviders.rb | 108 - .../accounts/v1beta/omnichannelsettings.rb | 336 -- .../accounts/v1beta/online_return_policy.rb | 345 -- .../accounts/v1beta/phoneverificationstate.rb | 40 - .../merchant/accounts/v1beta/programs.rb | 160 - .../merchant/accounts/v1beta/regions.rb | 195 - .../accounts/v1beta/shippingsettings.rb | 747 ---- .../merchant/accounts/v1beta/tax_rule.rb | 96 - .../accounts/v1beta/termsofservice.rb | 99 - .../v1beta/termsofserviceagreementstate.rb | 135 - .../accounts/v1beta/termsofservicekind.rb | 37 - .../shopping/merchant/accounts/v1beta/user.rb | 156 - .../v1beta/verificationmailsettings.rb | 53 - .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 56 - .../proto_docs/google/type/datetime.rb | 104 - .../proto_docs/google/type/interval.rb | 45 - .../proto_docs/google/type/phone_number.rb | 122 - .../proto_docs/google/type/postal_address.rb | 136 - .../snippets/Gemfile | 32 - .../list_account_issues.rb | 51 - .../account_tax_service/get_account_tax.rb | 47 - .../account_tax_service/list_account_tax.rb | 51 - .../account_tax_service/update_account_tax.rb | 47 - .../create_and_configure_account.rb | 47 - .../accounts_service/delete_account.rb | 47 - .../snippets/accounts_service/get_account.rb | 47 - .../accounts_service/list_accounts.rb | 51 - .../accounts_service/list_sub_accounts.rb | 51 - .../accounts_service/update_account.rb | 47 - .../get_autofeed_settings.rb | 47 - .../update_autofeed_settings.rb | 47 - .../get_automatic_improvements.rb | 47 - .../update_automatic_improvements.rb | 47 - .../get_business_identity.rb | 47 - .../update_business_identity.rb | 47 - .../get_business_info.rb | 47 - .../update_business_info.rb | 47 - .../create_checkout_settings.rb | 47 - .../delete_checkout_settings.rb | 47 - .../get_checkout_settings.rb | 47 - .../update_checkout_settings.rb | 47 - .../get_email_preferences.rb | 47 - .../update_email_preferences.rb | 47 - .../gbp_accounts_service/link_gbp_account.rb | 47 - .../gbp_accounts_service/list_gbp_accounts.rb | 51 - .../homepage_service/claim_homepage.rb | 47 - .../snippets/homepage_service/get_homepage.rb | 47 - .../homepage_service/unclaim_homepage.rb | 47 - .../homepage_service/update_homepage.rb | 47 - .../find_lfp_providers.rb | 51 - .../link_lfp_provider.rb | 47 - .../create_omnichannel_setting.rb | 47 - .../get_omnichannel_setting.rb | 47 - .../list_omnichannel_settings.rb | 51 - .../request_inventory_verification.rb | 47 - .../update_omnichannel_setting.rb | 47 - .../create_online_return_policy.rb | 47 - .../delete_online_return_policy.rb | 47 - .../get_online_return_policy.rb | 47 - .../list_online_return_policies.rb | 51 - .../update_online_return_policy.rb | 47 - .../programs_service/disable_program.rb | 47 - .../programs_service/enable_program.rb | 47 - .../snippets/programs_service/get_program.rb | 47 - .../programs_service/list_programs.rb | 51 - .../snippets/regions_service/create_region.rb | 47 - .../snippets/regions_service/delete_region.rb | 47 - .../snippets/regions_service/get_region.rb | 47 - .../snippets/regions_service/list_regions.rb | 51 - .../snippets/regions_service/update_region.rb | 47 - .../get_shipping_settings.rb | 47 - .../insert_shipping_settings.rb | 47 - ...gle.shopping.merchant.accounts.v1beta.json | 2535 ------------- .../get_terms_of_service_agreement_state.rb | 47 - ...cation_terms_of_service_agreement_state.rb | 47 - .../accept_terms_of_service.rb | 47 - .../get_terms_of_service.rb | 47 - .../retrieve_latest_terms_of_service.rb | 47 - .../snippets/user_service/create_user.rb | 47 - .../snippets/user_service/delete_user.rb | 47 - .../snippets/user_service/get_user.rb | 47 - .../snippets/user_service/list_users.rb | 51 - .../snippets/user_service/update_user.rb | 47 - .../account_issue_service_paths_test.rb | 55 - .../v1beta/account_issue_service_rest_test.rb | 157 - .../v1beta/account_issue_service_test.rb | 175 - .../v1beta/account_tax_service_paths_test.rb | 67 - .../v1beta/account_tax_service_rest_test.rb | 264 -- .../v1beta/account_tax_service_test.rb | 289 -- .../v1beta/accounts_service_paths_test.rb | 79 - .../v1beta/accounts_service_rest_test.rb | 432 --- .../accounts/v1beta/accounts_service_test.rb | 481 --- .../autofeed_settings_service_paths_test.rb | 55 - .../autofeed_settings_service_rest_test.rb | 208 -- .../v1beta/autofeed_settings_service_test.rb | 222 -- ...tomatic_improvements_service_paths_test.rb | 55 - ...utomatic_improvements_service_rest_test.rb | 208 -- .../automatic_improvements_service_test.rb | 222 -- .../business_identity_service_paths_test.rb | 55 - .../business_identity_service_rest_test.rb | 208 -- .../v1beta/business_identity_service_test.rb | 222 -- .../business_info_service_paths_test.rb | 55 - .../v1beta/business_info_service_rest_test.rb | 208 -- .../v1beta/business_info_service_test.rb | 222 -- .../checkout_settings_service_paths_test.rb | 67 - .../checkout_settings_service_rest_test.rb | 317 -- .../v1beta/checkout_settings_service_test.rb | 340 -- .../email_preferences_service_paths_test.rb | 55 - .../email_preferences_service_rest_test.rb | 208 -- .../v1beta/email_preferences_service_test.rb | 222 -- .../v1beta/gbp_accounts_service_paths_test.rb | 55 - .../v1beta/gbp_accounts_service_rest_test.rb | 210 -- .../v1beta/gbp_accounts_service_test.rb | 231 -- .../v1beta/homepage_service_paths_test.rb | 55 - .../v1beta/homepage_service_rest_test.rb | 316 -- .../accounts/v1beta/homepage_service_test.rb | 338 -- .../lfp_providers_service_paths_test.rb | 67 - .../v1beta/lfp_providers_service_rest_test.rb | 210 -- .../v1beta/lfp_providers_service_test.rb | 231 -- ...omnichannel_settings_service_paths_test.rb | 67 - .../omnichannel_settings_service_rest_test.rb | 373 -- .../omnichannel_settings_service_test.rb | 407 -- ...online_return_policy_service_paths_test.rb | 67 - .../online_return_policy_service_rest_test.rb | 373 -- .../online_return_policy_service_test.rb | 407 -- .../v1beta/programs_service_paths_test.rb | 67 - .../v1beta/programs_service_rest_test.rb | 317 -- .../accounts/v1beta/programs_service_test.rb | 345 -- .../v1beta/regions_service_paths_test.rb | 67 - .../v1beta/regions_service_rest_test.rb | 374 -- .../accounts/v1beta/regions_service_test.rb | 409 -- .../shipping_settings_service_paths_test.rb | 55 - .../shipping_settings_service_rest_test.rb | 208 -- .../v1beta/shipping_settings_service_test.rb | 222 -- ...vice_agreement_state_service_paths_test.rb | 67 - ...rvice_agreement_state_service_rest_test.rb | 207 -- ...of_service_agreement_state_service_test.rb | 220 -- .../terms_of_service_service_paths_test.rb | 67 - .../terms_of_service_service_rest_test.rb | 264 -- .../v1beta/terms_of_service_service_test.rb | 284 -- .../v1beta/user_service_paths_test.rb | 67 - .../accounts/v1beta/user_service_rest_test.rb | 374 -- .../accounts/v1beta/user_service_test.rb | 409 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...e-shopping-merchant-conversions-v1.gemspec | 28 - ...google-shopping-merchant-conversions-v1.rb | 21 - .../shopping/merchant/conversions/v1.rb | 47 - .../v1/conversion_sources_service.rb | 57 - .../v1/conversion_sources_service/client.rb | 975 ----- .../conversion_sources_service/credentials.rb | 49 - .../v1/conversion_sources_service/paths.rb | 66 - .../v1/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 890 ----- .../rest/service_stub.rb | 452 --- .../conversions/v1/conversionsources_pb.rb | 45 - .../v1/conversionsources_services_pb.rb | 62 - .../shopping/merchant/conversions/v1/rest.rb | 39 - .../merchant/conversions/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../conversions/v1/conversionsources.rb | 289 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ...ogle.shopping.merchant.conversions.v1.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...opping-merchant-conversions-v1beta.gemspec | 28 - ...le-shopping-merchant-conversions-v1beta.rb | 21 - .../shopping/merchant/conversions/v1beta.rb | 47 - .../v1beta/conversion_sources_service.rb | 57 - .../conversion_sources_service/client.rb | 975 ----- .../conversion_sources_service/credentials.rb | 49 - .../conversion_sources_service/paths.rb | 66 - .../v1beta/conversion_sources_service/rest.rb | 54 - .../conversion_sources_service/rest/client.rb | 890 ----- .../rest/service_stub.rb | 452 --- .../v1beta/conversionsources_pb.rb | 45 - .../v1beta/conversionsources_services_pb.rb | 62 - .../merchant/conversions/v1beta/rest.rb | 39 - .../merchant/conversions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 128 - .../conversions/v1beta/conversionsources.rb | 290 -- .../snippets/Gemfile | 32 - .../create_conversion_source.rb | 47 - .../delete_conversion_source.rb | 47 - .../get_conversion_source.rb | 47 - .../list_conversion_sources.rb | 51 - .../undelete_conversion_source.rb | 47 - .../update_conversion_source.rb | 47 - ....shopping.merchant.conversions.v1beta.json | 255 -- .../conversion_sources_service_paths_test.rb | 67 - .../conversion_sources_service_rest_test.rb | 428 --- .../v1beta/conversion_sources_service_test.rb | 467 --- .../test/helper.rb | 35 - 2812 files changed, 1326 insertions(+), 310374 deletions(-) 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-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-workload_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-workload_manager-v1/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/field_info.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/field_info.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/push_credentials.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-developers-developer_knowledge-v1/.gitignore delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/README.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb delete mode 100644 owl-bot-staging/google-developers-developer_knowledge-v1/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-v2/.gitignore delete mode 100644 owl-bot-staging/google-iam-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v2/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v2/.yardopts delete mode 100644 owl-bot-staging/google-iam-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v2/Gemfile delete mode 100644 owl-bot-staging/google-iam-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v2/README.md delete mode 100644 owl-bot-staging/google-iam-v2/Rakefile delete mode 100644 owl-bot-staging/google-iam-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v2/google-iam-v2.gemspec delete mode 100644 owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb delete mode 100644 owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb delete mode 100644 owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-v3/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3/README.md delete mode 100644 owl-bot-staging/google-iam-v3/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3/google-iam-v3.gemspec delete mode 100644 owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.gitignore delete mode 100644 owl-bot-staging/google-iam-v3beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-v3beta/.toys.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/.yardopts delete mode 100644 owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-v3beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-v3beta/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/Rakefile delete mode 100644 owl-bot-staging/google-iam-v3beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb delete mode 100644 owl-bot-staging/google-iam-v3beta/test/helper.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb delete mode 100644 owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/.yardopts delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/Rakefile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb delete mode 100644 owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-css-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-css-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-css-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-css-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb diff --git a/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json b/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json index 723b6d18419c..6b8b6584ba64 100644 --- a/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json +++ b/google-cloud-web_security_scanner-v1beta/.owlbot-manifest.json @@ -75,6 +75,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-web_security_scanner-v1beta/.toys.rb b/google-cloud-web_security_scanner-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-web_security_scanner-v1beta/.toys.rb +++ b/google-cloud-web_security_scanner-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/Rakefile b/google-cloud-web_security_scanner-v1beta/Rakefile index 307715c48e8f..32e97681638d 100644 --- a/google-cloud-web_security_scanner-v1beta/Rakefile +++ b/google-cloud-web_security_scanner-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb b/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb index 479f184b740e..aa99555f2dd3 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb index cc49d5253bf9..42ef3ae8aa7c 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb index 9fd194489416..3c7b745ca0ac 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb index bf48649a5e89..e4d014ad6c61 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb index 15dff214059c..29f093951a00 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb index 543a02336fb1..9237239dac26 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb index f5e93086df12..035cb9ea1502 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb index cdadad39d709..cc7e1c7d1fdd 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb index 84bec82f8dd3..59b89648ea0d 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb index d220d8e25a7c..bcd26bf90ea5 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb index 5743498e0bc2..d1cdbdcd623f 100644 --- a/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb +++ b/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb index ff11ed8dc2dd..16a4684b0a87 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb index 30b08a65a27d..b6d583c7a7df 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb index c2d60a503172..950dc9db788a 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb index ef6f60a583a7..a04437f47106 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb index 991f82c12b7d..b814049f15c4 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb index e270c88dc761..35cbd2e7b0f4 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb index fa52f0ed3e47..2ee0a0f3dc7b 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb index 5bf82be259d8..9a4290f473e2 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb index 21fd01e9579e..14ef8134f765 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb index e5b1793ff19a..5c0a8825ce30 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-web_security_scanner-v1beta/snippets/Gemfile b/google-cloud-web_security_scanner-v1beta/snippets/Gemfile index b18c6577579e..2cf622627fe6 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/Gemfile +++ b/google-cloud-web_security_scanner-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb index a179dd0f1ee1..72531ba34f7c 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb index de6648bda49e..4edf65f51798 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb index ce7dea9460cf..31b8a781be9a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb index fba93437c7dc..54d205419154 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb index fa9473697bb2..849242e39e6a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb index c069dea4d680..5909d290f3fe 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb index 7ec5d2616461..c3c3e83e332a 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb index cc2ac91f02da..942fcec7e55d 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb index cf0e6efca042..654d77988f2c 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb index d89ba68af91b..37835b22f132 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb index ce716f8096f9..645b424b6b29 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb index bd3e8da936e7..894d270fec3b 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb index 99c25a302aef..7803724b8906 100755 --- a/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb +++ b/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb index 0c534a923317..8b06894bb244 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb index e6db5f89648b..967f3a73832e 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb index 60805f77b09b..8d7b2344ec03 100644 --- a/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb +++ b/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-web_security_scanner-v1beta/test/helper.rb b/google-cloud-web_security_scanner-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-web_security_scanner-v1beta/test/helper.rb +++ b/google-cloud-web_security_scanner-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/.owlbot-manifest.json b/google-cloud-workflows-executions-v1/.owlbot-manifest.json index 768fb671eec5..1f5e7f19e97e 100644 --- a/google-cloud-workflows-executions-v1/.owlbot-manifest.json +++ b/google-cloud-workflows-executions-v1/.owlbot-manifest.json @@ -46,6 +46,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-executions-v1/.toys.rb b/google-cloud-workflows-executions-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-executions-v1/.toys.rb +++ b/google-cloud-workflows-executions-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/Rakefile b/google-cloud-workflows-executions-v1/Rakefile index df712a496255..44509fa79f79 100644 --- a/google-cloud-workflows-executions-v1/Rakefile +++ b/google-cloud-workflows-executions-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb b/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb index 4bf9e94d3eba..fc4b162a318b 100644 --- a/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb +++ b/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb index f3dfd21e3bdb..3c540505d083 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb index 1b0a1d6d62b2..b39a54aa895b 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb index 5bd27192dd64..ea2a952f4319 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb index bd13968d2d71..6a4511ebd935 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb index 7de4f6545bd7..4cbadc66f285 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb index a68aedffc9f1..46394ec79f74 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb index 558760515b65..c95d43b8e04d 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb index c030b6a27037..5c82daaa16de 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb index 9811e5b7f5c0..c6a331fde8df 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/workflows/executions/v1/executions.proto for package 'google.cloud.workflows.executions.v1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb index 161d12ebeaf1..a230b9e48d83 100644 --- a/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb +++ b/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb b/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb b/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb index 23315182cfb1..857f5d110040 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-executions-v1/snippets/Gemfile b/google-cloud-workflows-executions-v1/snippets/Gemfile index 2d8cda0be363..7daeaea34a37 100755 --- a/google-cloud-workflows-executions-v1/snippets/Gemfile +++ b/google-cloud-workflows-executions-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb index e8345731c623..62751576d96a 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb index 6d43196669c5..e18a26220cc7 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb b/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb index 8074bc61a03a..606f5d673467 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb b/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb index 0e6d9b46bc29..71b5474a1300 100755 --- a/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb +++ b/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb index c10f0660cd9b..72a7af7dcf6e 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb index 6bc924013bd0..0f90ae8cb19d 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb index aa2f6353c97d..d372ed41a44a 100644 --- a/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb +++ b/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1/test/helper.rb b/google-cloud-workflows-executions-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-workflows-executions-v1/test/helper.rb +++ b/google-cloud-workflows-executions-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json b/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json index 5e8aa6d5ef94..aa5ed9b3b558 100644 --- a/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json +++ b/google-cloud-workflows-executions-v1beta/.owlbot-manifest.json @@ -41,6 +41,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-executions-v1beta/.toys.rb b/google-cloud-workflows-executions-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-executions-v1beta/.toys.rb +++ b/google-cloud-workflows-executions-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/Rakefile b/google-cloud-workflows-executions-v1beta/Rakefile index 21e21b324a81..fa9f3f6dac59 100644 --- a/google-cloud-workflows-executions-v1beta/Rakefile +++ b/google-cloud-workflows-executions-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb b/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb index 25466b7d3851..2e0636bb1b59 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb index 3fed66d971d4..f86ef8bc398c 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb index d13eafd66360..10f6adbe5ec1 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb index 79c5f540f345..d4fb4d8aa377 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb index c71df9c5569c..82a81fac37cc 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb index a144c564bae6..91d5836ff754 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb index 535a59f954fd..fc57272d1ea2 100644 --- a/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb +++ b/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/workflows/executions/v1beta/executions.proto for package 'google.cloud.workflows.executions.v1beta' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb index 24768f0511be..155d545071b2 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-executions-v1beta/snippets/Gemfile b/google-cloud-workflows-executions-v1beta/snippets/Gemfile index 68e763424279..16f945ec033e 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/Gemfile +++ b/google-cloud-workflows-executions-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb index c50060f28ffd..8f7f3934284c 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb index 4fb77cd5ecee..926c4489f51d 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb index 7529e7ee8ec1..58e0a552a8ab 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb b/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb index b556a17f1357..a8f00e5f1390 100755 --- a/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb +++ b/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb index be34ed2dd584..d23ec98d8085 100644 --- a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb +++ b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb index 044009dbfe89..578052bdc7b5 100644 --- a/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb +++ b/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-executions-v1beta/test/helper.rb b/google-cloud-workflows-executions-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-workflows-executions-v1beta/test/helper.rb +++ b/google-cloud-workflows-executions-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/.owlbot-manifest.json b/google-cloud-workflows-v1/.owlbot-manifest.json index 907b68dea26e..388ef0466032 100644 --- a/google-cloud-workflows-v1/.owlbot-manifest.json +++ b/google-cloud-workflows-v1/.owlbot-manifest.json @@ -57,6 +57,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-v1/.toys.rb b/google-cloud-workflows-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-v1/.toys.rb +++ b/google-cloud-workflows-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/Rakefile b/google-cloud-workflows-v1/Rakefile index 36860b03f7ec..13816b0b43f6 100644 --- a/google-cloud-workflows-v1/Rakefile +++ b/google-cloud-workflows-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb b/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb index f1b4e4ac5d06..1b638a3e422e 100644 --- a/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb +++ b/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb index fa37e8eeae0b..bda78f5b4bc6 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb index 554edcc50928..793a02bd64cd 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb index 0712e5feb5bb..16f410759b32 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb index ed11a3f2ec19..f4818691ad45 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb index 0ed3956990d9..63a66d7d6400 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb index 024d93f36d25..2c4bc8c1e0e6 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb index ab6de9b2c767..f1ff4db6066f 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb index 5859ea794f80..7c5a1c321b45 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb index 7fb714a54d19..250354de6315 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb index 9ef9e4d71bab..766c6a240c0e 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb index 9eb251ec2291..d1fc051655e0 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb index 29a3b8d39c58..c36b18474d53 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb index b2dbf1aeacc6..d568aa342f04 100644 --- a/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb +++ b/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/client.rb b/google-cloud-workflows-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/api/resource.rb b/google-cloud-workflows-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-workflows-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb b/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb index 4a18a06bf8b9..78a09faef384 100644 --- a/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb +++ b/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb b/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/Gemfile b/google-cloud-workflows-v1/snippets/Gemfile index 0b27239ffd9b..3f40a63d2540 100755 --- a/google-cloud-workflows-v1/snippets/Gemfile +++ b/google-cloud-workflows-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb index 782cdb001304..57bb5d7052f6 100755 --- a/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb index 2095c67bc0c5..ee3a675341df 100755 --- a/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb index 1ba450b87282..8e945eb77b52 100755 --- a/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb b/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb index 333f807257d1..24fa4adf9ff9 100644 --- a/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb +++ b/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb b/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb index 8aa0409869b7..423d261480f1 100755 --- a/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb +++ b/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb b/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb index 0d49aa8eef16..20e240695166 100755 --- a/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb +++ b/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb index 29973edbe744..16718a9ef007 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb index 45c7d8db0c5d..940534eeb434 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb index 9cc32ec0729d..cf13cbce88dc 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb index 6b5028e8e6f6..c48d4214d226 100644 --- a/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb +++ b/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1/test/helper.rb b/google-cloud-workflows-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-workflows-v1/test/helper.rb +++ b/google-cloud-workflows-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/.owlbot-manifest.json b/google-cloud-workflows-v1beta/.owlbot-manifest.json index f5a2a2b2e961..c3b7e17dc032 100644 --- a/google-cloud-workflows-v1beta/.owlbot-manifest.json +++ b/google-cloud-workflows-v1beta/.owlbot-manifest.json @@ -56,6 +56,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workflows-v1beta/.toys.rb b/google-cloud-workflows-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workflows-v1beta/.toys.rb +++ b/google-cloud-workflows-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/Rakefile b/google-cloud-workflows-v1beta/Rakefile index 5cf726f1e42a..26a1b0335b69 100644 --- a/google-cloud-workflows-v1beta/Rakefile +++ b/google-cloud-workflows-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb b/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb index db1bd24abeb3..6570d59e4c97 100644 --- a/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb +++ b/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb index fd4d808e804b..8ffa325a3d21 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb index 7ccafb070123..89cc4db94d26 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb index f7e10c7c14f5..449f092f35af 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb index 649ca34f32c3..0fcbf048c458 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb index 732b2749f2b8..5a3b0e5fa1ca 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb index 34a002312e22..550b00fccd1b 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb index 68a7dd1c80f6..293530077430 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb index d2f08b755ab1..8e6d9fdd43a9 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb index 60b576b136d9..c806faf98cba 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb index d16c8f774af4..ccbb62fed292 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb index 929c9a8580a8..7269c2d1da8f 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb index a3b5ce112d0c..2b77bde101f9 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb index 216e248fe933..c6606ec7ea91 100644 --- a/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb +++ b/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb b/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb index 84ab70d2092e..51dd7e8cb940 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb b/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb b/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb +++ b/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/Gemfile b/google-cloud-workflows-v1beta/snippets/Gemfile index 7536575cc565..6d0b5707d9d1 100755 --- a/google-cloud-workflows-v1beta/snippets/Gemfile +++ b/google-cloud-workflows-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb index b62a96faddf6..8b8c1e929159 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb index 00d843d4f308..95eaf09e0e6f 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb index fc4789f8cf7a..8d629d661011 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb b/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb index cefd417ede31..0ed09a7616d6 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb b/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb index 1b4735fed7d8..bab5a8ac4c65 100755 --- a/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb +++ b/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb index 046c922e2c66..0f0081e8d9d0 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb index 639a5fd9ad01..79297ed7cc4c 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb index c933d33bbaff..fc962295d47a 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb index e135c1181dbf..0c4369c49b95 100644 --- a/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb +++ b/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workflows-v1beta/test/helper.rb b/google-cloud-workflows-v1beta/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-workflows-v1beta/test/helper.rb +++ b/google-cloud-workflows-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workload_manager-v1/.owlbot-manifest.json b/google-cloud-workload_manager-v1/.owlbot-manifest.json index 765c7d856587..241fe085026b 100644 --- a/google-cloud-workload_manager-v1/.owlbot-manifest.json +++ b/google-cloud-workload_manager-v1/.owlbot-manifest.json @@ -63,6 +63,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1/.owlbot-manifest.json b/google-cloud-workstations-v1/.owlbot-manifest.json index 9263eb7eb843..b67e0e6cd759 100644 --- a/google-cloud-workstations-v1/.owlbot-manifest.json +++ b/google-cloud-workstations-v1/.owlbot-manifest.json @@ -73,6 +73,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workstations-v1/.toys.rb b/google-cloud-workstations-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workstations-v1/.toys.rb +++ b/google-cloud-workstations-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/Rakefile b/google-cloud-workstations-v1/Rakefile index a3daa2708ba6..2d6588091b1a 100644 --- a/google-cloud-workstations-v1/Rakefile +++ b/google-cloud-workstations-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb b/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb index 6986bc30296c..5432da78d5cb 100644 --- a/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb +++ b/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb index 7f8f7ee71e74..33d0c263a9f4 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb index 5b3255fcc9e7..4e045e2c88f2 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb index e42d70ceff75..4a1cec95dcc9 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb index 11e6b311c5fc..08a4bda4af66 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb index bbfb0bd934a4..85f95a678c11 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb index 19f5e73cfa27..dfd9bd39ea0a 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb index c36728d56b53..2087f38ccf61 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb index 5a7432d6864a..464e72c7f12e 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb index 3d6ca96e10dd..ba4f83cc6e0c 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb index 7c09881ab915..aa208259fcfa 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb index b54699ee5139..c6115b5ff1ff 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb index 7e8fb8258e17..420e199f7069 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb index d9fa046b1e4a..792cd03236da 100644 --- a/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb +++ b/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/client.rb b/google-cloud-workstations-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/client.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/api/resource.rb b/google-cloud-workstations-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-workstations-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-workstations-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb b/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb index b6b4ce299966..6047b249e889 100644 --- a/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb +++ b/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb b/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/proto_docs/google/type/expr.rb b/google-cloud-workstations-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-workstations-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-workstations-v1/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/Gemfile b/google-cloud-workstations-v1/snippets/Gemfile index 17b11efc1fa8..a1469457e584 100644 --- a/google-cloud-workstations-v1/snippets/Gemfile +++ b/google-cloud-workstations-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb index 74256cdd065d..4031f08e9005 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb index f8f82884aa7f..6920a957ca47 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb index 21ecfa5c4e1d..a4ee1a5ba3bd 100644 --- a/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb index f6c4daf37ad0..81660ff7e383 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb index 22b5e48ee221..979c4987b36e 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb index 65b6cd870ba0..282347e33b9b 100644 --- a/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb b/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb index 7a70181cf4aa..5ee1e774fee1 100644 --- a/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb +++ b/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb index f394e329147d..3f39180ba50d 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb index b8e5f9e8a7b5..439839d2c17f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb index de0812f3121d..03403b54417f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb index a8f5c1a81500..b829c05c865c 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb index c313de0cfaa4..d7266f51ca88 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb index 23ff612d5e8f..4234e04c9aee 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb index 93094da530bb..8810eb261cd2 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb b/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb index 1b2ee48e0dea..f667c3ea7346 100644 --- a/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb +++ b/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb index bb90c9cf2507..8e9f7ff1738c 100644 --- a/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb index 93fb925811a6..938fb5a5843f 100644 --- a/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb index fa4cc37931b3..7b34ea13f4bb 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb index 0476c8fe9d27..b2c9b129aa80 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb b/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb index 04226a80364a..f2129ee535ec 100644 --- a/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb +++ b/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb index cbc365ee4174..52bdf0f508ad 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb index 8f0102ab4e34..2411b91ff053 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb index 1001a4c2192f..cc8f0344b566 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb index e7056a61e738..545fb10d714e 100644 --- a/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb +++ b/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1/test/helper.rb b/google-cloud-workstations-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-workstations-v1/test/helper.rb +++ b/google-cloud-workstations-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/.owlbot-manifest.json b/google-cloud-workstations-v1beta/.owlbot-manifest.json index 62cf12abb1a4..5456a36c82c2 100644 --- a/google-cloud-workstations-v1beta/.owlbot-manifest.json +++ b/google-cloud-workstations-v1beta/.owlbot-manifest.json @@ -74,6 +74,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-workstations-v1beta/.toys.rb b/google-cloud-workstations-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-workstations-v1beta/.toys.rb +++ b/google-cloud-workstations-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/Rakefile b/google-cloud-workstations-v1beta/Rakefile index 1af042a6bad9..19a6e40ad1cb 100644 --- a/google-cloud-workstations-v1beta/Rakefile +++ b/google-cloud-workstations-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb b/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb index 7dc6eac3698e..a0188c280162 100644 --- a/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb +++ b/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb index f3b04c48bc54..c7ef63fc2912 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb index b3e0fa9120bc..2b52965b4f26 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb index 263a8d624c37..80bc9428e548 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb index 54d640c117f8..b0c7dfb12bbf 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb index f82ab3773db8..7aa5892babd9 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb index fa639bfe9775..cd1d778b15ef 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb index 2eab2a170919..620b2be83356 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb index 0f5becf33f55..651fbc0e8140 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb index 1ca8808205f4..203469f53bee 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb index cbeab4491f7c..c39d1909ad91 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb index 9e1b322ddef5..a100147caf77 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb index 9ac13ef13d13..1af97769fe62 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb index dee7faa9aa39..bddade12446d 100644 --- a/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +++ b/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb b/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb b/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb index e00977475b79..b9791493eed8 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb b/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb b/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb b/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb +++ b/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/Gemfile b/google-cloud-workstations-v1beta/snippets/Gemfile index 19ef17d61deb..7a19ba50a0c6 100644 --- a/google-cloud-workstations-v1beta/snippets/Gemfile +++ b/google-cloud-workstations-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb index 05bbedd0593d..d693d2b46ae5 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb index 19a0d668883b..87128b5c9ea7 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb index 1621fde4cfb4..f2b1d8cd72ce 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb index 4eac7c0b7fec..5077d7921393 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb index cd15e102ae95..102ab70aae42 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb index ff23ae8546b2..9ad29224664b 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb b/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb index 496ded0ea83e..c810256cd2e2 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb index c26cdb5df5b3..ed645c9c161d 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb index 04bf1634fa50..665a6a0fe884 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb index aff926a56d20..df2764fba5d2 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb index b2adf37f85a1..04c759f7d070 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb index c8e1399a6ec6..ac98db348987 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb index b031794b90cd..339e219b560c 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb index 2ade2b14afdc..e048457320f7 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb b/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb index edcd44468ac0..cdea490fd7b3 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb index 2f348c3fbddf..4d0f92d6a22b 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb index 93b9624a8321..81426cbc8008 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb index 4f5c4e8e5805..5f5722b2f007 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb index 5758ace9cb56..9890ea125115 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb index 187ce313cd01..659a518628ac 100644 --- a/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb +++ b/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb index dd36b0c018ad..af5378e9c6a7 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb index 2347a11293d6..b909911491fb 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb index 10bd354469d0..2484c4f4930c 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb index 79e766d2cbb9..b76165c92c75 100644 --- a/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb +++ b/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-workstations-v1beta/test/helper.rb b/google-cloud-workstations-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-workstations-v1beta/test/helper.rb +++ b/google-cloud-workstations-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-developers-developer_knowledge-v1/.owlbot-manifest.json b/google-developers-developer_knowledge-v1/.owlbot-manifest.json index 3b4f0cdf2b82..7766587dd35b 100644 --- a/google-developers-developer_knowledge-v1/.owlbot-manifest.json +++ b/google-developers-developer_knowledge-v1/.owlbot-manifest.json @@ -46,6 +46,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb b/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb index 74352be9c58c..e58202461f88 100644 --- a/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-credentials-v1/.owlbot-manifest.json b/google-iam-credentials-v1/.owlbot-manifest.json index 8aa3900cfe1e..3b6c91cf470c 100644 --- a/google-iam-credentials-v1/.owlbot-manifest.json +++ b/google-iam-credentials-v1/.owlbot-manifest.json @@ -47,6 +47,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-credentials-v1/.toys.rb b/google-iam-credentials-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-iam-credentials-v1/.toys.rb +++ b/google-iam-credentials-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/Rakefile b/google-iam-credentials-v1/Rakefile index 9b98114ed1a0..d9311daefed7 100644 --- a/google-iam-credentials-v1/Rakefile +++ b/google-iam-credentials-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb b/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb index a9fe3ff73b6c..ed2f7cb1dc33 100644 --- a/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb +++ b/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb index 2a240776e062..a614ad91054b 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb index 297c73ac3161..f97cbb3723e3 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb index 2d635175329b..e7e7c3b84421 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb index d8c2c7067e66..7cb79642525d 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb index 9db2bb35f985..a57ff6ec11e5 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb index f2f175cf93d1..80ffb5c62a94 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb index 5f6203db5276..00f36f66f3e4 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb index 91beadcbd30e..c6cfe4454df2 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb index fe53d671f085..a550a8f0fcfe 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb @@ -1,7 +1,7 @@ # 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 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb b/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb index b3d8e1af0898..68ade197545e 100644 --- a/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb +++ b/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/client.rb b/google-iam-credentials-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/client.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb b/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb b/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/api/resource.rb b/google-iam-credentials-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-iam-credentials-v1/proto_docs/google/api/resource.rb +++ b/google-iam-credentials-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb b/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb index 2badba1833fc..87dc4a4ab1ff 100644 --- a/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb +++ b/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb b/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb +++ b/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb b/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-credentials-v1/snippets/Gemfile b/google-iam-credentials-v1/snippets/Gemfile index 4193d6959cae..68414f33ff49 100755 --- a/google-iam-credentials-v1/snippets/Gemfile +++ b/google-iam-credentials-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb b/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb index 7e56d84947ca..9ba589bd6910 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb b/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb index f78c29052dd9..4a1c3491483f 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb b/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb index 21597b71d986..27272c74919b 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb b/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb index b14eb36f15e0..806a57c1515f 100755 --- a/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb +++ b/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb index 22958423294e..3a872d20e5a0 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb index ed2a4ef6102d..3b870f137cb7 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb index be554322222a..6fc2459f3e5f 100644 --- a/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb +++ b/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-credentials-v1/test/helper.rb b/google-iam-credentials-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-iam-credentials-v1/test/helper.rb +++ b/google-iam-credentials-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/.owlbot-manifest.json b/google-iam-v2/.owlbot-manifest.json index e2ca0d13bb0a..85e87ce2e4af 100644 --- a/google-iam-v2/.owlbot-manifest.json +++ b/google-iam-v2/.owlbot-manifest.json @@ -55,6 +55,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v2/.toys.rb b/google-iam-v2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-iam-v2/.toys.rb +++ b/google-iam-v2/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/Rakefile b/google-iam-v2/Rakefile index 5d810da58283..17091d3aff5d 100644 --- a/google-iam-v2/Rakefile +++ b/google-iam-v2/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google-iam-v2.rb b/google-iam-v2/lib/google-iam-v2.rb index 71422612858f..976c5cee3515 100644 --- a/google-iam-v2/lib/google-iam-v2.rb +++ b/google-iam-v2/lib/google-iam-v2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2.rb b/google-iam-v2/lib/google/iam/v2.rb index fd1d09852f21..fc5ba38b2a63 100644 --- a/google-iam-v2/lib/google/iam/v2.rb +++ b/google-iam-v2/lib/google/iam/v2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies.rb b/google-iam-v2/lib/google/iam/v2/policies.rb index 1728e628d52a..7c30e2a1e284 100644 --- a/google-iam-v2/lib/google/iam/v2/policies.rb +++ b/google-iam-v2/lib/google/iam/v2/policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/client.rb b/google-iam-v2/lib/google/iam/v2/policies/client.rb index 6d4992d9c48e..9484b167af02 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/client.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/credentials.rb b/google-iam-v2/lib/google/iam/v2/policies/credentials.rb index 8ff86c2c03fa..99a803e1b8c6 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/credentials.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/operations.rb b/google-iam-v2/lib/google/iam/v2/policies/operations.rb index dc6511b82102..1f11efd8851b 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/operations.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest.rb b/google-iam-v2/lib/google/iam/v2/policies/rest.rb index eb50825e46b8..c1f6d1def0ec 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb index df3e617e2894..c440f4d15471 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb index 41b62d472c34..389d302a8513 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb b/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb index 318be1570c55..cfcc7003472b 100644 --- a/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb +++ b/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb b/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb index 73b0ffd93802..bd26fe57cd18 100644 --- a/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb +++ b/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v2/policy.proto for package 'google.iam.v2' # Original file comments: -# Copyright 2022 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/lib/google/iam/v2/rest.rb b/google-iam-v2/lib/google/iam/v2/rest.rb index b5b30961f6ac..d430e48053e6 100644 --- a/google-iam-v2/lib/google/iam/v2/rest.rb +++ b/google-iam-v2/lib/google/iam/v2/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/client.rb b/google-iam-v2/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-iam-v2/proto_docs/google/api/client.rb +++ b/google-iam-v2/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/field_behavior.rb b/google-iam-v2/proto_docs/google/api/field_behavior.rb index e4dd25d9abf0..582be187d115 100644 --- a/google-iam-v2/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v2/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/launch_stage.rb b/google-iam-v2/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-iam-v2/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v2/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/api/resource.rb b/google-iam-v2/proto_docs/google/api/resource.rb index 4c81798041c0..25dec4847ac1 100644 --- a/google-iam-v2/proto_docs/google/api/resource.rb +++ b/google-iam-v2/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/iam/v2/deny.rb b/google-iam-v2/proto_docs/google/iam/v2/deny.rb index 0c2ce0ba30c8..85ac06367665 100644 --- a/google-iam-v2/proto_docs/google/iam/v2/deny.rb +++ b/google-iam-v2/proto_docs/google/iam/v2/deny.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/iam/v2/policy.rb b/google-iam-v2/proto_docs/google/iam/v2/policy.rb index 8321f68954dc..917b870c27c0 100644 --- a/google-iam-v2/proto_docs/google/iam/v2/policy.rb +++ b/google-iam-v2/proto_docs/google/iam/v2/policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/longrunning/operations.rb b/google-iam-v2/proto_docs/google/longrunning/operations.rb index 1a586e810a23..7a757f512165 100644 --- a/google-iam-v2/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v2/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/any.rb b/google-iam-v2/proto_docs/google/protobuf/any.rb index 2c946be5a11d..58691995f02e 100644 --- a/google-iam-v2/proto_docs/google/protobuf/any.rb +++ b/google-iam-v2/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/duration.rb b/google-iam-v2/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-iam-v2/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v2/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/empty.rb b/google-iam-v2/proto_docs/google/protobuf/empty.rb index 1cfb8de8987e..83e4481834a6 100644 --- a/google-iam-v2/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v2/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/protobuf/timestamp.rb b/google-iam-v2/proto_docs/google/protobuf/timestamp.rb index dc016e2c9eca..e58202461f88 100644 --- a/google-iam-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v2/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v2/proto_docs/google/rpc/status.rb b/google-iam-v2/proto_docs/google/rpc/status.rb index f976dec8daa9..c1a1c07eb2db 100644 --- a/google-iam-v2/proto_docs/google/rpc/status.rb +++ b/google-iam-v2/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/proto_docs/google/type/expr.rb b/google-iam-v2/proto_docs/google/type/expr.rb index 0602180c6ada..53e7733b6592 100644 --- a/google-iam-v2/proto_docs/google/type/expr.rb +++ b/google-iam-v2/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/Gemfile b/google-iam-v2/snippets/Gemfile index 1d6df5db4ae8..0b586e897f32 100644 --- a/google-iam-v2/snippets/Gemfile +++ b/google-iam-v2/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/create_policy.rb b/google-iam-v2/snippets/policies/create_policy.rb index b02534bfcc54..992efa4ac456 100644 --- a/google-iam-v2/snippets/policies/create_policy.rb +++ b/google-iam-v2/snippets/policies/create_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/delete_policy.rb b/google-iam-v2/snippets/policies/delete_policy.rb index 5a43cee41e38..97dbcb650132 100644 --- a/google-iam-v2/snippets/policies/delete_policy.rb +++ b/google-iam-v2/snippets/policies/delete_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/get_policy.rb b/google-iam-v2/snippets/policies/get_policy.rb index 23f23517a196..6820282d9a3b 100644 --- a/google-iam-v2/snippets/policies/get_policy.rb +++ b/google-iam-v2/snippets/policies/get_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/list_policies.rb b/google-iam-v2/snippets/policies/list_policies.rb index d60e0fd73e6a..d7d580e8441f 100644 --- a/google-iam-v2/snippets/policies/list_policies.rb +++ b/google-iam-v2/snippets/policies/list_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/snippets/policies/update_policy.rb b/google-iam-v2/snippets/policies/update_policy.rb index 8b35eb2879c9..417fd211883b 100644 --- a/google-iam-v2/snippets/policies/update_policy.rb +++ b/google-iam-v2/snippets/policies/update_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_operations_test.rb b/google-iam-v2/test/google/iam/v2/policies_operations_test.rb index 95364be51e23..7dcd32b68c5f 100644 --- a/google-iam-v2/test/google/iam/v2/policies_operations_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_rest_test.rb b/google-iam-v2/test/google/iam/v2/policies_rest_test.rb index 9183773f09c7..fbecbeaf511a 100644 --- a/google-iam-v2/test/google/iam/v2/policies_rest_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/google/iam/v2/policies_test.rb b/google-iam-v2/test/google/iam/v2/policies_test.rb index 0ef27f69d7a0..8a3804aaab70 100644 --- a/google-iam-v2/test/google/iam/v2/policies_test.rb +++ b/google-iam-v2/test/google/iam/v2/policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v2/test/helper.rb b/google-iam-v2/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-iam-v2/test/helper.rb +++ b/google-iam-v2/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/.owlbot-manifest.json b/google-iam-v3/.owlbot-manifest.json index 83b1d53aa87e..b0428ea66cb1 100644 --- a/google-iam-v3/.owlbot-manifest.json +++ b/google-iam-v3/.owlbot-manifest.json @@ -110,6 +110,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v3/.toys.rb b/google-iam-v3/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-iam-v3/.toys.rb +++ b/google-iam-v3/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/Rakefile b/google-iam-v3/Rakefile index da3c53e686f3..0b6c7b75d2e4 100644 --- a/google-iam-v3/Rakefile +++ b/google-iam-v3/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google-iam-v3.rb b/google-iam-v3/lib/google-iam-v3.rb index 6c1a58df0c66..567b503c671b 100644 --- a/google-iam-v3/lib/google-iam-v3.rb +++ b/google-iam-v3/lib/google-iam-v3.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3.rb b/google-iam-v3/lib/google/iam/v3.rb index fa8b613fd431..b4c095ee8854 100644 --- a/google-iam-v3/lib/google/iam/v3.rb +++ b/google-iam-v3/lib/google/iam/v3.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings.rb index d8346e8142e0..89b89d81de14 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb index 24cb49570866..cafa48df11dd 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb index 0095b12dd99c..a3f91a0fb8fe 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb index cd8184edc0f5..c0c1fbc2d13c 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb index 85471d25b127..cc9e0c46ea72 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb index b643f3248156..102093998bd5 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb index 5849f9314060..5b8aac9f4ccf 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb index 3f61fd8709e3..0856b3e5604d 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb index 60c639a138f3..ba0446cdb560 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb index 602063be1d12..dc8f9d8742f2 100644 --- a/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb +++ b/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.v3' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb index ff3c0bc1e3f0..74a5371b0372 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb index 420d48194940..48eb0922884c 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb index b5c3477aa5aa..84103a366146 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb index 4d9ad99df0b0..9d3205859719 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb index 34d254dc4005..d7fbd72948b5 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb index e5047274b26d..8e3308deab2f 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb index 79d07360c19b..0ee7f3632d2b 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb index be1112a0b445..7063c8a578e1 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb index e9e025a6d796..f1c525adbc3a 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb index afa8d5bef116..4b3c7a40557b 100644 --- a/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb +++ b/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.v3' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/lib/google/iam/v3/rest.rb b/google-iam-v3/lib/google/iam/v3/rest.rb index 4ad39170e62c..05510520f427 100644 --- a/google-iam-v3/lib/google/iam/v3/rest.rb +++ b/google-iam-v3/lib/google/iam/v3/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/client.rb b/google-iam-v3/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-iam-v3/proto_docs/google/api/client.rb +++ b/google-iam-v3/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/field_behavior.rb b/google-iam-v3/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-iam-v3/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v3/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/field_info.rb b/google-iam-v3/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-iam-v3/proto_docs/google/api/field_info.rb +++ b/google-iam-v3/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/launch_stage.rb b/google-iam-v3/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-iam-v3/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v3/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/api/resource.rb b/google-iam-v3/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-iam-v3/proto_docs/google/api/resource.rb +++ b/google-iam-v3/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb index 75a8c26f41e3..42ec222a1f98 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb index a996d679fe81..129656c0a2bd 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb index 1411139f24e7..57bd8a00aca7 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb index 584d72346274..bd02495524b4 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb index 4eb29953f90b..40b6170b1a17 100644 --- a/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb +++ b/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/longrunning/operations.rb b/google-iam-v3/proto_docs/google/longrunning/operations.rb index f2d9d79d9da4..7a757f512165 100644 --- a/google-iam-v3/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v3/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/any.rb b/google-iam-v3/proto_docs/google/protobuf/any.rb index 9e9bdbb09ea4..58691995f02e 100644 --- a/google-iam-v3/proto_docs/google/protobuf/any.rb +++ b/google-iam-v3/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/duration.rb b/google-iam-v3/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-iam-v3/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v3/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/empty.rb b/google-iam-v3/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-iam-v3/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v3/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/field_mask.rb b/google-iam-v3/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-iam-v3/proto_docs/google/protobuf/field_mask.rb +++ b/google-iam-v3/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/protobuf/timestamp.rb b/google-iam-v3/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-iam-v3/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v3/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v3/proto_docs/google/rpc/status.rb b/google-iam-v3/proto_docs/google/rpc/status.rb index 3f61f95b2587..c1a1c07eb2db 100644 --- a/google-iam-v3/proto_docs/google/rpc/status.rb +++ b/google-iam-v3/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/proto_docs/google/type/expr.rb b/google-iam-v3/proto_docs/google/type/expr.rb index 9505eeb8657e..53e7733b6592 100644 --- a/google-iam-v3/proto_docs/google/type/expr.rb +++ b/google-iam-v3/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/Gemfile b/google-iam-v3/snippets/Gemfile index 214ba6d19151..1ae54b711716 100644 --- a/google-iam-v3/snippets/Gemfile +++ b/google-iam-v3/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb index b558468ae2b1..df4ee7219d1d 100644 --- a/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb index 27101528820d..55f3efffd3e3 100644 --- a/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb index 259a4a87b3d6..94c0c21f6316 100644 --- a/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb index 45bd65891b69..2dbb442b3771 100644 --- a/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb +++ b/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb index 72a081083f04..46f121f588f0 100644 --- a/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb +++ b/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb index 614ab928ce51..10cbd400a9ef 100644 --- a/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb +++ b/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb index 60ed48b3d5c5..b4700ad72f99 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb index 22d06bd2d9b0..85f48ef8c04a 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb index 9e4a6c491536..ac50d60e307f 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb index e80417eb866d..b3c624c9b24f 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb index e95e7ad59221..7a39b0874454 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb index 73a318b9bcdc..0b6bc521c7f0 100644 --- a/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ b/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json index b5392ce930ef..4de150daa1d4 100644 --- a/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json +++ b/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json @@ -1,7 +1,7 @@ { "client_library": { "name": "google-iam-v3", - "version": "0.5.0", + "version": "0.6.0", "language": "RUBY", "apis": [ { diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb index a9edf4797ca5..e943464fa885 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb index a7593af69182..e21017f180db 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb index 6a1c92bd95e2..b5dc95e769d7 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb index 1dc88fa68fd2..4b213c2a9bdc 100644 --- a/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb +++ b/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb index 293f38b2e097..0a55e6e6e754 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb index 71260a293a4f..28fb979db795 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb index 3f035adb61f5..49521b2824c3 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb index 83f0c2566bf4..414ee9e0e6e3 100644 --- a/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb +++ b/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3/test/helper.rb b/google-iam-v3/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-iam-v3/test/helper.rb +++ b/google-iam-v3/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/.owlbot-manifest.json b/google-iam-v3beta/.owlbot-manifest.json index 4f1d9c226c81..2991878e35ff 100644 --- a/google-iam-v3beta/.owlbot-manifest.json +++ b/google-iam-v3beta/.owlbot-manifest.json @@ -110,6 +110,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-iam-v3beta/.toys.rb b/google-iam-v3beta/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-iam-v3beta/.toys.rb +++ b/google-iam-v3beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/Rakefile b/google-iam-v3beta/Rakefile index 4a9e37b0746d..14994400cce6 100644 --- a/google-iam-v3beta/Rakefile +++ b/google-iam-v3beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta.rb b/google-iam-v3beta/lib/google/iam/v3beta.rb index c316f69bc6d0..890afcf2e734 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb index 14760bb14ac2..8c10eab801a6 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb index 0dea55bf9069..efd04847fb73 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb index 455f2ca87209..8544d9e0da3c 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb index 69f25c462396..197b5f7d66e3 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb index decc3855603a..b4c61be97d31 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb index a419663fb807..8d9da90d458b 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb index aa89472f6a2f..a05a7bfd27eb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb index 81437a9a553a..256b9190eee3 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb index 3ac79d45f367..ce126e354617 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb index 6756bfa36dc0..3261714f198e 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb index abbc7442e148..131df2f35581 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb index 5a04264de9a2..5097171067eb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb index f83aa0ec5154..faa2a134d021 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb index 107dc42f68ea..b253552560cb 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb index 75075477f428..5c221ecd1178 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb index bc4a47b973f1..a46c2f64c9d5 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb index 9e62a3820415..8e08e9ccc17f 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb index f915c921b5f1..22c3e05a5278 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb index b747742b615a..e36e1d4e8f56 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb index 0ee7d8797ccf..3789b868b8e2 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/google-iam-v3beta/lib/google/iam/v3beta/rest.rb index 3a7e0a2564b3..99f3c20b6549 100644 --- a/google-iam-v3beta/lib/google/iam/v3beta/rest.rb +++ b/google-iam-v3beta/lib/google/iam/v3beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/client.rb b/google-iam-v3beta/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-iam-v3beta/proto_docs/google/api/client.rb +++ b/google-iam-v3beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/field_behavior.rb b/google-iam-v3beta/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-iam-v3beta/proto_docs/google/api/field_behavior.rb +++ b/google-iam-v3beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/field_info.rb b/google-iam-v3beta/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-iam-v3beta/proto_docs/google/api/field_info.rb +++ b/google-iam-v3beta/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/launch_stage.rb b/google-iam-v3beta/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-iam-v3beta/proto_docs/google/api/launch_stage.rb +++ b/google-iam-v3beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/api/resource.rb b/google-iam-v3beta/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-iam-v3beta/proto_docs/google/api/resource.rb +++ b/google-iam-v3beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb index 3311cad89c6b..4e4463d9171f 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb index 2d9c21ec07d3..c46446dc0080 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb index 6032552361e9..4ff232b4471d 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb index 31e5c37c7dd9..565de307d98b 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb index 61631482354f..a01db22285ba 100644 --- a/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb +++ b/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/google-iam-v3beta/proto_docs/google/longrunning/operations.rb index f2d9d79d9da4..7a757f512165 100644 --- a/google-iam-v3beta/proto_docs/google/longrunning/operations.rb +++ b/google-iam-v3beta/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/any.rb b/google-iam-v3beta/proto_docs/google/protobuf/any.rb index 9e9bdbb09ea4..58691995f02e 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/any.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/duration.rb b/google-iam-v3beta/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/duration.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/empty.rb b/google-iam-v3beta/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/empty.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-iam-v3beta/proto_docs/google/rpc/status.rb b/google-iam-v3beta/proto_docs/google/rpc/status.rb index 3f61f95b2587..c1a1c07eb2db 100644 --- a/google-iam-v3beta/proto_docs/google/rpc/status.rb +++ b/google-iam-v3beta/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/proto_docs/google/type/expr.rb b/google-iam-v3beta/proto_docs/google/type/expr.rb index 9505eeb8657e..53e7733b6592 100644 --- a/google-iam-v3beta/proto_docs/google/type/expr.rb +++ b/google-iam-v3beta/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/Gemfile b/google-iam-v3beta/snippets/Gemfile index 5202fc1b4ae1..c2385cbb7f70 100644 --- a/google-iam-v3beta/snippets/Gemfile +++ b/google-iam-v3beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb index e3fab0eea56e..71d915589110 100644 --- a/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb index ab62ed68bf29..71f4b669183c 100644 --- a/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb index 7800b2ae8319..95a37b3bd52d 100644 --- a/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb index cecd9a027d16..0f7e29a87412 100644 --- a/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb +++ b/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb index 218a20c61c97..f27b0677d25b 100644 --- a/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb +++ b/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb index fe565e46b786..135862214560 100644 --- a/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb +++ b/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb index b105e95426b6..5adbcf4dcc27 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb index c804fdb27011..80a3f6830daa 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb index 8a8b901fb749..a6c6b2d32724 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb index 4a7a4b89530d..6d15a7805873 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb index 720b7f13ee39..f55151327579 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb index 4fcb2625e6ae..821e090ddea2 100644 --- a/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ b/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb index 65333bc988d5..83ecbb1d59e0 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb index ea6041ccd8b4..25795739b50c 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb index 9d9a78ea8f27..eb4938bac615 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb index 3fa49da6610c..b9c3eb2c9954 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb index 42f2b4db4389..6e46e310ad0b 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb index 605293aa14d5..e7a89396ed57 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb index 040da95a3314..3eab77f7e378 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb index 852107e967f3..a1ff3c50bada 100644 --- a/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb +++ b/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-iam-v3beta/test/helper.rb b/google-iam-v3beta/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-iam-v3beta/test/helper.rb +++ b/google-iam-v3beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/.owlbot-manifest.json b/google-identity-access_context_manager-v1/.owlbot-manifest.json index 2f3cee55da3e..2e13ece93581 100644 --- a/google-identity-access_context_manager-v1/.owlbot-manifest.json +++ b/google-identity-access_context_manager-v1/.owlbot-manifest.json @@ -90,6 +90,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-identity-access_context_manager-v1/.toys.rb b/google-identity-access_context_manager-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-identity-access_context_manager-v1/.toys.rb +++ b/google-identity-access_context_manager-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/Rakefile b/google-identity-access_context_manager-v1/Rakefile index 5ba1b98b9457..4d845f513939 100644 --- a/google-identity-access_context_manager-v1/Rakefile +++ b/google-identity-access_context_manager-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb index 35caceab7996..5d4eaa9b5df6 100644 --- a/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb +++ b/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb index bf8a626e9200..c51f7bf61440 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb index ea35c114cfc0..557344644e3e 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb index de4898d7f884..3a8c8320a0f6 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb index 8d742ace017e..776e70b9d2b2 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb index a08e09b60943..1fdaf89aae95 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb index dc87ec041884..11645e15c66f 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb index 87b1f783a8b5..db852d4c1c3e 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb index f5564060bd89..3f2ec497d8d9 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb index 66f8dfdfba65..484cf2ada2d9 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb index 6449760c44c2..2eba8ab83681 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb index 70543e8f56c3..b85e8d3b9a1c 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb index 5e322fd0b5df..5d40fe4c565a 100644 --- a/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb +++ b/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.V1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb index 447ba2367b16..5445c77f8258 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb index 79dae8815aca..60713d995b86 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb index 49cc5ebe1a2d..999575b797df 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb index c2f677020e30..98103f9a8eb2 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb index 26aa6087ad8d..0a4ef8552281 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb index 0054b09958d9..263cc28aa3d0 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb index eab0af3a3ffb..b034d49fe22d 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb index 95e69a1bfd15..bbd9b110d43b 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb index e554c952ac7c..be4e39e46ef2 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb index 650a5ad04e68..53e7733b6592 100644 --- a/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb +++ b/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/Gemfile b/google-identity-access_context_manager-v1/snippets/Gemfile index 88da91e4e317..7c4756c28a3a 100755 --- a/google-identity-access_context_manager-v1/snippets/Gemfile +++ b/google-identity-access_context_manager-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb index ad1f55920824..8df7e306a7f2 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb index 4a33ea6e03aa..7ad25cd17d4d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb index a643581435d1..a9f9d7289673 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb index a302b4ad528a..f1020626f742 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb index 410112fd69f7..412e217d7849 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb index d089b119b184..00c5232fc6d1 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb index 183a67d64fe7..eee4a031ae6e 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb index 9e6716b9cc4d..dd965cf499c5 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb index dd2b21232de3..983eda52bacc 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb index 412d4bbfc528..0597699fa439 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb index b29e78968efc..0531cf3580ad 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb index 9123fdf9ff2a..d732c416d5c8 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb index 6f74279325df..b134f682cf0c 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb index bd9e6bfb85e8..fd5e1db7b14d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb index 237ab6ad4927..a5bf8a3cae59 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb index 667022cf2993..8244d0f6948b 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb index a0a8a784e592..933198ef288d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb index 85d972e9c566..7e6aab1e29ef 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb index 0ba99b7d2f9f..8c5a3d228fae 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb index 5a18d7727dca..0bb1d425f50d 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb index 6a3c66ab56df..47743b7f9b84 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb index 908788d32aa2..780f1b93ba1a 100644 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb index 47657f547a0a..0c0f947da7b7 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb index 3995b69fb62a..a29a2622b29f 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb index abc3e08aa336..48d03cc216bc 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb index cf2e2ba1f565..a751242211b5 100755 --- a/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb +++ b/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb index ad2d309f5f66..07584e8a3272 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb index 193b13bf35ea..d60902c54e76 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb index 2110da31a10b..f15c7327d6fe 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb index 566a896e640a..ef2427c12a7c 100644 --- a/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb +++ b/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-identity-access_context_manager-v1/test/helper.rb b/google-identity-access_context_manager-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-identity-access_context_manager-v1/test/helper.rb +++ b/google-identity-access_context_manager-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json b/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json index 626cd823e9fa..ed3787fa7efa 100644 --- a/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json +++ b/google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json @@ -70,6 +70,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-maps-fleet_engine-delivery-v1/.toys.rb b/google-maps-fleet_engine-delivery-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-maps-fleet_engine-delivery-v1/.toys.rb +++ b/google-maps-fleet_engine-delivery-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/Rakefile b/google-maps-fleet_engine-delivery-v1/Rakefile index 8a69b60d5333..cd9e87b75d54 100644 --- a/google-maps-fleet_engine-delivery-v1/Rakefile +++ b/google-maps-fleet_engine-delivery-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb index 3234cb8cc922..cd1ad7559d55 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb index cd989415dd89..bf548f559e81 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb index 0162b8dd49be..3f52ddd3345e 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb index 1fcce8828d4e..57a447f2b08f 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb index e008277b6dae..8665c263a506 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb index 3d8b197732b1..dddaace08010 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb index 66a91ff5dc35..c3e0d58b6ef6 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb index 02d73f1bf2e8..3d36d73469a4 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb index a673935972d0..b1a86959625c 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb index e125b0975e6e..8bc23bd54948 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb index e0c7fc540ca1..4a755e067426 100644 --- a/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb +++ b/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/delivery/v1/delivery_api.proto for package 'Google.Maps.FleetEngine.Delivery.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb index 497560392276..6d71a9430253 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb index fe0ee05cff16..f387552a7073 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb index 68ca054427ee..1feab364a2dd 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb index c7271fc20bed..8c9bb733f9ef 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb index 8a82d5885f63..815ff7ffd128 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb index 88612273bff2..8475ff84935a 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb index 8968c28b4600..3a110fdb32d7 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb index 553dac53500d..0bb1c3f6a05b 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb index 13c904cd662e..593314b4cde5 100644 --- a/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb +++ b/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/Gemfile b/google-maps-fleet_engine-delivery-v1/snippets/Gemfile index 439a18a97a9b..30533202706d 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/Gemfile +++ b/google-maps-fleet_engine-delivery-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb index 7010b3247d8e..14782a4848c5 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb index 6a0fe81aab15..4e414ecb6e94 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb index 8e25a5d300cc..786f6ae89625 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb index 4b7caf107870..0a42a3ea4d16 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb index efd3ffb59ee6..7839b4fc3aa0 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb index 2208fb1f955e..ac4be0811ccf 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb index c23dda7faa9a..51530e7ea2a7 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb index ba53a2eaed06..50c6fcfcbe4c 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb index f271d3d21afb..06025d2f85f2 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb index 87ebb9b9f62c..f5751c045373 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb index 2d0d5bae808f..54d6bfef390a 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb index f8223a66b079..6413dfeaa315 100644 --- a/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb +++ b/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb index cabc6470aa85..8d3d04d6c721 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb index ff6502e3b5a7..df0109912e9d 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb index aefbf3101b69..d08154229fd8 100644 --- a/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb +++ b/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-delivery-v1/test/helper.rb b/google-maps-fleet_engine-delivery-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-maps-fleet_engine-delivery-v1/test/helper.rb +++ b/google-maps-fleet_engine-delivery-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/.owlbot-manifest.json b/google-maps-fleet_engine-v1/.owlbot-manifest.json index 56f42e677f4a..05808b29e1b5 100644 --- a/google-maps-fleet_engine-v1/.owlbot-manifest.json +++ b/google-maps-fleet_engine-v1/.owlbot-manifest.json @@ -84,6 +84,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-maps-fleet_engine-v1/.toys.rb b/google-maps-fleet_engine-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-maps-fleet_engine-v1/.toys.rb +++ b/google-maps-fleet_engine-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/Rakefile b/google-maps-fleet_engine-v1/Rakefile index 1be78ed47b55..3919676d82cf 100644 --- a/google-maps-fleet_engine-v1/Rakefile +++ b/google-maps-fleet_engine-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb index d5f1338c965d..d09ab3bdc03a 100644 --- a/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb +++ b/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb index 873be0a04496..b9e04593edfe 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb index d499cdbcb365..a0010e1c40d9 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb index a02084ecb010..cb3cd45ab109 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb index e0a646dd1e65..18ea9bb63065 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb index 11e25c9e624e..4377df747ce3 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb index 63bd3b95cc5e..7de4a91f901d 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb index 1804c8ca49a5..8f43dcd60e6b 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb index 0072458bcf2c..78114c5d13b2 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb index 1ee77e88fcf2..989dd713b15c 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb index cd87307f4079..8a9893ae0e60 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb index 25d5e87d74df..c1b48e95c452 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb index 54606bcca23f..fa225faa2e96 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb index beb4f49d5813..55fd593ff4b1 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb index 279b68928e3f..c638416560e4 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb index 90fae2ef24e2..6f30d8a08b7c 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb index 6cc202e26ef2..ab5b0c346f64 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb index f4ba40054f10..39026e91ba88 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb index c38eb5da7a44..31ee1908cafc 100644 --- a/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +++ b/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb index 497560392276..6d71a9430253 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb index fe0ee05cff16..f387552a7073 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb index 57a3b013af54..9855fd75847c 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb index aa64b10c4abe..dbc08c7760c6 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb index 69cc7a18e0bb..024d9a7221d4 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb index b677517131c2..4bf45f469f13 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb index 4bc45542041a..e5dd08d4fdac 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb index ce955adbc1cf..501bd43c50a3 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb index 39cec795913e..59703d2da0b2 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb index 13c904cd662e..593314b4cde5 100644 --- a/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb +++ b/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/Gemfile b/google-maps-fleet_engine-v1/snippets/Gemfile index 8408c1f115ef..1a35fc6011c5 100644 --- a/google-maps-fleet_engine-v1/snippets/Gemfile +++ b/google-maps-fleet_engine-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb index f1b47274850b..471ee490d00d 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb index 80bc031adf5e..892398e76959 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb index fc38592390b8..d02ae4f6720c 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb index 84b7892710fc..66c560dccfb5 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb index 6920b8e0c20f..213ca35edfd8 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb index f8dd8e796946..caca64f14dad 100644 --- a/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb +++ b/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb index 969010178e89..70db086501d6 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb index eb4029f584f5..c040d402cb0b 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb index a7a56290df04..4872490fa433 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb index 486532e1bcee..1119502e68a1 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb index 45699c855c63..e28a620bb8ef 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb index 7167eb19d8b9..87e5b21b85ad 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb index dfabf7c8b084..abf97493f162 100644 --- a/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb +++ b/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb index 28fb6028936d..f1ddb3264a50 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb index 2a5f92c6bcbc..a6042f765747 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb index 93a52630d3d9..38356c41018f 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb index dc95545932ba..104283f54a4c 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb index 40c8975abb5c..e5e9ed6215e7 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb index 88fa71a00e13..f20a91100c3a 100644 --- a/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ b/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-maps-fleet_engine-v1/test/helper.rb b/google-maps-fleet_engine-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-maps-fleet_engine-v1/test/helper.rb +++ b/google-maps-fleet_engine-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/.owlbot-manifest.json b/google-shopping-css-v1/.owlbot-manifest.json index f161dcdeb4b6..eefaaf21cd23 100644 --- a/google-shopping-css-v1/.owlbot-manifest.json +++ b/google-shopping-css-v1/.owlbot-manifest.json @@ -112,6 +112,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-css-v1/.toys.rb b/google-shopping-css-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-css-v1/.toys.rb +++ b/google-shopping-css-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/Rakefile b/google-shopping-css-v1/Rakefile index 029f2bd284f0..635d913938d1 100644 --- a/google-shopping-css-v1/Rakefile +++ b/google-shopping-css-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/google-shopping-css-v1/lib/google-shopping-css-v1.rb index 31bc0c3fadd9..a93e9af0be45 100644 --- a/google-shopping-css-v1/lib/google-shopping-css-v1.rb +++ b/google-shopping-css-v1/lib/google-shopping-css-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/google-shopping-css-v1/lib/google/shopping/css/v1.rb index ff622d2fd00a..d1249eab068b 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb index 901944542f9e..bd9585d09cc4 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb index 083255d267c4..f12cbcd80856 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb index 8688d205f360..0e7c2cfdd5da 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb index 64582404452c..2f421e27577b 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb index f245618b15b3..728b66d6ac46 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb index d4a7177a734d..0a653f5e9a25 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb index 9ea3611de97f..a9b8cb91fe84 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb index 5366d4fe2814..1d0c4f3552e2 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb index 9b3307675e1d..cbe6be04f569 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb index 282fc55956ec..da91d95b8f0c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb index af0cbd74836d..4584fe4873de 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb index ec0ec0c50ea2..e069680bdb33 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb index 54c93c31b314..996c51dd8cec 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb index 8c7df4e34c52..8a279b8f7067 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb index 75d7924a535c..afe5123dbfaa 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb index c682d7053b86..6528ad62148c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb index 11f8f806c9ce..d9b82213398f 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb index 23ca63ba4996..79c357cee408 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb index 09f1c65b86ae..066f5ca9210d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb index d3affcac0d30..b71796db1d3e 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb index 976414ca6f87..06be63d42390 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb index efcddaf68c38..42512d523193 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb index 3fdf986eeb0a..3eb2aa0f1884 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb index 3e4af2598fc6..a872c72a6951 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb index 9b03245690dd..ace56839641d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb index 925b6a297a7b..5f43148a4403 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb index cc7aca1c3bcd..5656f955c92c 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb index cd2a35d4a2d8..e311ef6467e0 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb index 6cdba6705170..6c5a8ef0a46d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb index 75a038241065..ca2c12860121 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb index 702aaf33a558..d7eea4bfc0da 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb index 2ee9a4942917..50ec396539bb 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb index 1c361a522438..8318f2e1b7a3 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb index 66ac63a5806d..cb7d6d1fe847 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb index e47db4e7ecb4..300c3137cdf6 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb index 4bd5602ff301..d6952334dd8d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb index 69e816934a58..d008263afad8 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb index e470c1f70b16..becee6c58f15 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb index da17d02b3764..0104aec48d94 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb index 0758c83a12b0..2176f57358bf 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb index 158cc5510157..2cc3b855b50d 100644 --- a/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb +++ b/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/client.rb b/google-shopping-css-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-css-v1/proto_docs/google/api/client.rb +++ b/google-shopping-css-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/api/resource.rb b/google-shopping-css-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-css-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-css-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb index 74086749a897..eba13c9a7aad 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb index d1ee1421865b..055f23e04511 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb index cd981b51aaf4..c00f0c3460d5 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb index 4a3c026d0c56..c6945a0046a9 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb index 8794e665ce04..d61414008787 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb index 02721c5df52d..d0d83c380b21 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/Gemfile b/google-shopping-css-v1/snippets/Gemfile index 7cad76eb1aa7..64af0f406f42 100644 --- a/google-shopping-css-v1/snippets/Gemfile +++ b/google-shopping-css-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb index 2640cdb1b8a1..3e0da7936320 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb index 63799fa17dfd..37acf2da6b88 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb index 00ee171c02a0..b6e45b80ec3f 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb index 41031474cdde..3a87e7d4688c 100644 --- a/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb +++ b/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/google-shopping-css-v1/snippets/accounts_service/get_account.rb index 4ae53f38710b..99a758913d47 100644 --- a/google-shopping-css-v1/snippets/accounts_service/get_account.rb +++ b/google-shopping-css-v1/snippets/accounts_service/get_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb index 536c79475d46..56b92aa4cccf 100644 --- a/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb +++ b/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/google-shopping-css-v1/snippets/accounts_service/update_labels.rb index 904f128be76c..d5f667ab066e 100644 --- a/google-shopping-css-v1/snippets/accounts_service/update_labels.rb +++ b/google-shopping-css-v1/snippets/accounts_service/update_labels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb index 2c7cd36a0914..006857df17cf 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb index 95aee279b384..1acf0e41e05a 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb index 7b5fcfe8185d..b0f42257db06 100644 --- a/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb +++ b/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb index 39dd2d347f1e..859163887d62 100644 --- a/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb +++ b/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb index 0a2468f7c9de..e65a9a1d0a0a 100644 --- a/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb +++ b/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb index d8072dbe2edc..3efd74d00a2a 100644 --- a/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb +++ b/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb index 69233c1433e9..06be5bd23520 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb index 247c4acc04ad..0b1bb88d645a 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb index 8f89bc62fd2a..309bc3a0ae62 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb index c1fd6a621260..5958f212e0cf 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb index 5b44d052182e..292ecc543790 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb index 89173d351480..6abde8ec7b17 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb index d6aa4efc99c3..6f08e5fdf404 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb index 2eb831d74902..2e9aedae5c1b 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb index 285b12a19bc6..cae9bfab46aa 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb index 95806c97e1e3..7e9ac41a013e 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb index 6b13b452188f..8482e96080f6 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb index 880997ace109..693ba1506589 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb index f80515dae680..ebdbed9d44c1 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb index a7b7da70c038..a8c80cc10365 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb index 478860133425..5454c9c25375 100644 --- a/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ b/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-css-v1/test/helper.rb b/google-shopping-css-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-css-v1/test/helper.rb +++ b/google-shopping-css-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json index 2800bbb14cde..a38d666eeaa1 100644 --- a/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-accounts-v1beta/.owlbot-manifest.json @@ -375,6 +375,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-accounts-v1beta/.toys.rb b/google-shopping-merchant-accounts-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-accounts-v1beta/.toys.rb +++ b/google-shopping-merchant-accounts-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/Rakefile b/google-shopping-merchant-accounts-v1beta/Rakefile index 4ba241983ce6..dc4519177094 100644 --- a/google-shopping-merchant-accounts-v1beta/Rakefile +++ b/google-shopping-merchant-accounts-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb index 70d9c54980cc..c0b2d7879e0c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb index 8e6d4b997cba..e10eb5ebc89c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb index 63e648ba67f6..b613248a4cd9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb index 3f883e91d2e9..43a790ecc274 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb index 822d3c10c7e5..bec671601e38 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb index 6fd99f57526b..71d24f829fad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb index 965fcdbc71b7..3b76683c97dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb index 1bae85163265..83ae8b227f30 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb index a59e8c585307..625c0f5e9a9c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb index 11f45584b92c..fe883ee6aa6c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb index 7f7e0c473358..e854d0f8fc83 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb index e4b7a26c3834..fdecfb93cd56 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb index 1e4c7de13b23..327a514a749b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb index 90fff6e5108e..539c364b6e47 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb index 48be41dfd527..82f756ae1010 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb index 7f847ffa35c4..1793880416fc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb index b81fe97a8b32..91544da451e6 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb index beb0389991ad..c925c068fe0e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb index 18f1e2339d92..1db2def8535c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb index 59245f647c93..cfa723ef8c94 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb index 22e14b80f71b..d2510c2f46bd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb index a6bf7fb49145..2be49373540a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb index 08b13a530f7d..0d514d6bb48c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb index 1aa8790661af..cdf36e4c6b04 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb index 647f879a4e6a..d62c09e78506 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb index a2f2a6691923..df57e5bd28dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb index 2748191a09be..2d2bb35eeb25 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb index a32666f2a9ef..6b3c5f535190 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb index c59b3293494b..2ebbb8b964ad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb index 90043b9f86ef..4e13a4e879c1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb index 979e00c5e2d1..089d4e01e4f1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb index 5b1e06a377f9..21ef0349a01e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb index b169f5837ec8..31c104de3eab 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb index 4caf656e00d2..700b9a9139ef 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb index 9ba686701f71..f49e147087f1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb index f1643e6a7415..954914055c6e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb index fcfe4a615abd..f8387a866b10 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb index c4de672d6fdb..9450fc09a397 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb index 3a22e8d90f62..351bcf6d3b94 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb index 5798c7d7fee4..771dbbb7ade0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb index eb243e708657..3b8079dd1fa9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb index 41f73b473560..d43f48202612 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb index 2f0ca863b6f4..6cd2a1560400 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb index 5950a8fac1ae..411d0a8452ca 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb index 6e2fab9b3345..684dbc65841c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb index 682080fc9043..d1f0814edc5c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb index 9b5102487cd4..c3efad2cf64d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb index c4f479298443..650d5181843f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb index b64f8c7fe773..6bc1a26ad17a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb index ed11ef1a2d0b..a58943d63128 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb index 95026b624c5b..0308f8a5ad24 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb index fcc6491afebe..0a2e4aaaee0b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb index 20d4007227f3..1a834ba1e2c0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb index 72d4c1984674..04bf182d6111 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb index 9a9bb2f972a5..b7cc0315c746 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb index 958a16f2b7d7..91a6e86252b1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb index e7446d2284e7..b69a18296f1e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb index c8bd47bdedad..6510004f596a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb index 3d3326de92a7..16ed9683aad9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb index de0fe6106bd1..59b479846819 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb index f0c859768654..c2ce599e591d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb index eeb5c23f267a..88121fed97ac 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb index 3bc5efee86b2..ea68b31ea7d8 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb index 5520f5dd55b2..ab727cfeab6f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb index c18219ca6abc..d06d098a05ba 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb index 0d38b3fb5188..6bb8c12c7625 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb index f2603469d9e9..720eb9a879d7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb index 216b33432035..fd9c9497e227 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb index d492079bce0f..b2676240e767 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb index d343e09bc8e8..9e62fc5d7d5c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb index 50d276525000..9193d3947fc0 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb index 49f7b65346bd..4d4ab5d746e5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb index 3b7b7afdb5ab..cdcf6b1c5dfd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb index e2401d4ab93c..e66a0c58044a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb index 393680086ea5..293bf2160f68 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb index d3cc45aa1d61..a10be9d7033a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb index 25faee848d31..e9b645d1dcbe 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb index d361cda54bda..e50f06e555cd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb index e488f9cea4af..d969d96d14e1 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb index 2798bac25afb..d3c47366408e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb index 0e98c625d7e8..79e2601a3950 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb index 87c879493f7e..cd945b510c57 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb index d212dc95d103..58d7b7105437 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb index 86b7e83e1782..87039ee3847c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb index d2ce13e41532..5c6975a7e0d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb index 50317de1fc21..9c3d3c797d7d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb index 4bc136946199..9767309ba008 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb index ffbe09957794..058cc57bb288 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb index e9690c91ca04..5b337c8254dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb index 165281f7273f..4e45d13facbf 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb index 4a4f768dad52..668327ff63dd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb index 3dc9237addd5..501c902dee0b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb index e5b398854842..6a4e33bf15c3 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb index 520159b397bc..490af09ca942 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb index b7351d32d5d2..a05a5462fd00 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb index aa2d6c0df6e0..50ace30f1702 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb index e23e844cecb0..b68c12fb3003 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb index b84ecd706cd3..e50d1ca4f146 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb index 554a8464adfe..263f2eb40bce 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb index 11ca797e44d9..072ffc5c5e3c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb index 3f84d1bf971c..6ceefbcd5ee9 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb index ee9c578d4813..d1dc65cf7331 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb index 73e5b36cb2e1..3d6fa0134f03 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb index 0f21bbb51fbc..65cce8eedd0a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb index 6427f273c11a..99da2a7379d2 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb index 22e78dfc88db..aae7187d3bc3 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb index d7914533b0e1..444f346f95aa 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb index ed98099405b7..dedd98287a41 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb index dc6fa57dda92..0fe2ffb749d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb index aaee3267a54b..5c31844c5c2f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb index 5b963718e944..361868712e90 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb index 4c4206817b11..2935731c5fc6 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb index 9b0d4f310390..3b9b815133bd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb index df679dc8a592..ffbd61628a98 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb index f4bf3526b679..13115347e581 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb index fcc7a44b9df3..bb7144364d14 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb index 0e8e8c092895..8282a0f080fc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb index e58e24faaaa2..a6f7d439e86b 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb index 700dee7c59df..a240185dfa7d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb index 690d5a69e022..536fce1bdfaf 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb index f279f6252ae8..b6f5e812e70d 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb index b35660815568..f359bf4bc293 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb index 759f715eb4a2..2068a53a1b70 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb index f0db7e5f99a5..2705002746ab 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb index 75c51b7653d6..dcb5e918d1ad 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb index 7502aa52e7bc..7a948b075dea 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb index c48a6b337e59..883a132363a8 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb index f4617137ac2c..98d6c89c513f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb index 4383546f8dd2..b3b8b543ed1a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb index 7189a5fb9764..29bb68e960e2 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb index d7e6a65e5f8d..0d14c8f4c394 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb index 4c402fe81b9e..cbb1cb183061 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb index 01f76ce89588..40faa8e51671 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb index c104c49ee7a9..87ef1c4fb84e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/shippingsettings.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb index 0b9e3de8749f..604128e638f4 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb index cb57e9a40f26..d1b2f02819fd 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb index 18d34d40a98e..08f405184324 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb index c00da5bd22a5..8f1f50a9834f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb index 2ad8d30c4059..33c9185e4e0a 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb index 95d7f3ae4c28..f99ed2289e41 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb index a854289164f9..c0a226adbfbc 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb index 52a35d3fbf35..7147a2323140 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb index b57affeef72d..8ab3d9adf00f 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb index edd918629f9b..46f3c20085d5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb index 6f84bd71bdca..cbc86885e96c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb index 70c6bc912605..45348f1253e5 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb index 819c307272b7..4a0c6f76ea19 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb index 1e86d0c76b4e..e44a62b60c86 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb index 39854de674c1..f300591e6416 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb index f083fda56793..edbccf383c55 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb index 51ac9a6431b9..64065f29308c 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb index c72b55138d30..bd71f6b81cea 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb index c8a665edc908..b280d41b5a54 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb index 35ba76bcac5d..e0b82b1f8295 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb index eb03ba11cbb3..485719a9a0b7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb index 75ab1ce45670..5c14f5af0f01 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb index 13de86557cc3..c297a2b417f7 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb index 3513243cf7e0..54dabf37a72e 100644 --- a/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +++ b/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb index 6319e2207883..9a7c0269fa42 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb index 72ae8df16f22..d51673a9fd9a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb index 52456ab00414..fb5a0c3c1f9b 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb index c993acf07859..5cce1309c12e 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb index 14bcd4e6e8c4..573b329cfd2a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb index 7fe43e92f70e..19cff87b2479 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb index 7c95306305c1..e321368804c4 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb index 621fad05ed8b..08941d3f76aa 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb index e75d5d98c31c..0e7e0a4c0677 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb index e43503df009c..3546fd5ee3a5 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb index 5c3ea7d5c47a..1acb59925679 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb index e15f26099a53..5a79025d60ca 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb index 466fe41e6de1..540f0e3bee48 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb index 633741c5dbfc..b8c64f5452ff 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb index 9591d48c85ef..24696e1e3b3f 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb index dcbd42baa58a..f4a962b34c31 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb index d2fd6e1bee73..17d29142b0ff 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb index 1a94c0383167..7e1e51be1a93 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb index 97bf0c4255df..8dd1d729cfe1 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb index c6fc6e8b6e4c..7a16e89b6c29 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb index 368b58789bac..6757ee510eca 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb index 4c865d2b6b09..e5456e04275e 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb index 72f950c4baa7..5cbe635b16ed 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb index 015be9f3a772..1b414fd1bccf 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb index 656ab40bbec6..0390b017c401 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb index ff1c02a9eb4c..636da0a3420a 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb index 1362050a0481..549b2ff4eff2 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb index e0495b2ffe70..50aab1617c36 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb index 5b5320d61a17..f4ad43686e83 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb index 0598d6b697b3..10625864f3dd 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb index ba88575c495d..9350ca479005 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb index 0c803c153838..109db1a50c89 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb index 16f55f4acc3e..e49308966533 100644 --- a/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb +++ b/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/Gemfile b/google-shopping-merchant-accounts-v1beta/snippets/Gemfile index a7f73a403b3c..1661c67a33c0 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-accounts-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb index 803670836afb..d2c2f5b7044e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb index 47f311a4bfdd..a6ee5c5ad6a3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb index 393588ae0a4c..05f1f64c9431 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb index d369099b2c44..eac84cb07759 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb index 3e48a32e7d1f..c4b1730282e8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb index 86c4e87272c7..be1e82db0406 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb index 3554900fd0bc..ce0c105100dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb index 1cf38d046c1a..507751cb8634 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb index dc943b676771..8db5c917e70c 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb index 345bd09c7136..d17466b32f14 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb index 93c788a4a622..74c288fe1afe 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb index 6d1573fc1e4a..fdcde06c5e91 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb index fcc35c73a7e8..aae1e325fdef 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb index 171ab793ed04..846c9557c5b8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb index 03e516e753fa..b23cc7bee95a 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb index c6a31cf864ca..b6b4835aabd4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb index 18e45e3f1cb4..7c8d4345e227 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb index d31cd42784fd..cd34a45a3abd 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb index 432da470f1b7..ea2f979f5cd7 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb index 7a43e09e5a15..b7b8c95e0bf3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb index eee50a9ad25d..c7b80b5590d4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb index 81b2d1a31617..4bdc2f2116dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb index 1ef7c40b4ed2..f1cfbb47c184 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb index c43a41a42c21..efce339f0560 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb index ee36b7e4d978..cb5845dd1e9e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb index 050de54dc489..db5611b0eb27 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb index 514ec60fad9a..5d6017d56856 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb index 8eb031e27f9c..b371da4cfb57 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb index eb739e8bc234..7119627b9aeb 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb index 5a380ce71a8d..19c3e42071a9 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb index 1a21182c1c8e..e093657726da 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb index 153bf3157830..0e786754f919 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb index f04e7ea894e6..925b54971955 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb index 649600a3832f..f41ee01542d3 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb index 2ad1a87a4dc7..3b764f8ff84d 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb index a721ff65ffeb..61b421be1805 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb index 37957e8c2e0a..c9ab04368e53 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb index aaefeb79cf29..83bc00b2c1df 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb index b76787b97a49..642b3bdcdc00 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb index f27d8326cfed..2105a2c947a5 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb index 7f4cd1cdb609..f9a0b2b0a844 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb index 7f0ec0d5e809..4034ff554461 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb index e89bf3cafae7..775a998697dd 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb index b9c032c2c807..d1bdf22bfbc7 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb index 57f292103016..ca8e55bfb1f4 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb index ada29e397f48..f3249c03a812 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb index 6202655807c6..8b0ad849b120 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb index 76e51d641c61..97ee0432dab6 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb index 6ef45b60617e..6929030f8c97 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb index 540caa00776f..390e2d0f9420 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb index b0c6a6bd7fab..ef1e556cc578 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb index fe533fe10c2e..e6cbd703b4dc 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb index 4fca2591ee80..592e8881b30b 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb index 0fc5744a5775..6002493fa06e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb index 88374fd77851..fce83e3ae057 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb index a0b07367d5a0..b1e3c65fd56f 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb index b5a82fb1b1ba..72780fd192f1 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb index 6865f3b900cf..e0039a91db2f 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb index de258e98d4c3..99337d55834e 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb index 18abf463c0c5..07a8a692be99 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb index b92da10aba97..7e279d65f5b8 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb index af6283104665..17dca433a258 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb index e48659573536..a39e0c84162a 100644 --- a/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb +++ b/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb index d317d1105e8d..d759cbee13e3 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb index 065475394d66..3b4c93312537 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb index b27b6e2ee89b..1762325f7744 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb index feec5fb8c53d..f72de9504a1c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb index a40dda2f36a6..2448c1d9965f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb index 087cf074de0f..fb9595c10ef5 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb index 4a17933ed27c..62d77fd98b02 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb index 9cfc801291d0..007709ef9bbc 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb index 8320d93c3448..b804a96086a9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb index 1f8e1210d404..0d03f7e27cbf 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb index 296549d22367..e568de354b9e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb index 01f488af508e..81bf70221d6e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb index ba6bcd518665..5432846fad2e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb index 953e5676b607..3661fc4b5cb9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb index 5e2846aa60d9..e1e55704cfc9 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb index 657001f8f1ac..20f3daac2d1a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb index 351aa14568e3..d8cf55cffb39 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb index 420eb5e11a56..3ba57bd06fbd 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb index bbfbea38a1f9..128cf717a145 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb index 464fd0942e23..1e3541aadd85 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb index ebd5da6a1b56..cd6e3250647c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb index 31f67948a63b..4f838dc12447 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb index 74b051db43e3..d1109975a30a 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb index 8fbcf7ee9df2..238e43a52a09 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb index ae338190c936..a4b6db6efe0f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb index 9f55e3ddf80b..abdc1010bd13 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb index 43f09716760a..31103ff9a7aa 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb index 9163512e3630..28b36c651b32 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb index 892f65d041d2..7d9ec650854d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb index 0712e0b73d94..0a94b37e7a87 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb index 9e703ded4aaa..61d80f67f1a5 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb index 1f789df40975..24f5f703463f 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb index e0c69303b185..541f4c4af0ec 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb index 161a38d87d22..40c4e008e3f6 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb index 2a6c49e2a75c..9441edd6a6fd 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb index 6f26318c7d09..95a5bb2889f3 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb index abc687dfd5cc..fda485c81acf 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb index 378c84ece4f4..4e97a17d0072 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb index 5f279aeb90cd..54fe923feebb 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb index 72be71f6caa4..c8399e11c1e1 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb index 76d380d92851..9d60cb71c44e 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb index 677d4b46b7b1..0cbc348828d4 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb index 7b67ce9c40a4..380202e72500 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb index 2dde69788fb5..91c368ce6958 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb index e5f19bc8920f..5d47d7fdf72c 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb index 33e18ca53f2d..698e3d23528b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb index 5190cb7e0f0e..7a80d1a66e9b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb index 6a642717ebf8..b8d04e0ec14d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb index 853c49ee65bb..555555c1a601 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb index 0a21c1d41bf9..12786998e452 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb index 6ed0a997c97a..a07f02f18b17 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb index e7306e68d20d..eecca8da77a7 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb index cb739a124a49..aa3c6d3f45be 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb index c7dbb758abfa..f42810b4c121 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb index 8a8f81607af3..cecc22896b0b 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb index 62e1580ad356..881bf00a9a36 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb index 6c3faf88b05f..2e8bb0f3b620 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb index 9573dbad646c..e71cf60afd5d 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb index 03016c82d896..55c4d6896e48 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb index 271283c5e765..21191fcbe518 100644 --- a/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb +++ b/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-accounts-v1beta/test/helper.rb b/google-shopping-merchant-accounts-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-accounts-v1beta/test/helper.rb +++ b/google-shopping-merchant-accounts-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/.owlbot-manifest.json b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json index 748e7f6a2b7e..da32f68bba00 100644 --- a/google-shopping-merchant-conversions-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-conversions-v1/.owlbot-manifest.json @@ -50,6 +50,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-conversions-v1/.toys.rb b/google-shopping-merchant-conversions-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-conversions-v1/.toys.rb +++ b/google-shopping-merchant-conversions-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/Rakefile b/google-shopping-merchant-conversions-v1/Rakefile index 9df3e94cb106..09036b63c7b4 100644 --- a/google-shopping-merchant-conversions-v1/Rakefile +++ b/google-shopping-merchant-conversions-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb index cd4a31efc2cc..2992146c576e 100644 --- a/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb +++ b/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb index f4bc3897ae40..d3e68a85ea00 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb index c601ef34743d..ec823442ad31 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb index 2235349300b2..db5605285d85 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb index 8e576f7418f8..c408f4a3e17b 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb index 494efd8f88cc..58f06044072d 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb index cf4f77c3738a..c4ae00d76953 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb index 3c08f8019fc9..172557541b57 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb index 8ceec5b5d088..cba0818d9244 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb index 61a880c91d9a..851e5c7243ac 100644 --- a/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb +++ b/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb index 1649a61e00ab..f308c62c77bc 100644 --- a/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb +++ b/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/Gemfile b/google-shopping-merchant-conversions-v1/snippets/Gemfile index fba3696ae69b..f46fb0f94950 100644 --- a/google-shopping-merchant-conversions-v1/snippets/Gemfile +++ b/google-shopping-merchant-conversions-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb index b2fa0d3d4065..827b4a926e65 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb index fc019cac403d..ba6b1ac8bfc2 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb index 362205bbc193..d9f971d44b48 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb index bbf5190715dd..658a5ab951e4 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb index 9141cef101f7..22afe1c1ac8b 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb index 591509a31096..67c6808b8b3c 100644 --- a/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb index 36ff7b84e6cb..58ab80ed3978 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb index 7b273d792f3d..31c68180521e 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb index 444c5e31ac23..407eedb71e02 100644 --- a/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1/test/helper.rb b/google-shopping-merchant-conversions-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-conversions-v1/test/helper.rb +++ b/google-shopping-merchant-conversions-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json b/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json index cf2324bcdeae..bc907b98bfdd 100644 --- a/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-conversions-v1beta/.owlbot-manifest.json @@ -50,6 +50,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-conversions-v1beta/.toys.rb b/google-shopping-merchant-conversions-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-conversions-v1beta/.toys.rb +++ b/google-shopping-merchant-conversions-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/Rakefile b/google-shopping-merchant-conversions-v1beta/Rakefile index 9c4210d3bb53..df7ec62e5251 100644 --- a/google-shopping-merchant-conversions-v1beta/Rakefile +++ b/google-shopping-merchant-conversions-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb index 2baad10c91e5..8aae5f49f6d7 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb index ee46088797be..efa027bc825f 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb index 133e73ea5992..ec937b0d20dd 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb index 831933f58873..5b66e173552d 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb index 0af8d7fa257d..fc78775e84b1 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb index f4f9fd7ec5b1..0957b8b6c5be 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb index 27fae40d67a2..050042f123cb 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb index b8a4a49c9c0a..36efb49acdb8 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb index afbc6bd2fb69..fe73baae518b 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb index d1487011bed2..f25fc3f2e077 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.v1beta' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb index 76096c886662..9238cbdb5b76 100644 --- a/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb +++ b/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb index 41a92125707f..f44123837180 100644 --- a/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +++ b/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/google-shopping-merchant-conversions-v1beta/snippets/Gemfile index 1581ecc2beb1..6a2aef3b6555 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-conversions-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb index 00d2bb51f8ba..8081af021563 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb index 33baf235f812..67d343214d62 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb index 13a423f81d28..6c928140a9a8 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb index b6e2f4c2ddc8..45183543d605 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb index 8950cd559583..88a2acac8a2f 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb index 440d8b6b77bc..e65690f44b15 100644 --- a/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb +++ b/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb index 657f9e040e90..ac9354d66391 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb index 8b9a3c199f66..dce67f4f09e7 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb index b75bf55a3053..67b1bc0f16d7 100644 --- a/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ b/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-conversions-v1beta/test/helper.rb b/google-shopping-merchant-conversions-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-conversions-v1beta/test/helper.rb +++ b/google-shopping-merchant-conversions-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 1feb0d2af605..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 1b2942f8b010..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 29f093951a00..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,1723 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_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 59b89648ea0d..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,1589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_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 300dbef56aa1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb +++ /dev/null @@ -1,21 +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 -pool.add_serialized_file(descriptor_data) - -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 d039df3934ca..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb +++ /dev/null @@ -1,27 +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 -pool.add_serialized_file(descriptor_data) - -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 1a3b0059d4ea..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb +++ /dev/null @@ -1,24 +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 -pool.add_serialized_file(descriptor_data) - -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 136678f8b4cc..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb +++ /dev/null @@ -1,21 +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 -pool.add_serialized_file(descriptor_data) - -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 56270c4fa739..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb +++ /dev/null @@ -1,22 +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 -pool.add_serialized_file(descriptor_data) - -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 c5a7d84f453f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/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 -pool.add_serialized_file(descriptor_data) - -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 08dfdde3eaf9..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,24 +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 -pool.add_serialized_file(descriptor_data) - -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 d0c56927e4c0..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb +++ /dev/null @@ -1,28 +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 -pool.add_serialized_file(descriptor_data) - -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 98c499519688..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,22 +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 -pool.add_serialized_file(descriptor_data) - -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 1c1b2e5600fd..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb +++ /dev/null @@ -1,50 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 967f3a73832e..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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_scan_config parent: parent, scan_config: scan_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.start_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.stop_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_finding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_finding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_finding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_finding_type_stats({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_finding_type_stats parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 8d7b2344ec03..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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.stop_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.stop_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_finding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_finding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_finding_type_stats({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_finding_type_stats parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 8ade84c6e045..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 bb6157657854..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 ea2a952f4319..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb +++ /dev/null @@ -1,804 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 c95d43b8e04d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb +++ /dev/null @@ -1,733 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 58e6055652da..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb +++ /dev/null @@ -1,46 +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. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 0f90ae8cb19d..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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.create_execution({ parent: parent, execution: execution }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_execution name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_execution({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.cancel_execution({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.cancel_execution name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.cancel_execution({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 d372ed41a44a..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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 fdd0f2f49588..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 9d5c4fa29f8a..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 d4fb4d8aa377..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb +++ /dev/null @@ -1,791 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 240d00363b7a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb +++ /dev/null @@ -1,37 +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. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 578052bdc7b5..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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 2a49b1ac8710..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 6733ad725cad..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 63a66d7d6400..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb +++ /dev/null @@ -1,1076 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 f1ff4db6066f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 766c6a240c0e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb +++ /dev/null @@ -1,999 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 d1fc051655e0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, 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 0ccabf5cfd2d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb +++ /dev/null @@ -1,44 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 16718a9ef007..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 cf13cbce88dc..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workflow({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workflow name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 c48d4214d226..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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 2a111a564bdc..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 30b765800a41..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-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 5a3b0e5fa1ca..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 293530077430..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 ccbb62fed292..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +++ /dev/null @@ -1,884 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_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 7269c2d1da8f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 7b8323216f07..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb +++ /dev/null @@ -1,38 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 0f0081e8d9d0..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 fc962295d47a..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 0c4369c49b95..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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore b/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json deleted file mode 100644 index 93f834b12343..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "workloadmanager.googleapis.com", - "api_shortname": "workloadmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest", - "distribution_name": "google-cloud-workload_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "workloadmanager", - "name_pretty": "Workload Manager V1 API", - "product_documentation": "https://docs.cloud.google.com/workload-manager/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/workload-manager/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml deleted file mode 100644 index 0ebb64223e6c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workload_manager-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-workload_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts b/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts deleted file mode 100644 index e0b5e42eaf09..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workload Manager V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 2337734059a9..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workload_manager-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-workload_manager-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/workload_manager/v1" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workload_manager/v1" - -::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/workload_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/README.md b/owl-bot-staging/google-cloud-workload_manager-v1/README.md deleted file mode 100644 index 0789ec3bca6c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workload Manager V1 API - -Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. - -Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workload Manager V1 API. Most users should consider using -the main client gem, -[google-cloud-workload_manager](https://rubygems.org/gems/google-cloud-workload_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workload_manager-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/workloadmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workload_manager/v1" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new -request = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new # (request fields as keyword arguments...) -response = client.list_evaluations request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workload_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/workload-manager/docs) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/workload_manager/v1" -require "logger" - -client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workload_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workload_manager-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-workload_manager`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-workload_manager-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile b/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile deleted file mode 100644 index aed0a0615aca..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-workload_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workload_manager/v1/workload_manager/credentials" - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-workload_manager-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-workload_manager-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-workload_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workload_manager-v1" - header "google-cloud-workload_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workload_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workload_manager-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-workload_manager-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-workload_manager-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json deleted file mode 100644 index 856bd67ef541..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.workloadmanager.v1", - "libraryPackage": "::Google::Cloud::WorkloadManager::V1", - "services": { - "WorkloadManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client", - "rpcs": { - "ListEvaluations": { - "methods": [ - "list_evaluations" - ] - }, - "GetEvaluation": { - "methods": [ - "get_evaluation" - ] - }, - "CreateEvaluation": { - "methods": [ - "create_evaluation" - ] - }, - "UpdateEvaluation": { - "methods": [ - "update_evaluation" - ] - }, - "DeleteEvaluation": { - "methods": [ - "delete_evaluation" - ] - }, - "ListExecutions": { - "methods": [ - "list_executions" - ] - }, - "GetExecution": { - "methods": [ - "get_execution" - ] - }, - "RunEvaluation": { - "methods": [ - "run_evaluation" - ] - }, - "DeleteExecution": { - "methods": [ - "delete_execution" - ] - }, - "ListExecutionResults": { - "methods": [ - "list_execution_results" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "ListScannedResources": { - "methods": [ - "list_scanned_resources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec b/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec deleted file mode 100644 index 0a9c127541cd..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/google-cloud-workload_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workload_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workload_manager-v1" - gem.version = Google::Cloud::WorkloadManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. Note that google-cloud-workload_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workload_manager instead. See the readme for more details." - gem.summary = "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb deleted file mode 100644 index f9223fbaf153..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google-cloud-workload_manager-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/workload_manager/v1" diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb deleted file mode 100644 index 7db86331d30c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workload_manager/v1/workload_manager" -require "google/cloud/workload_manager/v1/version" - -module Google - module Cloud - module WorkloadManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workload_manager/v1" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workload_manager/v1" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/workload_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb deleted file mode 100644 index cf11c29b7951..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module WorkloadManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workload_manager/v1/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WorkloadManager"] - parent_config = while namespace.any? - parent_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-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb deleted file mode 100644 index 3704093c98dd..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workload_manager/v1/workload_manager/rest" -require "google/cloud/workload_manager/v1/bindings_override" -require "google/cloud/workload_manager/v1/version" - -module Google - module Cloud - module WorkloadManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workload_manager/v1/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb deleted file mode 100644 index 7ebe4521c164..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.rb deleted file mode 100644 index f0fd4e71a36c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager.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/workload_manager/v1/version" - -require "google/cloud/workload_manager/v1/workload_manager/credentials" -require "google/cloud/workload_manager/v1/workload_manager/paths" -require "google/cloud/workload_manager/v1/workload_manager/operations" -require "google/cloud/workload_manager/v1/workload_manager/client" -require "google/cloud/workload_manager/v1/workload_manager/rest" - -module Google - module Cloud - module WorkloadManager - module V1 - ## - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workload_manager/v1/workload_manager" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workload_manager/v1/workload_manager/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module WorkloadManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "workload_manager", "helpers.rb" -require "google/cloud/workload_manager/v1/workload_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb deleted file mode 100644 index 50a0dcbe1129..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/client.rb +++ /dev/null @@ -1,1774 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - ## - # Client for the WorkloadManager service. - # - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workload_manager_stub - - ## - # Configure the WorkloadManager Client class. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WorkloadManager clients - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WorkloadManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_evaluations.timeout = 60.0 - default_config.rpcs.list_evaluations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_evaluation.timeout = 60.0 - default_config.rpcs.get_evaluation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_evaluation.timeout = 60.0 - - default_config.rpcs.update_evaluation.timeout = 60.0 - - default_config.rpcs.delete_evaluation.timeout = 60.0 - - default_config.rpcs.list_executions.timeout = 60.0 - default_config.rpcs.list_executions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_execution.timeout = 60.0 - default_config.rpcs.get_execution.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.run_evaluation.timeout = 60.0 - - default_config.rpcs.delete_execution.timeout = 60.0 - - default_config.rpcs.list_execution_results.timeout = 60.0 - default_config.rpcs.list_execution_results.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 60.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_scanned_resources.timeout = 60.0 - default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workload_manager_stub.universe_domain - end - - ## - # Create a new WorkloadManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WorkloadManager 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/workloadmanager/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @workload_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @workload_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @workload_manager_stub.endpoint - config.universe_domain = @workload_manager_stub.universe_domain - config.logger = @workload_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.logger - end - - # Service calls - - ## - # Lists Evaluations in a given project and location. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEvaluationsRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter to be applied when listing the evaluation results. - # @param order_by [::String] - # Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :get_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Evaluation in a given project and location. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @param evaluation_id [::String] - # Required. Id of the requesting object. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :create_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.evaluation&.name - header_params["evaluation.name"] = request.evaluation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :update_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_evaluation(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-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/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :delete_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Executions in a given project and location. - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @workload_manager_stub.call_rpc :list_executions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_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 - - ## - # Gets details of a single Execution. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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) - # 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 resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @workload_manager_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 - - ## - # Creates a new Execution in a given project and location. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param execution_id [::String] - # Required. ID of the execution which will be created. - # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :run_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Execution. - # - # @overload delete_execution(request, options = nil) - # Pass arguments to `delete_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_execution(name: nil, request_id: nil) - # Pass arguments to `delete_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 resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - # - # # Call the delete_execution method. - # result = client.delete_execution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :delete_execution, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the result of a single evaluation. - # - # @overload list_execution_results(request, options = nil) - # Pass arguments to `list_execution_results` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_execution_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - # - # # Call the list_execution_results method. - # result = client.list_execution_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - # p item - # end - # - def list_execution_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_execution_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_execution_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_execution_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_execution_results, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules in a given project. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter based on primary_category, secondary_category. - # @param custom_rules_bucket [::String] - # The Cloud Storage bucket name for custom rules. - # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - # p result - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_rules, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all scanned resources for a single Execution. - # - # @overload list_scanned_resources(request, options = nil) - # Pass arguments to `list_scanned_resources` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent for ListScannedResourcesRequest. - # @param rule [::String] - # Rule name. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - # - # # Call the list_scanned_resources method. - # result = client.list_scanned_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - # p item - # end - # - def list_scanned_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scanned_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scanned_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.call_rpc :list_scanned_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the WorkloadManager API. - # - # This class represents the configuration for WorkloadManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_evaluations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the WorkloadManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `delete_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_execution - ## - # RPC-specific configuration for `list_execution_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_execution_results - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `list_scanned_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scanned_resources - - # @private - def initialize parent_rpcs = nil - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution - @delete_execution = ::Gapic::Config::Method.new delete_execution_config - list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results - @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources - @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb deleted file mode 100644 index 3a15fec5e622..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Credentials for the WorkloadManager 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb deleted file mode 100644 index fcc635313813..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::WorkloadManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb deleted file mode 100644 index d9be17987e55..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - # Path helper methods for the WorkloadManager 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 Evaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/evaluations/{evaluation}` - # - # @param project [String] - # @param location [String] - # @param evaluation [String] - # - # @return [::String] - def evaluation_path project:, location:, evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/evaluations/#{evaluation}" - end - - ## - # Create a fully-qualified Execution resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}` - # - # @param project [String] - # @param location [String] - # @param evaluation [String] - # @param execution [String] - # - # @return [::String] - def execution_path project:, location:, evaluation:, execution: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" - - "projects/#{project}/locations/#{location}/evaluations/#{evaluation}/executions/#{execution}" - 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-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb deleted file mode 100644 index 402e8abf697d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/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/workload_manager/v1/version" -require "google/cloud/workload_manager/v1/bindings_override" - -require "google/cloud/workload_manager/v1/workload_manager/credentials" -require "google/cloud/workload_manager/v1/workload_manager/paths" -require "google/cloud/workload_manager/v1/workload_manager/rest/operations" -require "google/cloud/workload_manager/v1/workload_manager/rest/client" - -module Google - module Cloud - module WorkloadManager - module V1 - ## - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workload_manager/v1/workload_manager/rest" - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - module WorkloadManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workload_manager/v1/workload_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb deleted file mode 100644 index 205758884d6f..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb +++ /dev/null @@ -1,1655 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - ## - # REST client for the WorkloadManager service. - # - # The Workload Manager provides various tools to deploy, validate and observe - # your workloads running on Google Cloud. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workload_manager_stub - - ## - # Configure the WorkloadManager Client class. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WorkloadManager clients - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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", "WorkloadManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_evaluations.timeout = 60.0 - default_config.rpcs.list_evaluations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_evaluation.timeout = 60.0 - default_config.rpcs.get_evaluation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_evaluation.timeout = 60.0 - - default_config.rpcs.update_evaluation.timeout = 60.0 - - default_config.rpcs.delete_evaluation.timeout = 60.0 - - default_config.rpcs.list_executions.timeout = 60.0 - default_config.rpcs.list_executions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_execution.timeout = 60.0 - default_config.rpcs.get_execution.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.run_evaluation.timeout = 60.0 - - default_config.rpcs.delete_execution.timeout = 60.0 - - default_config.rpcs.list_execution_results.timeout = 60.0 - default_config.rpcs.list_execution_results.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 60.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_scanned_resources.timeout = 60.0 - default_config.rpcs.list_scanned_resources.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 WorkloadManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.universe_domain - end - - ## - # Create a new WorkloadManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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 - - @workload_manager_stub = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workload_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @workload_manager_stub.endpoint - config.universe_domain = @workload_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workload_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::WorkloadManager::V1::WorkloadManager::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 - @workload_manager_stub.logger - end - - # Service calls - - ## - # Lists Evaluations in a given project and location. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEvaluationsRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter to be applied when listing the evaluation results. - # @param order_by [::String] - # Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_evaluations, "evaluations", request, result, 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 Evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.get_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Evaluation in a given project and location. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil, request_id: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @param evaluation_id [::String] - # Required. Id of the requesting object. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.create_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_evaluation(update_mask: nil, evaluation: nil, request_id: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @param evaluation [::Google::Cloud::WorkloadManager::V1::Evaluation, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.update_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_evaluation(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-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/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.delete_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Executions in a given project and location. - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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, 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. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @workload_manager_stub.list_executions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_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 - - ## - # Gets details of a single Execution. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::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) - # 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 resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::WorkloadManager::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::WorkloadManager::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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @workload_manager_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 - - ## - # Creates a new Execution in a given project and location. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_evaluation(name: nil, execution_id: nil, execution: nil, request_id: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @param execution_id [::String] - # Required. ID of the execution which will be created. - # @param execution [::Google::Cloud::WorkloadManager::V1::Execution, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.run_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Execution. - # - # @overload delete_execution(request, options = nil) - # Pass arguments to `delete_execution` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_execution(name: nil, request_id: nil) - # Pass arguments to `delete_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 resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - # - # # Call the delete_execution method. - # result = client.delete_execution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_execution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.delete_execution request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the result of a single evaluation. - # - # @overload list_execution_results(request, options = nil) - # Pass arguments to `list_execution_results` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_execution_results(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_execution_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - # - # # Call the list_execution_results method. - # result = client.list_execution_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - # p item - # end - # - def list_execution_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_execution_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_execution_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_execution_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_execution_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_execution_results, "execution_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules in a given project. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, custom_rules_bucket: nil, evaluation_type: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filter based on primary_category, secondary_category. - # @param custom_rules_bucket [::String] - # The Cloud Storage bucket name for custom rules. - # @param evaluation_type [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - # p result - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_rules request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all scanned resources for a single Execution. - # - # @overload list_scanned_resources(request, options = nil) - # Pass arguments to `list_scanned_resources` via a request object, either of type - # {::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scanned_resources(parent: nil, rule: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scanned_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent for ListScannedResourcesRequest. - # @param rule [::String] - # Rule name. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workload_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - # - # # Call the list_scanned_resources method. - # result = client.list_scanned_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - # p item - # end - # - def list_scanned_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scanned_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scanned_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scanned_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workload_manager_stub.list_scanned_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workload_manager_stub, :list_scanned_resources, "scanned_resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the WorkloadManager REST API. - # - # This class represents the configuration for WorkloadManager 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::WorkloadManager::V1::WorkloadManager::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_evaluations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_evaluations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 WorkloadManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `delete_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_execution - ## - # RPC-specific configuration for `list_execution_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_execution_results - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `list_scanned_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scanned_resources - - # @private - def initialize parent_rpcs = nil - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution - @delete_execution = ::Gapic::Config::Method.new delete_execution_config - list_execution_results_config = parent_rpcs.list_execution_results if parent_rpcs.respond_to? :list_execution_results - @list_execution_results = ::Gapic::Config::Method.new list_execution_results_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - list_scanned_resources_config = parent_rpcs.list_scanned_resources if parent_rpcs.respond_to? :list_scanned_resources - @list_scanned_resources = ::Gapic::Config::Method.new list_scanned_resources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb deleted file mode 100644 index f2106f7965b4..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workloadmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WorkloadManager 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 WorkloadManager 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WorkloadManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workloadmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb deleted file mode 100644 index d0a00c830b48..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb +++ /dev/null @@ -1,816 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workloadmanager/v1/service_pb" - -module Google - module Cloud - module WorkloadManager - module V1 - module WorkloadManager - module Rest - ## - # REST service stub for the WorkloadManager 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_evaluations REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse] - # A result object deserialized from the server's reply - def list_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # A result object deserialized from the server's reply - def get_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::Evaluation.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_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_executions REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::ListExecutionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 get_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::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::WorkloadManager::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 run_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_execution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_execution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_execution_results REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse] - # A result object deserialized from the server's reply - def list_execution_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_execution_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_execution_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_rules REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scanned_resources REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse] - # A result object deserialized from the server's reply - def list_scanned_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scanned_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_scanned_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.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_evaluations REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/evaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/evaluations", - body: "evaluation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{evaluation.name}", - body: "evaluation", - matches: [ - ["evaluation.name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_executions REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::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/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_evaluation REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}/executions:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_execution REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_execution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_execution_results REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_execution_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/results", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scanned_resources REST call - # - # @param request_pb [::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scanned_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scannedResources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb b/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb deleted file mode 100644 index 33d6b9a3ce93..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/lib/google/cloud/workloadmanager/v1/service_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workloadmanager/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/workloadmanager/v1/service.proto\x12\x1fgoogle.cloud.workloadmanager.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\"\xd0\x07\n\nEvaluation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12H\n\x0fresource_filter\x18\x03 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceFilter\x12\x12\n\nrule_names\x18\x04 \x03(\t\x12M\n\x0fresource_status\x18\x06 \x01(\x0b\x32/.google.cloud.workloadmanager.v1.ResourceStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.workloadmanager.v1.Evaluation.LabelsEntry\x12\x15\n\x08schedule\x18\n \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x0b \x01(\t\x12S\n\x0f\x65valuation_type\x18\x0c \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationType\x12X\n\x15\x62ig_query_destination\x18\r \x01(\x0b\x32\x34.google.cloud.workloadmanager.v1.BigQueryDestinationB\x03\xe0\x41\x01\x12:\n\x07kms_key\x18\x0f \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SAP\x10\x01\x12\x0e\n\nSQL_SERVER\x10\x02\x12\t\n\x05OTHER\x10\x03:\x8a\x01\xea\x41\x86\x01\n)workloadmanager.googleapis.com/Evaluation\x12@projects/{project}/locations/{location}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x0b\n\t_schedule\"\xa7\x02\n\x0eResourceFilter\x12\x0e\n\x06scopes\x18\x01 \x03(\t\x12\x1c\n\x14resource_id_patterns\x18\x02 \x03(\t\x12^\n\x10inclusion_labels\x18\x03 \x03(\x0b\x32\x44.google.cloud.workloadmanager.v1.ResourceFilter.InclusionLabelsEntry\x12O\n\x13gce_instance_filter\x18\x04 \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.GceInstanceFilter\x1a\x36\n\x14InclusionLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"-\n\x11GceInstanceFilter\x12\x18\n\x10service_accounts\x18\x04 \x03(\t\"\x9e\x01\n\x0eResourceStatus\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ResourceStatus.State\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\"^\n\x13\x42igQueryDestination\x12 \n\x13\x64\x65stination_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x63reate_new_results_table\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa4\x01\n\x16ListEvaluationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x89\x01\n\x17ListEvaluationsResponse\x12@\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x14GetEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\"\xd7\x01\n\x17\x43reateEvaluationRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)workloadmanager.googleapis.com/Evaluation\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x03 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x17UpdateEvaluationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\nevaluation\x18\x02 \x01(\x0b\x32+.google.cloud.workloadmanager.v1.EvaluationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17\x44\x65leteEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x0c\n\tExecution\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x37\n\x0einventory_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\x05state\x18\x05 \x01(\x0e\x32\x30.google.cloud.workloadmanager.v1.Execution.StateB\x03\xe0\x41\x03\x12\x1a\n\revaluation_id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.cloud.workloadmanager.v1.Execution.LabelsEntry\x12\x41\n\x08run_type\x18\x08 \x01(\x0e\x32/.google.cloud.workloadmanager.v1.Execution.Type\x12O\n\x0crule_results\x18\t \x03(\x0b\x32\x34.google.cloud.workloadmanager.v1.RuleExecutionResultB\x03\xe0\x41\x03\x12\x62\n\x15\x65xternal_data_sources\x18\n \x03(\x0b\x32>.google.cloud.workloadmanager.v1.Execution.ExternalDataSourcesB\x03\xe0\x41\x01\x12G\n\x07notices\x18\x0b \x03(\x0b\x32\x31.google.cloud.workloadmanager.v1.Execution.NoticeB\x03\xe0\x41\x03\x12\x46\n\x06\x65ngine\x18\x0c \x01(\x0e\x32\x31.google.cloud.workloadmanager.v1.Execution.EngineB\x03\xe0\x41\x01\x12O\n\x0eresult_summary\x18\r \x01(\x0b\x32\x32.google.cloud.workloadmanager.v1.Execution.SummaryB\x03\xe0\x41\x03\x1a\xde\x01\n\x13\x45xternalDataSources\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x04type\x18\x03 \x01(\x0e\x32\x43.google.cloud.workloadmanager.v1.Execution.ExternalDataSources.TypeB\x03\xe0\x41\x02\x12\x17\n\nasset_type\x18\x04 \x01(\tB\x03\xe0\x41\x02\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42IG_QUERY_TABLE\x10\x01\x1a\x1e\n\x06Notice\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1aS\n\x07Summary\x12\x15\n\x08\x66\x61ilures\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cnew_failures\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tnew_fixes\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"9\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_TIME\x10\x01\x12\r\n\tSCHEDULED\x10\x02\"<\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45NGINE_SCANNER\x10\x01\x12\x06\n\x02V2\x10\x02:\x9e\x01\xea\x41\x9a\x01\n(workloadmanager.googleapis.com/Execution\x12Wprojects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}*\nexecutions2\texecution\"\x93\x02\n\x13RuleExecutionResult\x12\x0c\n\x04rule\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.RuleExecutionResult.StateB\x03\xe0\x41\x03\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x14\n\x0cresult_count\x18\x04 \x01(\x03\x12\x1e\n\x16scanned_resource_count\x18\x05 \x01(\x03\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_SUCCESS\x10\x01\x12\x11\n\rSTATE_FAILURE\x10\x02\x12\x11\n\rSTATE_SKIPPED\x10\x03\"\xa2\x01\n\x15ListExecutionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(workloadmanager.googleapis.com/Execution\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x86\x01\n\x16ListExecutionsResponse\x12>\n\nexecutions\x18\x01 \x03(\x0b\x32*.google.cloud.workloadmanager.v1.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\"\xcf\x01\n\x14RunEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)workloadmanager.googleapis.com/Evaluation\x12\x19\n\x0c\x65xecution_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\texecution\x18\x03 \x01(\x0b\x32*.google.cloud.workloadmanager.v1.ExecutionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x16\x44\x65leteExecutionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(workloadmanager.googleapis.com/Execution\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"i\n\x1bListExecutionResultsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x84\x01\n\x1cListExecutionResultsResponse\x12K\n\x11\x65xecution_results\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ExecutionResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x03\n\x0f\x45xecutionResult\x12\x19\n\x11violation_message\x18\x01 \x01(\t\x12\x10\n\x08severity\x18\x02 \x01(\t\x12\x36\n\x04rule\x18\x03 \x01(\tB(\xfa\x41%\n#workloadmanager.googleapis.com/Rule\x12\x19\n\x11\x64ocumentation_url\x18\x04 \x01(\t\x12;\n\x08resource\x18\x05 \x01(\x0b\x32).google.cloud.workloadmanager.v1.Resource\x12L\n\x11violation_details\x18\x06 \x01(\x0b\x32\x31.google.cloud.workloadmanager.v1.ViolationDetails\x12:\n\x08\x63ommands\x18\x07 \x03(\x0b\x32(.google.cloud.workloadmanager.v1.Command\x12\x43\n\x04type\x18\x08 \x01(\x0e\x32\x35.google.cloud.workloadmanager.v1.ExecutionResult.Type\"@\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_PASSED\x10\x01\x12\x11\n\rTYPE_VIOLATED\x10\x02\"\xa9\x01\n\x07\x43ommand\x12\x46\n\ragent_command\x18\x01 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.AgentCommandH\x00\x12\x46\n\rshell_command\x18\x02 \x01(\x0b\x32-.google.cloud.workloadmanager.v1.ShellCommandH\x00\x42\x0e\n\x0c\x63ommand_type\"\xa5\x01\n\x0c\x41gentCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12Q\n\nparameters\x18\x02 \x03(\x0b\x32=.google.cloud.workloadmanager.v1.AgentCommand.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x0cShellCommand\x12\x0f\n\x07\x63ommand\x18\x01 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x02 \x01(\t\x12\x17\n\x0ftimeout_seconds\x18\x03 \x01(\x05\"\xa2\x01\n\nRuleOutput\x12N\n\x07\x64\x65tails\x18\x01 \x03(\x0b\x32\x38.google.cloud.workloadmanager.v1.RuleOutput.DetailsEntryB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x02\n\x10ViolationDetails\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x17\n\x0fservice_account\x18\x02 \x01(\t\x12Q\n\x08observed\x18\x03 \x03(\x0b\x32?.google.cloud.workloadmanager.v1.ViolationDetails.ObservedEntry\x12\x45\n\x0brule_output\x18\x04 \x03(\x0b\x32+.google.cloud.workloadmanager.v1.RuleOutputB\x03\xe0\x41\x03\x1a/\n\rObservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"?\n\x08Resource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x17\n\x0fservice_account\x18\x03 \x01(\t\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xed\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x18\n\x10primary_category\x18\x06 \x01(\t\x12\x1a\n\x12secondary_category\x18\x07 \x01(\t\x12\x15\n\rerror_message\x18\x08 \x01(\t\x12\x0b\n\x03uri\x18\t \x01(\t\x12\x13\n\x0bremediation\x18\n \x01(\t\x12\x0c\n\x04tags\x18\x0b \x03(\t\x12\x41\n\trule_type\x18\x0c \x01(\x0e\x32..google.cloud.workloadmanager.v1.Rule.RuleType\x12\x12\n\nasset_type\x18\r \x01(\t\"?\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42\x41SELINE\x10\x01\x12\n\n\x06\x43USTOM\x10\x02:k\xea\x41h\n#workloadmanager.googleapis.com/Rule\x12\x34projects/{project}/locations/{location}/rules/{rule}*\x05rules2\x04rule\"\xfd\x01\n\x10ListRulesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#workloadmanager.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x1b\n\x13\x63ustom_rules_bucket\x18\x05 \x01(\t\x12X\n\x0f\x65valuation_type\x18\x06 \x01(\x0e\x32:.google.cloud.workloadmanager.v1.Evaluation.EvaluationTypeB\x03\xe0\x41\x01\"I\n\x11ListRulesResponse\x12\x34\n\x05rules\x18\x01 \x03(\x0b\x32%.google.cloud.workloadmanager.v1.Rule\"\x89\x01\n\x1bListScannedResourcesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04rule\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x84\x01\n\x1cListScannedResourcesResponse\x12K\n\x11scanned_resources\x18\x01 \x03(\x0b\x32\x30.google.cloud.workloadmanager.v1.ScannedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"1\n\x0fScannedResource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t2\xb5\x15\n\x0fWorkloadManager\x12\xc6\x01\n\x0fListEvaluations\x12\x37.google.cloud.workloadmanager.v1.ListEvaluationsRequest\x1a\x38.google.cloud.workloadmanager.v1.ListEvaluationsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/evaluations\x12\xb3\x01\n\rGetEvaluation\x12\x35.google.cloud.workloadmanager.v1.GetEvaluationRequest\x1a+.google.cloud.workloadmanager.v1.Evaluation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/evaluations/*}\x12\xf5\x01\n\x10\x43reateEvaluation\x12\x38.google.cloud.workloadmanager.v1.CreateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x1fparent,evaluation,evaluation_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/evaluations:\nevaluation\x12\xf7\x01\n\x10UpdateEvaluation\x12\x38.google.cloud.workloadmanager.v1.UpdateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nEvaluation\x12\x11OperationMetadata\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{evaluation.name=projects/*/locations/*/evaluations/*}:\nevaluation\x12\xd8\x01\n\x10\x44\x65leteEvaluation\x12\x38.google.cloud.workloadmanager.v1.DeleteEvaluationRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/evaluations/*}\x12\xd0\x01\n\x0eListExecutions\x12\x36.google.cloud.workloadmanager.v1.ListExecutionsRequest\x1a\x37.google.cloud.workloadmanager.v1.ListExecutionsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12/v1/{name=projects/*/locations/*/evaluations/*}/executions:run:\x01*\x12\xe3\x01\n\x0f\x44\x65leteExecution\x12\x37.google.cloud.workloadmanager.v1.DeleteExecutionRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>*] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb deleted file mode 100644 index 29a56647dbcf..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/cloud/workloadmanager/v1/service.rb +++ /dev/null @@ -1,991 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WorkloadManager - module V1 - # Represents a Workload Manager Evaluation configuration. - # An Evaluation defines a set of rules to be validated against a scope - # of Cloud resources. - # @!attribute [rw] name - # @return [::String] - # Name of resource that has the form - # `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`. - # @!attribute [rw] description - # @return [::String] - # Description of the Evaluation. - # @!attribute [rw] resource_filter - # @return [::Google::Cloud::WorkloadManager::V1::ResourceFilter] - # Resource filter for an evaluation defining the scope of resources to be - # evaluated. - # @!attribute [rw] rule_names - # @return [::Array<::String>] - # The names of the rules used for this evaluation. - # @!attribute [r] resource_status - # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus] - # Output only. [Output only] The current lifecycle state of the evaluation - # resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] schedule - # @return [::String] - # Crontab format schedule for scheduled evaluation, currently only supports - # the following fixed schedules: - # * `0 */1 * * *` # Hourly - # * `0 */6 * * *` # Every 6 hours - # * `0 */12 * * *` # Every 12 hours - # * `0 0 */1 * *` # Daily - # * `0 0 */7 * *` # Weekly - # * `0 0 */14 * *` # Every 14 days - # * `0 0 1 */1 *` # Monthly - # @!attribute [rw] custom_rules_bucket - # @return [::String] - # The Cloud Storage bucket name for custom rules. - # @!attribute [rw] evaluation_type - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Evaluation type. - # @!attribute [rw] big_query_destination - # @return [::Google::Cloud::WorkloadManager::V1::BigQueryDestination] - # Optional. The BigQuery destination for detailed evaluation results. - # If this field is specified, the results of each evaluation execution are - # exported to BigQuery. - # @!attribute [rw] kms_key - # @return [::String] - # Optional. Immutable. Customer-managed encryption key name, in the format - # projects/*/locations/*/keyRings/*/cryptoKeys/*. - # The key will be used for CMEK encryption of the evaluation resource. - class Evaluation - 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 - - # Possible types of workload evaluations like SAP, SQL Server, etc. - module EvaluationType - # Not specified. - EVALUATION_TYPE_UNSPECIFIED = 0 - - # SAP best practices. - SAP = 1 - - # SQL best practices. - SQL_SERVER = 2 - - # Customized best practices. - OTHER = 3 - end - end - - # Resource filter for an evaluation defining the scope of resources to be - # evaluated. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of evaluation resource. - # Format: - # * `projects/{project_id}` - # * `folders/{folder_id}` - # * `organizations/{organization_id}` - # @!attribute [rw] resource_id_patterns - # @return [::Array<::String>] - # The pattern to filter resources by their id - # For example, a pattern of ".*prod-cluster.*" will match all resources that - # contain "prod-cluster" in their ID. - # @!attribute [rw] inclusion_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to filter resources by. Each key-value pair in the map must exist - # on the resource for it to be included (e.g. VM instance labels). - # For example, specifying `{ "env": "prod", "database": "nosql" }` will only - # include resources that have labels `env=prod` and `database=nosql`. - # @!attribute [rw] gce_instance_filter - # @return [::Google::Cloud::WorkloadManager::V1::GceInstanceFilter] - # Filter compute engine resources. - class ResourceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InclusionLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A filter for matching Compute Engine instances. - # @!attribute [rw] service_accounts - # @return [::Array<::String>] - # If non-empty, only Compute Engine instances associated with at least one of - # the provided service accounts will be included in the evaluation. - class GceInstanceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The lifecycle status of an Evaluation resource. - # @!attribute [rw] state - # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus::State] - # State of the Evaluation resource. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of an evaluation, such as CREATING, ACTIVE, and DELETING. - module State - # The state has not been populated in this message. - STATE_UNSPECIFIED = 0 - - # Resource has an active Create operation. - CREATING = 1 - - # Resource has no outstanding operations on it or has active Update - # operations. - ACTIVE = 2 - - # Resource has an active Delete operation. - DELETING = 3 - end - end - - # BigQuery destination for evaluation results. - # @!attribute [rw] destination_dataset - # @return [::String] - # Optional. Destination dataset to save evaluation results. - # @!attribute [rw] create_new_results_table - # @return [::Boolean] - # Optional. Determines if a new results table will be created when an - # Execution is created. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListEvaluations RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListEvaluationsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filter to be applied when listing the evaluation results. - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results. - class ListEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListEvaluations RPC. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Evaluation>] - # The list of evaluations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateEvaluation RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource prefix of the evaluation location using the form: - # `projects/{project_id}/locations/{location_id}`. - # @!attribute [rw] evaluation_id - # @return [::String] - # Required. Id of the requesting object. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateEvaluation RPC. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Evaluation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Followed the best practice from - # https://aip.dev/135#cascading-delete. - class DeleteEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution that represents a single run of an Evaluation. - # @!attribute [rw] name - # @return [::String] - # The name of execution resource. The format is - # projects/\\{project}/locations/\\{location}/evaluations/\\{evaluation}/executions/\\{execution}. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Start time stamp. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] End time stamp. - # @!attribute [r] inventory_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Inventory time stamp. - # @!attribute [r] state - # @return [::Google::Cloud::WorkloadManager::V1::Execution::State] - # Output only. [Output only] State. - # @!attribute [r] evaluation_id - # @return [::String] - # Output only. [Output only] Evaluation ID. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] run_type - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Type] - # Type which represents whether the execution executed directly by user or - # scheduled according to the `Evaluation.schedule` field. - # @!attribute [r] rule_results - # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleExecutionResult>] - # Output only. Execution result summary per rule. - # @!attribute [rw] external_data_sources - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources>] - # Optional. External data sources. - # @!attribute [r] notices - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::Notice>] - # Output only. Additional information generated by the execution. - # @!attribute [rw] engine - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Engine] - # Optional. Engine. - # @!attribute [r] result_summary - # @return [::Google::Cloud::WorkloadManager::V1::Execution::Summary] - # Output only. [Output only] Result summary for the execution. - class Execution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # External data sources for an execution. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of external data source. The name will be used inside the - # rego/sql to refer the external data. - # @!attribute [rw] uri - # @return [::String] - # Required. URI of external data source. example of bq table - # \\{project_ID}.\\{dataset_ID}.\\{table_ID}. - # @!attribute [rw] type - # @return [::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources::Type] - # Required. Type of external data source. - # @!attribute [rw] asset_type - # @return [::String] - # Required. The asset type of the external data source. - # This can be a supported Cloud Asset Inventory asset type - # (see https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # to override the default asset type, or it can be a custom type defined by - # the user. - class ExternalDataSources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of external data sources like BigQuery table, etc. - module Type - # Unknown type. - TYPE_UNSPECIFIED = 0 - - # BigQuery table. - BIG_QUERY_TABLE = 1 - end - end - - # Additional information generated by an execution. - # @!attribute [r] message - # @return [::String] - # Output only. Message of the notice. - class Notice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution summary. - # @!attribute [r] failures - # @return [::Integer] - # Output only. Number of failures. - # @!attribute [r] new_failures - # @return [::Integer] - # Output only. Number of new failures compared to the previous execution. - # @!attribute [r] new_fixes - # @return [::Integer] - # Output only. Number of new fixes compared to the previous execution. - class Summary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc. - module State - # State of execution is unspecified. - STATE_UNSPECIFIED = 0 - - # The execution is running in backend service. - RUNNING = 1 - - # The execution run succeeded. - SUCCEEDED = 2 - - # The execution run failed. - FAILED = 3 - end - - # The type of execution, could be on demand execute or scheduled execute. - module Type - # Type of execution is unspecified. - TYPE_UNSPECIFIED = 0 - - # Type of execution is one time. - ONE_TIME = 1 - - # Type of execution is scheduled. - SCHEDULED = 2 - end - - # The engine used for the execution. - module Engine - # The original CG. - ENGINE_UNSPECIFIED = 0 - - # SlimCG / Scanner. - ENGINE_SCANNER = 1 - - # Evaluation Engine V2. - V2 = 2 - end - end - - # Execution result summary per rule. - # @!attribute [rw] rule - # @return [::String] - # Rule name as plain text like `sap-hana-configured`. - # @!attribute [r] state - # @return [::Google::Cloud::WorkloadManager::V1::RuleExecutionResult::State] - # Output only. The execution status. - # @!attribute [rw] message - # @return [::String] - # Execution message, if any. - # @!attribute [rw] result_count - # @return [::Integer] - # Number of violations. - # @!attribute [rw] scanned_resource_count - # @return [::Integer] - # Number of total scanned resources. - class RuleExecutionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a rule execution like SUCCESS, FAILURE, etc. - module State - # Unknown state - STATE_UNSPECIFIED = 0 - - # Execution completed successfully - STATE_SUCCESS = 1 - - # Execution completed with failures - STATE_FAILURE = 2 - - # Execution was not executed - STATE_SKIPPED = 3 - end - end - - # Request message for the ListExecutions RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource prefix of the Execution using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - class ListExecutionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListExecutions RPC. - # @!attribute [rw] executions - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution>] - # The list of Execution. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListExecutionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetExecution RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RunEvaluation RPC. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Evaluation using the form: - # `projects/{project}/locations/{location}/evaluations/{evaluation}`. - # @!attribute [rw] execution_id - # @return [::String] - # Required. ID of the execution which will be created. - # @!attribute [rw] execution - # @return [::Google::Cloud::WorkloadManager::V1::Execution] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class RunEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteExecution RPC. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListExecutionResults RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The execution results. - # Format: \\{parent}/evaluations/*/executions/*/results. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - class ListExecutionResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListExecutionResults RPC. - # @!attribute [rw] execution_results - # @return [::Array<::Google::Cloud::WorkloadManager::V1::ExecutionResult>] - # The versions from the specified publisher. - # @!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 ListExecutionResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of an execution. - # @!attribute [rw] violation_message - # @return [::String] - # The violation message of an execution. - # @!attribute [rw] severity - # @return [::String] - # The severity of violation. - # @!attribute [rw] rule - # @return [::String] - # The rule that is violated in an evaluation. - # @!attribute [rw] documentation_url - # @return [::String] - # The URL for the documentation of the rule. - # @!attribute [rw] resource - # @return [::Google::Cloud::WorkloadManager::V1::Resource] - # The resource that violates the rule. - # @!attribute [rw] violation_details - # @return [::Google::Cloud::WorkloadManager::V1::ViolationDetails] - # The details of violation in an evaluation result. - # @!attribute [rw] commands - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Command>] - # The commands to remediate the violation. - # @!attribute [rw] type - # @return [::Google::Cloud::WorkloadManager::V1::ExecutionResult::Type] - # Execution result type of the scanned resource. - class ExecutionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum of execution result type. - module Type - # Unknown state. - TYPE_UNSPECIFIED = 0 - - # Resource successfully passed the rule. - TYPE_PASSED = 1 - - # Resource violated the rule. - TYPE_VIOLATED = 2 - end - end - - # Command specifies the type of command to execute. - # @!attribute [rw] agent_command - # @return [::Google::Cloud::WorkloadManager::V1::AgentCommand] - # AgentCommand specifies a one-time executable program for the agent to - # run. - # - # Note: The following fields are mutually exclusive: `agent_command`, `shell_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] shell_command - # @return [::Google::Cloud::WorkloadManager::V1::ShellCommand] - # ShellCommand is invoked via the agent's command line executor. - # - # Note: The following fields are mutually exclusive: `shell_command`, `agent_command`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Command - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AgentCommand specifies a one-time executable program for the agent to run. - # @!attribute [rw] command - # @return [::String] - # The name of the agent one-time executable that will be invoked. - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of key/value pairs that can be used to specify - # additional one-time executable settings. - class AgentCommand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A ShellCommand is invoked via the agent's command line executor. - # @!attribute [rw] command - # @return [::String] - # The name of the command to be executed. - # @!attribute [rw] args - # @return [::String] - # Arguments to be passed to the command. - # @!attribute [rw] timeout_seconds - # @return [::Integer] - # Optional. If not specified, the default timeout is 60 seconds. - class ShellCommand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule output of the violation. - # @!attribute [r] details - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Violation details generated by rule. - # @!attribute [r] message - # @return [::String] - # Output only. The message generated by rule. - class RuleOutput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DetailsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The violation in an evaluation result. - # @!attribute [rw] asset - # @return [::String] - # The name of the asset. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the resource. - # @!attribute [rw] observed - # @return [::Google::Protobuf::Map{::String => ::String}] - # Details of the violation. - # @!attribute [r] rule_output - # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleOutput>] - # Output only. The rule output of the violation. - class ViolationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ObservedEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource in execution result. - # @!attribute [rw] type - # @return [::String] - # The type of resource. - # @!attribute [rw] name - # @return [::String] - # The name of the resource. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the resource. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule to be evaluated. - # @!attribute [rw] name - # @return [::String] - # Rule name. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The version of the rule. - # @!attribute [rw] display_name - # @return [::String] - # The name display in UI. - # @!attribute [rw] description - # @return [::String] - # Describe rule in plain language. - # @!attribute [rw] severity - # @return [::String] - # The severity of the rule. - # @!attribute [rw] primary_category - # @return [::String] - # The primary category. - # @!attribute [rw] secondary_category - # @return [::String] - # The secondary category. - # @!attribute [rw] error_message - # @return [::String] - # The message template for rule. - # @!attribute [rw] uri - # @return [::String] - # The document url for the rule. - # @!attribute [rw] remediation - # @return [::String] - # The remediation for the rule. - # @!attribute [rw] tags - # @return [::Array<::String>] - # List of user-defined tags. - # @!attribute [rw] rule_type - # @return [::Google::Cloud::WorkloadManager::V1::Rule::RuleType] - # The type of the rule. - # @!attribute [rw] asset_type - # @return [::String] - # The CAI asset type of the rule is evaluating, for joined asset types, it - # will be the corresponding primary asset types. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the rule. - module RuleType - # Not specified. - RULE_TYPE_UNSPECIFIED = 0 - - # Baseline rules. - BASELINE = 1 - - # Custom rules. - CUSTOM = 2 - end - end - - # Request message for the ListRules RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. The [project] on which to execute the request. The format is: - # projects/\\{project_id}/locations/\\{location} - # Currently, the pre-defined rules are global available to all projects and - # all regions. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filter based on primary_category, secondary_category. - # @!attribute [rw] custom_rules_bucket - # @return [::String] - # The Cloud Storage bucket name for custom rules. - # @!attribute [rw] evaluation_type - # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType] - # Optional. The evaluation type of the rules will be applied to. - # The Cloud Storage bucket name for custom rules. - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListRules RPC. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::WorkloadManager::V1::Rule>] - # All rules in response. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListScannedResources RPC. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent for ListScannedResourcesRequest. - # @!attribute [rw] rule - # @return [::String] - # Rule name. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Field to sort by. See https://google.aip.dev/132#ordering for more details. - class ListScannedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListScannedResources RPC. - # @!attribute [rw] scanned_resources - # @return [::Array<::Google::Cloud::WorkloadManager::V1::ScannedResource>] - # All scanned resources in response. - # @!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 ListScannedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A scanned resource. - # @!attribute [rw] resource - # @return [::String] - # Resource name. - # @!attribute [rw] type - # @return [::String] - # Resource type. - class ScannedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile deleted file mode 100644 index 3f57a4f6919e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-workload_manager-v1", path: "../" -else - gem "google-cloud-workload_manager-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json deleted file mode 100644 index c3535bc37380..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/snippet_metadata_google.cloud.workloadmanager.v1.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workload_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workloadmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync", - "title": "Snippet for the list_evaluations call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations.", - "file": "workload_manager/list_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluations", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListEvaluations", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListEvaluations", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync", - "title": "Snippet for the get_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation.", - "file": "workload_manager/get_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::Evaluation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "GetEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync", - "title": "Snippet for the create_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation.", - "file": "workload_manager/create_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "CreateEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.CreateEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync", - "title": "Snippet for the update_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation.", - "file": "workload_manager/update_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "UpdateEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.UpdateEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync", - "title": "Snippet for the delete_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation.", - "file": "workload_manager/delete_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "DeleteEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync", - "title": "Snippet for the list_executions call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions.", - "file": "workload_manager/list_executions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_executions", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListExecutions", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutions", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_GetExecution_sync", - "title": "Snippet for the get_execution call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution.", - "file": "workload_manager/get_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_execution", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::GetExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::Execution", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "GetExecution", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.GetExecution", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync", - "title": "Snippet for the run_evaluation call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation.", - "file": "workload_manager/run_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_evaluation", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "RunEvaluation", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.RunEvaluation", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync", - "title": "Snippet for the delete_execution call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution.", - "file": "workload_manager/delete_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_execution", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "DeleteExecution", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.DeleteExecution", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync", - "title": "Snippet for the list_execution_results call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results.", - "file": "workload_manager/list_execution_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_execution_results", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListExecutionResults", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListExecutionResults", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListRules_sync", - "title": "Snippet for the list_rules call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules.", - "file": "workload_manager/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListRulesResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListRules", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync", - "title": "Snippet for the list_scanned_resources call in the WorkloadManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources.", - "file": "workload_manager/list_scanned_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scanned_resources", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse", - "client": { - "short_name": "WorkloadManager::Client", - "full_name": "::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client" - }, - "method": { - "short_name": "ListScannedResources", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager.ListScannedResources", - "service": { - "short_name": "WorkloadManager", - "full_name": "google.cloud.workloadmanager.v1.WorkloadManager" - } - } - }, - "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-workload_manager-v1/snippets/workload_manager/create_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb deleted file mode 100644 index 1aece099b45d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/create_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the create_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#create_evaluation. -# -def create_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new - - # Call the create_evaluation method. - result = client.create_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_CreateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb deleted file mode 100644 index 2f6820fedd08..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the delete_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_evaluation. -# -def delete_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new - - # Call the delete_evaluation method. - result = client.delete_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_DeleteEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb deleted file mode 100644 index a2da1aba213e..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/delete_execution.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the delete_execution call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#delete_execution. -# -def delete_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new - - # Call the delete_execution method. - result = client.delete_execution request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_DeleteExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb deleted file mode 100644 index ccff71e21d6a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the get_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_evaluation. -# -def get_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new - - # Call the get_evaluation method. - result = client.get_evaluation request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::Evaluation. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_GetEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/get_execution.rb deleted file mode 100644 index 27bb4d344b9d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the get_execution call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#get_execution. -# -def get_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new - - # Call the get_execution method. - result = client.get_execution request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::Execution. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb deleted file mode 100644 index 68603a1e8d5d..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_evaluations call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_evaluations. -# -def list_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new - - # Call the list_evaluations method. - result = client.list_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::Evaluation. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb deleted file mode 100644 index 51f4ecec13ca..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_execution_results.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_execution_results call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_execution_results. -# -def list_execution_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new - - # Call the list_execution_results method. - result = client.list_execution_results request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::ExecutionResult. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListExecutionResults_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_executions.rb deleted file mode 100644 index ad283aac7f33..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/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 workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_executions call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_executions. -# -def list_executions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::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::WorkloadManager::V1::Execution. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb deleted file mode 100644 index 39185ada886f..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_rules.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListRules_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_rules call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules request - - # The returned object is of type Google::Cloud::WorkloadManager::V1::ListRulesResponse. - p result -end -# [END workloadmanager_v1_generated_WorkloadManager_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb deleted file mode 100644 index bdf68829dd9a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/list_scanned_resources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the list_scanned_resources call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#list_scanned_resources. -# -def list_scanned_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new - - # Call the list_scanned_resources method. - result = client.list_scanned_resources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WorkloadManager::V1::ScannedResource. - p item - end -end -# [END workloadmanager_v1_generated_WorkloadManager_ListScannedResources_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb deleted file mode 100644 index 7ebbf41e7974..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/run_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the run_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#run_evaluation. -# -def run_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new - - # Call the run_evaluation method. - result = client.run_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_RunEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb b/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb deleted file mode 100644 index 5ba82a6abaec..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/snippets/workload_manager/update_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] -require "google/cloud/workload_manager/v1" - -## -# Snippet for the update_evaluation call in the WorkloadManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WorkloadManager::V1::WorkloadManager::Client#update_evaluation. -# -def update_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new - - # Call the update_evaluation method. - result = client.update_evaluation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workloadmanager_v1_generated_WorkloadManager_UpdateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb deleted file mode 100644 index 728a1dca8d8c..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workloadmanager/v1/service_services_pb" -require "google/cloud/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_paths_test.rb deleted file mode 100644 index 1bce9f8de208..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_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/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_path project: "value0", location: "value1", evaluation: "value2" - assert_equal "projects/value0/locations/value1/evaluations/value2", path - 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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.execution_path project: "value0", location: "value1", evaluation: "value2", execution: "value3" - assert_equal "projects/value0/locations/value1/evaluations/value2/executions/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb deleted file mode 100644 index 6e2379af24a6..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_rest_test.rb +++ /dev/null @@ -1,779 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager/rest" - - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new - http_response = OpenStruct.new 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_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_count - end - end - end - - def test_get_evaluation - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::Evaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_client_stub.call_count - end - end - end - - def test_create_evaluation - # Create test objects. - 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" - evaluation_id = "hello world" - evaluation = {} - request_id = "hello world" - - create_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_create_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_count - end - end - end - - def test_update_evaluation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - evaluation = {} - request_id = "hello world" - - update_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_update_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_count - end - end - end - - def test_delete_evaluation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_evaluation name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_evaluation({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_count - end - end - end - - def test_list_executions - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::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" - 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_executions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_executions_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_count - end - end - end - - def test_get_execution - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::Execution.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - 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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_get_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_execution({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_execution name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_execution({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation - # Create test objects. - 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" - execution_id = "hello world" - execution = {} - request_id = "hello world" - - run_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_run_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_evaluation_client_stub.call_count - end - end - end - - def test_delete_execution - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_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::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_delete_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_execution({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_execution name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_execution({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_execution_client_stub.call_count - end - end - end - - def test_list_execution_results - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_execution_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_execution_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_execution_results_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_execution_results_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - custom_rules_bucket = "hello world" - evaluation_type = :EVALUATION_TYPE_UNSPECIFIED - - list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_list_scanned_resources - # Create test objects. - client_result = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_scanned_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::ServiceStub.stub :transcode_list_scanned_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scanned_resources_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb deleted file mode 100644 index bbb1a73f506a..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/google/cloud/workload_manager/v1/workload_manager_test.rb +++ /dev/null @@ -1,923 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workloadmanager/v1/service_pb" -require "google/cloud/workload_manager/v1/workload_manager" - -class ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluations, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest, 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_evaluations_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_evaluations ::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_evaluations(::Google::Cloud::WorkloadManager::V1::ListEvaluationsRequest.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_evaluations_client_stub.call_rpc_count - end - end - - def test_get_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::Evaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_evaluation ::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_evaluation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_evaluation(::Google::Cloud::WorkloadManager::V1::GetEvaluationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_evaluation_client_stub.call_rpc_count - end - end - - def test_create_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - evaluation_id = "hello world" - evaluation = {} - request_id = "hello world" - - create_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["evaluation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_evaluation ::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_evaluation(::Google::Cloud::WorkloadManager::V1::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_rpc_count - end - end - - def test_update_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - evaluation = {} - request_id = "hello world" - - update_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Evaluation), request["evaluation"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_evaluation update_mask: update_mask, evaluation: evaluation, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_evaluation ::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_evaluation({ update_mask: update_mask, evaluation: evaluation, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_evaluation(::Google::Cloud::WorkloadManager::V1::UpdateEvaluationRequest.new(update_mask: update_mask, evaluation: evaluation, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_rpc_count - end - end - - def test_delete_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_evaluation({ name: name, request_id: request_id, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_evaluation name: name, request_id: request_id, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_evaluation ::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_evaluation({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_evaluation(::Google::Cloud::WorkloadManager::V1::DeleteEvaluationRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_rpc_count - end - end - - def test_list_executions - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::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" - 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::WorkloadManager::V1::ListExecutionsRequest, 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_executions_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_executions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_executions ::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_executions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_executions(::Google::Cloud::WorkloadManager::V1::ListExecutionsRequest.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_executions_client_stub.call_rpc_count - end - end - - def test_get_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::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" - - get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_execution, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_execution ::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_execution({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_execution(::Google::Cloud::WorkloadManager::V1::GetExecutionRequest.new(name: name), 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_run_evaluation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - execution_id = "hello world" - execution = {} - request_id = "hello world" - - run_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_evaluation, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["execution_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WorkloadManager::V1::Execution), request["execution"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_evaluation_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.run_evaluation name: name, execution_id: execution_id, execution: execution, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.run_evaluation ::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.run_evaluation({ name: name, execution_id: execution_id, execution: execution, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.run_evaluation(::Google::Cloud::WorkloadManager::V1::RunEvaluationRequest.new(name: name, execution_id: execution_id, execution: execution, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_evaluation_client_stub.call_rpc_count - end - end - - def test_delete_execution - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_execution, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_execution_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_execution({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_execution name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_execution ::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_execution({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_execution(::Google::Cloud::WorkloadManager::V1::DeleteExecutionRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_execution_client_stub.call_rpc_count - end - end - - def test_list_execution_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_execution_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_execution_results, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_execution_results_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_execution_results parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_execution_results ::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_execution_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_execution_results(::Google::Cloud::WorkloadManager::V1::ListExecutionResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_execution_results_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - custom_rules_bucket = "hello world" - evaluation_type = :EVALUATION_TYPE_UNSPECIFIED - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListRulesRequest, 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["custom_rules_bucket"] - assert_equal :EVALUATION_TYPE_UNSPECIFIED, request["evaluation_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_rules parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_rules ::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_rules({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_rules(::Google::Cloud::WorkloadManager::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, custom_rules_bucket: custom_rules_bucket, evaluation_type: evaluation_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_rpc_count - end - end - - def test_list_scanned_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_scanned_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scanned_resources, name - assert_kind_of ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rule"] - 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_scanned_resources_client_stub do - # Create client - c = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_scanned_resources parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_scanned_resources ::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_scanned_resources({ parent: parent, rule: rule, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_scanned_resources(::Google::Cloud::WorkloadManager::V1::ListScannedResourcesRequest.new(parent: parent, rule: rule, 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_scanned_resources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::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::WorkloadManager::V1::WorkloadManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::WorkloadManager::V1::WorkloadManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workload_manager-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.gitignore b/owl-bot-staging/google-cloud-workstations-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 6db623fc6fde..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 58a485375923..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-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 85f95a678c11..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ /dev/null @@ -1,2620 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 2087f38ccf61..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 aa208259fcfa..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ /dev/null @@ -1,2445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 c6115b5ff1ff..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 67ef7e156c15..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb +++ /dev/null @@ -1,85 +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/field_info_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\x1bgoogle/api/field_info.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\"\xf1\x0c\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12Y\n\rdomain_config\x18\x11 \x01(\x0b\x32=.google.cloud.workstations.v1.WorkstationCluster.DomainConfigB\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\x12S\n\x04tags\x18\x14 \x03(\x0b\x32:.google.cloud.workstations.v1.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12[\n\x0egateway_config\x18\x15 \x01(\x0b\x32>.google.cloud.workstations.v1.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\xea*\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12\x66\n\x15\x65phemeral_directories\x18\x16 \x03(\x0b\x32\x42.google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectoryB\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\x12\x1f\n\x12\x65nable_audit_agent\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\rallowed_ports\x18\x19 \x03(\x0b\x32\x39.google.cloud.workstations.v1.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x1a\x85\x0e\n\x04Host\x12X\n\x0cgce_instance\x18\x01 \x01(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstanceH\x00\x1a\x98\r\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\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12h\n\rboost_configs\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x07vm_tags\x18\x0e \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12v\n\x11instance_metadata\x18\x1b \x03(\x0b\x32V.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x85\x02\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12g\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32L.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xe3\x08\n\x13PersistentDirectory\x12o\n\x06gce_pd\x18\x02 \x01(\x0b\x32].google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12z\n\x06gce_hd\x18\x03 \x01(\x0b\x32h.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa4\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x8c\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x93\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32v.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\xa5\x02\n\x12\x45phemeralDirectory\x12\x66\n\x06gce_pd\x18\x03 \x01(\x0b\x32T.google.cloud.workstations.v1.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\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\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\x9b\r\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12m\n\x16persistent_directories\x18\x19 \x03(\x0b\x32H.google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectoryB\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\x12\x44\n\x03\x65nv\x18\x0c \x03(\x0b\x32\x32.google.cloud.workstations.v1.Workstation.EnvEntryB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12S\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x35.google.cloud.workstations.v1.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd1\x01\n\x0bRuntimeHost\x12\x62\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32\x45.google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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 -pool.add_serialized_file(descriptor_data) - -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 - WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.DomainConfig").msgclass - WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.GatewayConfig").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::Host::GceInstance::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.Accelerator").msgclass - WorkstationConfig::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.BoostConfig").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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass - WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicy").enummodule - WorkstationConfig::EphemeralDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory").msgclass - WorkstationConfig::EphemeralDirectory::GcePersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.EphemeralDirectory.GcePersistentDisk").msgclass - 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 - WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PortRange").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation").msgclass - Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.WorkstationPersistentDirectory").msgclass - Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost").msgclass - Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.RuntimeHost.GceInstanceHost").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 792cd03236da..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb +++ /dev/null @@ -1,88 +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 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - 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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 6047b249e889..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb +++ /dev/null @@ -1,1678 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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] - # Identifier. 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 [rw] domain_config - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::DomainConfig] - # Optional. Configuration options for a custom domain. - # @!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. The - # {::Google::Cloud::Workstations::V1::WorkstationCluster#conditions conditions} - # field contains detailed information about the status of the cluster. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - # @!attribute [rw] gateway_config - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::GatewayConfig] - # Optional. Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] workstation_authorization_url - # @return [::String] - # Optional. Specifies the redirect URL for unauthorized requests received by - # workstation VMs in this cluster. - # - # Redirects to this endpoint will send a base64 encoded `state` query param - # containing the target workstation name and original request hostname. The - # endpoint is responsible for retrieving a token using `GenerateAccessToken` - # and redirecting back to the original hostname with the token. - # @!attribute [rw] workstation_launch_url - # @return [::String] - # Optional. Specifies the launch URL for workstations in this cluster. - # Requests sent to unstarted workstations will be redirected to this URL. - # - # Requests redirected to the launch endpoint will be sent with a - # `workstation` and `project` query parameter containing the full workstation - # resource name and project ID, respectively. The launch endpoint is - # responsible for starting the workstation, polling it until it reaches - # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. - 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 attachment 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 - - # Configuration options for a custom domain. - # @!attribute [rw] domain - # @return [::String] - # Immutable. Domain used by Workstations for HTTP ingress. - class DomainConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] http2_enabled - # @return [::Boolean] - # Optional. Whether HTTP/2 is enabled for this workstation cluster. - # Defaults to false. - class GatewayConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - 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] - # Identifier. 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] max_usable_workstations - # @return [::Integer] - # Optional. Maximum number of workstations under this configuration a user - # can have `workstations.workstation.use` permission on. - # - # Only enforced on CreateWorkstation API calls on the user issuing the API - # request. Can be overridden by: - # - # - granting a user - # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, - # or - # - having a user with that permission create a workstation and - # granting another user `workstations.workstation.use` permission on - # that workstation. - # - # If not specified, defaults to `0`, which indicates unlimited. - # @!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] ephemeral_directories - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory>] - # Optional. Ephemeral directories which won't 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 workstation configuration is in degraded mode, in - # which case it may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1::WorkstationConfig#conditions conditions} - # field contains detailed information about the status of the configuration. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation configuration's - # current state. - # @!attribute [rw] enable_audit_agent - # @return [::Boolean] - # Optional. Whether to enable Linux `auditd` logging on the workstation. When - # enabled, a - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#service_account service_account} - # must also be specified that has `roles/logging.logWriter` and - # `roles/monitoring.metricWriter` on the project. Operating system audit - # logging is distinct from [Cloud Audit - # Logs](https://cloud.google.com/workstations/docs/audit-logging) and - # [Container output - # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). - # Operating system audit logs are available in the - # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: - # - # resource.type="gce_instance" - # log_name:"/logs/linux-auditd" - # @!attribute [rw] disable_tcp_connections - # @return [::Boolean] - # Optional. Disables support for plain TCP connections in the workstation. - # By default the service supports TCP connections through a websocket relay. - # Setting this option to true disables that relay, which prevents the usage - # of services that require plain TCP connections, such as SSH. - # When enabled, all communication must occur over HTTPS or WSS. - # @!attribute [rw] allowed_ports - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange>] - # Optional. A list of - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange PortRange}s - # specifying single ports or ranges of ports that are externally accessible - # in the workstation. Allowed ports must be one of 22, 80, or within range - # 1024-65535. If not specified defaults to ports 22, 80, and ports - # 1024-65535. - # @!attribute [rw] grant_workstation_admin_role_on_create - # @return [::Boolean] - # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` - # role along with `roles/workstations.user` role on the workstation created - # by them. This allows workstation users to share access to either their - # entire workstation, or individual ports. Defaults to false. - 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 `logging.logEntries.create` and - # `monitoring.timeSeries.create` permissions on the project so it can - # write logs out to Cloud Logging. If using a custom container image, the - # service account must have [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # permission 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}. - # 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 using this workstation configuration. - # - # Defaults to false. - # - # 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. - # @!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. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] - # Optional. A list of the type and count of accelerator cards attached to - # the instance. - # @!attribute [rw] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig>] - # Optional. A list of the boost configurations that workstations created - # using this workstation configuration are allowed to use. If specified, - # users will have the option to choose from the list of boost configs - # when starting a workstation. - # @!attribute [rw] disable_ssh - # @return [::Boolean] - # Optional. Whether to disable SSH access to the VM. - # @!attribute [rw] vm_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to this instance. - # Tag keys and values have the same definition as [resource manager - # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). - # Keys must be in the format `tagKeys/{tag_key_id}`, and - # values are in the format `tagValues/456`. - # @!attribute [rw] startup_script_uri - # @return [::String] - # Optional. Link to the startup script stored in Cloud Storage. This - # script will be run on the host workstation VM when the VM is created. - # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If - # specifying a startup script, the service account must have [Permission - # to access the bucket and script file in Cloud - # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). - # Otherwise, the script must be publicly accessible. - # Note that the service regularly updates the OS version of the host VM, - # and it is the responsibility of the user to ensure the script stays - # compatible with the OS version. - # @!attribute [rw] instance_metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Custom metadata to apply to Compute Engine instances. - 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 - - # A boost configuration is a set of resources that a workstation can use - # to increase its performance. If you specify a boost configuration, upon - # startup, workstation users can choose to use a VM provisioned under the - # boost config by passing the boost config ID in the start request. If - # the workstation user does not provide a boost config ID in the start - # request, the system will choose a VM from the pool provisioned under - # the default config. - # @!attribute [rw] id - # @return [::String] - # Required. The ID to be used for the boost configuration. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine that boosted VM instances will use—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). - # Defaults to `e2-standard-4`. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::Accelerator>] - # Optional. A list of the type and count of accelerator cards attached - # to the boost instance. Defaults to `none`. - # @!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] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on boosted Cloud - # Workstations VMs running using this boost configuration. - # - # Defaults to false. - # - # 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 - # boost configurations that specify a - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} - # in the N1 or N2 machine series. - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of boost VMs that the system should keep idle so - # that workstations can be boosted quickly. Defaults to `0`. - class BoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VmTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InstanceMetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. Updates to this field - # will not update existing workstations and will only take effect on new - # workstations. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # - # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gce_hd - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] - # A PersistentDirectory backed by a Compute Engine hyperdisk high - # availability disk. - # - # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!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 Persistent Directory 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] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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. Must be formatted as ext4 file system with no - # partitions. - # @!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`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - 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 - - # A Persistent Directory backed by a Compute Engine - # [Hyperdisk Balanced High Availability - # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). - # This is a high-availability block storage solution that offers a balance - # between performance and cost for most general-purpose workloads. - # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. - # @!attribute [rw] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} - # must be empty. Must be formatted as ext4 file system with no - # partitions. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - class GceHyperdiskBalancedHighAvailability - 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::V1::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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # is set. Must be empty if - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} - # is false. Updating - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, see - # [the filesystems available in Container-Optimized - # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # is set. Updating - # {::Google::Cloud::Workstations::V1::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, please - # refer to the [COS - # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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::V1::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. - # If using a custom container image, the service account must have - # [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # 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 - - # A PortRange defines a range of ports. Both - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} are - # inclusive. - # To specify a single port, both - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#first first} and - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PortRange#last last} - # should be the same. - # @!attribute [rw] first - # @return [::Integer] - # Required. Starting port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - # @!attribute [rw] last - # @return [::Integer] - # Required. Ending port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - class PortRange - 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] - # Identifier. 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 [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1::Workstation::WorkstationPersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!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}`. - # @!attribute [rw] env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Environment variables passed to the workstation container's - # entrypoint. - # @!attribute [r] kms_key - # @return [::String] - # Output only. The name of the Google Cloud KMS encryption key used to - # encrypt this workstation. The KMS key can only be configured in the - # WorkstationConfig. The expected format is - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [rw] source_workstation - # @return [::String] - # Optional. The source workstation from which this workstation's persistent - # directories were cloned on creation. - # @!attribute [r] runtime_host - # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost] - # Optional. Output only. Runtime host for the workstation when in - # STATE_RUNNING. - class Workstation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A directory to persist across workstation sessions. Updates to this field - # will only take effect on this workstation after it is restarted. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. The mount path of the persistent directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. Size of the persistent directory in GB. If specified in an - # update request, this is the desired size of the directory. - class WorkstationPersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Runtime host for the workstation. - # @!attribute [rw] gce_instance_host - # @return [::Google::Cloud::Workstations::V1::Workstation::RuntimeHost::GceInstanceHost] - # Specifies a Compute Engine instance as the host. - class RuntimeHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Compute Engine instance host. - # @!attribute [r] name - # @return [::String] - # Optional. Output only. The name of the Compute Engine instance. - # @!attribute [r] id - # @return [::String] - # Optional. Output only. The ID of the Compute Engine instance. - # @!attribute [r] zone - # @return [::String] - # Optional. Output only. The zone of the Compute Engine instance. - class GceInstanceHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - 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 - - # @!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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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 result, 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. Workstation configuration to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. - # @!attribute [rw] boost_config - # @return [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - 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 result, 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. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 52bdf0f508ad..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 - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 cc8f0344b566..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb +++ /dev/null @@ -1,1225 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - boost_config = "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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - port = 42 - - 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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 545fb10d714e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb +++ /dev/null @@ -1,1451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstations_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - boost_config = "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"] - assert_equal "hello world", request["boost_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, 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 - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - port = 42 - - 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"] - assert_equal 42, request["port"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 4f31bc6c1e9e..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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 141653bdb44a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.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" - ] - }, - "PushCredentials": { - "methods": [ - "push_credentials" - ] - } - } - } - } - } - } -} 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 b0bd3f899607..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-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 7aa5892babd9..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ /dev/null @@ -1,2728 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # - # @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 - - ## - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - # - # @overload push_credentials(request, options = nil) - # Pass arguments to `push_credentials` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload push_credentials(workstation: nil, application_default_credentials: nil) - # Pass arguments to `push_credentials` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::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::PushCredentialsRequest.new - # - # # Call the push_credentials method. - # result = client.push_credentials request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def push_credentials request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.push_credentials.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"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.push_credentials.timeout, - metadata: metadata, - retry_policy: @config.rpcs.push_credentials.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :push_credentials, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 - ## - # RPC-specific configuration for `push_credentials` - # @return [::Gapic::Config::Method] - # - attr_reader :push_credentials - - # @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 - push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials - @push_credentials = ::Gapic::Config::Method.new push_credentials_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 620b2be83356..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 c39d1909ad91..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ /dev/null @@ -1,2546 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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 result, 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. Workstation configuration to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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, filter: 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. - # @param filter [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - # @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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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, boost_config: 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 result, 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. - # @param boost_config [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/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 result, 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - # - # @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, port: 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. - # @param port [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - # @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 - - ## - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - # - # @overload push_credentials(request, options = nil) - # Pass arguments to `push_credentials` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::PushCredentialsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload push_credentials(workstation: nil, application_default_credentials: nil) - # Pass arguments to `push_credentials` via keyword arguments. Note that at - # least one keyword argument is 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 [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @param application_default_credentials [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken, ::Hash] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @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::PushCredentialsRequest.new - # - # # Call the push_credentials method. - # result = client.push_credentials request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def push_credentials request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.push_credentials.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"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.push_credentials.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.push_credentials.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.push_credentials request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_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 - ## - # RPC-specific configuration for `push_credentials` - # @return [::Gapic::Config::Method] - # - attr_reader :push_credentials - - # @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 - push_credentials_config = parent_rpcs.push_credentials if parent_rpcs.respond_to? :push_credentials - @push_credentials = ::Gapic::Config::Method.new push_credentials_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 a100147caf77..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-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 1af97769fe62..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +++ /dev/null @@ -1,1372 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 - - ## - # Baseline implementation for the push_credentials REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def push_credentials request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_push_credentials_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "push_credentials", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_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 - - ## - # @private - # - # GRPC transcoding helper method for the push_credentials REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_push_credentials_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{workstation}:pushCredentials", - 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 7c7e03bcb3f3..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb +++ /dev/null @@ -1,92 +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/field_info_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\x1bgoogle/api/field_info.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\"\xc1\r\n\x12WorkstationCluster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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]\n\rdomain_config\x18\x11 \x01(\x0b\x32\x41.google.cloud.workstations.v1beta.WorkstationCluster.DomainConfigB\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\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x04tags\x18\x14 \x03(\x0b\x32>.google.cloud.workstations.v1beta.WorkstationCluster.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12_\n\x0egateway_config\x18\x15 \x01(\x0b\x32\x42.google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfigB\x03\xe0\x41\x01\x12*\n\x1dworkstation_authorization_url\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workstation_launch_url\x18\x17 \x01(\tB\x03\xe0\x41\x01\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#\n\x0c\x44omainConfig\x12\x13\n\x06\x64omain\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a+\n\rGatewayConfig\x12\x1a\n\rhttp2_enabled\x18\x01 \x01(\x08\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\x1a+\n\tTagsEntry\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\"\x9d\x32\n\x11WorkstationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12$\n\x17max_usable_workstations\x18\x1c \x01(\x05\x42\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\x12Z\n\x0chttp_options\x18\x15 \x01(\x0b\x32?.google.cloud.workstations.v1beta.WorkstationConfig.HttpOptionsB\x03\xe0\x41\x01\x12$\n\x17\x64isable_tcp_connections\x18\x18 \x01(\x08\x42\x03\xe0\x41\x01\x12Y\n\rallowed_ports\x18\x19 \x03(\x0b\x32=.google.cloud.workstations.v1beta.WorkstationConfig.PortRangeB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x33\n&grant_workstation_admin_role_on_create\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_pushing_credentials\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x1a\xc6\x12\n\x04Host\x12\\\n\x0cgce_instance\x18\x01 \x01(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstanceH\x00\x1a\xd5\x11\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\x12l\n\rboost_configs\x18\x19 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfigB\x03\xe0\x41\x01\x12\x18\n\x0b\x64isable_ssh\x18\r \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x07vm_tags\x18\x0e \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.VmTagsEntryB\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x0f \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x12\x1f\n\x12startup_script_uri\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12z\n\x11instance_metadata\x18\x1b \x03(\x0b\x32Z.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.InstanceMetadataEntryB\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\x1a\x86\x03\n\x0b\x42oostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cmachine_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12k\n\x0c\x61\x63\x63\x65lerators\x18\x03 \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12{\n\x14reservation_affinity\x18\x06 \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinityB\x03\xe0\x41\x01\x1a\xa4\x02\n\x13ReservationAffinity\x12\x84\x01\n\x18\x63onsume_reservation_type\x18\x01 \x01(\x0e\x32].google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.TypeB\x03\xe0\x41\x01\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x1a-\n\x0bVmTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15InstanceMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06\x63onfig\x1a\xf3\x08\n\x13PersistentDirectory\x12s\n\x06gce_pd\x18\x02 \x01(\x0b\x32\x61.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12~\n\x06gce_hd\x18\x03 \x01(\x0b\x32l.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailabilityH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xa8\x03\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x07 \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\x12\x37\n\x0f\x61rchive_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1a\x90\x03\n$GceHyperdiskBalancedHighAvailability\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_size_gb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x97\x01\n\x0ereclaim_policy\x18\x03 \x01(\x0e\x32z.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.ReclaimPolicyB\x03\xe0\x41\x01\x12\x37\n\x0f\x61rchive_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x1aw\n\x0bHttpOptions\x12<\n/allowed_unauthenticated_cors_preflight_requests\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1d\x64isable_localhost_replacement\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x32\n\tPortRange\x12\x12\n\x05\x66irst\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04last\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\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\"\xd6\x0f\n\x0bWorkstation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12q\n\x16persistent_directories\x18\x19 \x03(\x0b\x32L.google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectoryB\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\x12\x14\n\x07kms_key\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12`\n\rboost_configs\x18\x10 \x03(\x0b\x32\x44.google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfigB\x03\xe0\x41\x03\x12\x1f\n\x12source_workstation\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0cruntime_host\x18\x15 \x01(\x0b\x32\x39.google.cloud.workstations.v1beta.Workstation.RuntimeHostB\x06\xe0\x41\x01\xe0\x41\x03\x12\x15\n\x08\x64\x65graded\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x18 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1aO\n\x1eWorkstationPersistentDirectory\x12\x17\n\nmount_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07size_gb\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a?\n\x16WorkstationBoostConfig\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07running\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xd5\x01\n\x0bRuntimeHost\x12\x66\n\x11gce_instance_host\x18\x01 \x01(\x0b\x32I.google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHostH\x00\x1aQ\n\x0fGceInstanceHost\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x12\n\x02id\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x12\x14\n\x04zone\x18\x03 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03\x42\x0b\n\thost_type\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\"\xae\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xad\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa6\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\x12\x13\n\x06\x66ilter\x18\x04 \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\"\xa2\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\x12\x19\n\x0c\x62oost_config\x18\x04 \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\"\xe0\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/Workstation\x12\x11\n\x04port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x42\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\"\xda\x02\n\x16PushCredentialsRequest\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12q\n\x1f\x61pplication_default_credentials\x18\x02 \x01(\x0b\x32\x43.google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthTokenB\x03\xe0\x41\x01\x1a\x86\x01\n\nOAuthToken\x12\x12\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06scopes\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61\x63\x63\x65ss_token\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x19\n\x17PushCredentialsMetadata\"\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\x87.\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*\x12\xa5\x02\n\x0fPushCredentials\x12\x38.google.cloud.workstations.v1beta.PushCredentialsRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41&\n\x0bWorkstation\x12\x17PushCredentialsMetadata\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02{\"v/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:pushCredentials:\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 -pool.add_serialized_file(descriptor_data) - -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 - WorkstationCluster::DomainConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.DomainConfig").msgclass - WorkstationCluster::GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.GatewayConfig").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::Host::GceInstance::BoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.BoostConfig").msgclass - WorkstationConfig::Host::GceInstance::ReservationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity").msgclass - WorkstationConfig::Host::GceInstance::ReservationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.ReservationAffinity.Type").enummodule - 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::PersistentDirectory::GceHyperdiskBalancedHighAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability").msgclass - WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceHyperdiskBalancedHighAvailability.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 - WorkstationConfig::HttpOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.HttpOptions").msgclass - WorkstationConfig::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PortRange").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation").msgclass - Workstation::WorkstationPersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationPersistentDirectory").msgclass - Workstation::WorkstationBoostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.WorkstationBoostConfig").msgclass - Workstation::RuntimeHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost").msgclass - Workstation::RuntimeHost::GceInstanceHost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.RuntimeHost.GceInstanceHost").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 - PushCredentialsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest").msgclass - PushCredentialsRequest::OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsRequest.OAuthToken").msgclass - PushCredentialsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.PushCredentialsMetadata").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 bddade12446d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +++ /dev/null @@ -1,92 +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 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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. - # Once generated this token cannot be revoked and is good for the lifetime - # of the token. - rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse - # Pushes credentials to a running workstation on behalf of a user. Once - # complete, supported credential types (application_default_credentials) are - # made available to processes running in the user container. - rpc :PushCredentials, ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, ::Google::Longrunning::Operation - 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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-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/field_info.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 b9791493eed8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb +++ /dev/null @@ -1,1874 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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] - # Identifier. 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 [rw] domain_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::DomainConfig] - # Optional. Configuration options for a custom domain. - # @!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. The - # {::Google::Cloud::Workstations::V1beta::WorkstationCluster#conditions conditions} - # field contains detailed information about the status of the cluster. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - # @!attribute [rw] gateway_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::GatewayConfig] - # Optional. Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] workstation_authorization_url - # @return [::String] - # Optional. Specifies the redirect URL for unauthorized requests received by - # workstation VMs in this cluster. - # - # Redirects to this endpoint will send a base64 encoded `state` query param - # containing the target workstation name and original request hostname. The - # endpoint is responsible for retrieving a token using `GenerateAccessToken` - # and redirecting back to the original hostname with the token. - # @!attribute [rw] workstation_launch_url - # @return [::String] - # Optional. Specifies the launch URL for workstations in this cluster. - # Requests sent to unstarted workstations will be redirected to this URL. - # - # Requests redirected to the launch endpoint will be sent with a - # `workstation` and `project` query parameter containing the full workstation - # resource name and project ID, respectively. The launch endpoint is - # responsible for starting the workstation, polling it until it reaches - # `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL. - 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 attachment 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 - - # Configuration options for a custom domain. - # @!attribute [rw] domain - # @return [::String] - # Immutable. Domain used by Workstations for HTTP ingress. - class DomainConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for Cluster HTTP Gateway. - # @!attribute [rw] http2_enabled - # @return [::Boolean] - # Optional. Whether HTTP/2 is enabled for this workstation cluster. - # Defaults to false. - class GatewayConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - 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] - # Identifier. 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] max_usable_workstations - # @return [::Integer] - # Optional. Maximum number of workstations under this configuration a user - # can have `workstations.workstation.use` permission on. - # - # Only enforced on CreateWorkstation API calls on the user issuing the API - # request. Can be overridden by: - # - # - granting a user - # workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, - # or - # - having a user with that permission create a workstation and - # granting another user `workstations.workstation.use` permission on - # that workstation. - # - # If not specified, defaults to `0`, which indicates unlimited. - # @!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 workstation configuration is in degraded mode, in - # which case it may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#conditions conditions} - # field contains detailed information about the status of the configuration. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation configuration's - # current state. - # @!attribute [rw] enable_audit_agent - # @return [::Boolean] - # Optional. Whether to enable Linux `auditd` logging on the workstation. When - # enabled, a - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#service_account service_account} - # must also be specified that has `roles/logging.logWriter` and - # `roles/monitoring.metricWriter` on the project. Operating system audit - # logging is distinct from [Cloud Audit - # Logs](https://cloud.google.com/workstations/docs/audit-logging) and - # [Container output - # logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). - # Operating system audit logs are available in the - # [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: - # - # resource.type="gce_instance" - # log_name:"/logs/linux-auditd" - # @!attribute [rw] http_options - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::HttpOptions] - # Optional. HTTP options that customize the behavior of the workstation - # service's HTTP proxy. - # @!attribute [rw] disable_tcp_connections - # @return [::Boolean] - # Optional. Disables support for plain TCP connections in the workstation. - # By default the service supports TCP connections through a websocket relay. - # Setting this option to true disables that relay, which prevents the usage - # of services that require plain TCP connections, such as SSH. - # When enabled, all communication must occur over HTTPS or WSS. - # @!attribute [rw] allowed_ports - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange>] - # Optional. A list of - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange PortRange}s - # specifying single ports or ranges of ports that are externally accessible - # in the workstation. Allowed ports must be one of 22, 80, or within range - # 1024-65535. If not specified defaults to ports 22, 80, and ports - # 1024-65535. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] grant_workstation_admin_role_on_create - # @return [::Boolean] - # Optional. Grant creator of a workstation `roles/workstations.policyAdmin` - # role along with `roles/workstations.user` role on the workstation created - # by them. This allows workstation users to share access to either their - # entire workstation, or individual ports. Defaults to false. - # @!attribute [rw] enable_pushing_credentials - # @return [::Boolean] - # Optional. Enables pushing user provided credentials to Workstations by - # calling workstations.pushCredentials. If application_default_credentials - # are supplied to pushCredentials, the provided token is returned when tools - # and applications running in the user container make a request for Default - # Application Credentials. Please note that any credentials supplied are made - # available to all users with access to the workstation. - 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 `logging.logEntries.create` and - # `monitoring.timeSeries.create` permissions on the project so it can - # write logs out to Cloud Logging. If using a custom container image, the - # service account must have [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # permission 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}. - # 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 using this workstation configuration. - # - # Defaults to false. - # - # 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. - # @!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. - # @!attribute [rw] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig>] - # Optional. A list of the boost configurations that workstations created - # using this workstation configuration are allowed to use. If specified, - # users will have the option to choose from the list of boost configs - # when starting a workstation. - # @!attribute [rw] disable_ssh - # @return [::Boolean] - # Optional. Whether to disable SSH access to the VM. - # @!attribute [rw] vm_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to this instance. - # Tag keys and values have the same definition as [resource manager - # tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview). - # Keys must be in the format `tagKeys/{tag_key_id}`, and - # values are in the format `tagValues/456`. - # @!attribute [rw] reservation_affinity - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] - # Optional. - # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - # specifies a reservation that can be consumed to create VM - # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations - # will only create VMs in the zone where the reservation is located. - # This would affect availability since the service will no longer be - # resilient to zonal outages. If ANY_RESERVATION is specified, creating - # reservations in both zones that the config creates VMs in will ensure - # higher availability. - # **Important Considerations for Reservation Affinity:** - # - # * This feature is intended for advanced users and requires - # familiarity with Google Compute Engine reservations. - # * Using reservations incurs charges, regardless of utilization. - # * The resources in the pool will consume the specified - # reservation. Take this into account when setting the - # pool size. - # @!attribute [rw] startup_script_uri - # @return [::String] - # Optional. Link to the startup script stored in Cloud Storage. This - # script will be run on the host workstation VM when the VM is created. - # The URI must be of the form gs://\\{bucket-name}/\\{object-name}. If - # specifying a startup script, the service account must have [Permission - # to access the bucket and script file in Cloud - # Storage](https://cloud.google.com/storage/docs/access-control/iam-permissions). - # Otherwise, the script must be publicly accessible. - # Note that the service regularly updates the OS version of the host VM, - # and it is the responsibility of the user to ensure the script stays - # compatible with the OS version. - # @!attribute [rw] instance_metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Custom metadata to apply to Compute Engine instances. - 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 - - # A boost configuration is a set of resources that a workstation can use - # to increase its performance. If you specify a boost configuration, upon - # startup, workstation users can choose to use a VM provisioned under the - # boost config by passing the boost config ID in the start request. If - # the workstation user does not provide a boost config ID in the start - # request, the system will choose a VM from the pool provisioned under - # the default config. - # @!attribute [rw] id - # @return [::String] - # Required. The ID to be used for the boost configuration. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine that boosted VM instances will use—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). - # Defaults to `e2-standard-4`. - # @!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 boost instance. Defaults to `none`. - # @!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] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on boosted Cloud - # Workstations VMs running using this boost configuration. - # - # Defaults to false. - # - # 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 - # boost configurations that specify a - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::BoostConfig#machine_type machine_type} - # in the N1 or N2 machine series. - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of boost VMs that the system should keep idle so - # that workstations can be boosted quickly. Defaults to `0`. - # @!attribute [rw] reservation_affinity - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity] - # Optional. - # [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - # specifies a reservation that can be consumed to create boost VM - # instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations - # will only create VMs in the zone where the reservation is located. - # This would affect availability since the service will no longer be - # resilient to zonal outages. If ANY_RESERVATION is specified, creating - # reservations in both zones that the config creates VMs in will ensure - # higher availability. - # **Important Considerations for Reservation Affinity:** - # - # * This feature is intended for advanced users and requires - # familiarity with Google Compute Engine reservations. - # * Using reservations incurs charges, regardless of utilization. - # * The resources in the pool will consume the specified - # reservation. Take this into account when setting the - # pool size. - class BoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReservationAffinity is the configuration of the desired reservation - # from which instances can consume resources. - # @!attribute [rw] consume_reservation_type - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::ReservationAffinity::Type] - # Optional. Corresponds to the type of reservation consumption. - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of reservation resource. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of reservation resources. - # Valid values are either the name of a reservation in the same project - # or "projects/\\{project}/reservations/\\{reservation}" to target a shared - # reservation in the same zone but in a different project. - class ReservationAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether to consume capacity from a reservation or not. - module Type - # Default value. This should not be used. - TYPE_UNSPECIFIED = 0 - - # Do not consume from any reserved capacity. - NO_RESERVATION = 1 - - # Consume any reservation available. - ANY_RESERVATION = 2 - - # Must consume from a specific reservation. Must specify key value - # fields for specifying the reservations. - SPECIFIC_RESERVATION = 3 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VmTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InstanceMetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. Updates to this field - # will not update existing workstations and will only take effect on new - # workstations. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # - # Note: The following fields are mutually exclusive: `gce_pd`, `gce_hd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gce_hd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability] - # A PersistentDirectory backed by a Compute Engine hyperdisk high - # availability disk. - # - # Note: The following fields are mutually exclusive: `gce_hd`, `gce_pd`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!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 Persistent Directory 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] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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. Must be formatted as ext4 file system with no - # partitions. - # @!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`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - 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 - - # A Persistent Directory backed by a Compute Engine - # [Hyperdisk Balanced High Availability - # Disk](https://cloud.google.com/compute/docs/disks/hd-types/hyperdisk-balanced-ha). - # This is a high-availability block storage solution that offers a balance - # between performance and cost for most general-purpose workloads. - # @!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::GceHyperdiskBalancedHighAvailability#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. - # @!attribute [rw] max_size_gb - # @return [::Integer] - # Optional. Maximum size in GB to which this persistent directory can be - # resized. Defaults to unlimited if not set. - # @!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::GceHyperdiskBalancedHighAvailability#size_gb size_gb} - # must be empty. Must be formatted as ext4 file system with no - # partitions. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceHyperdiskBalancedHighAvailability::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - # @!attribute [rw] archive_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait after initially creating or - # subsequently shutting down the workstation before converting its disk - # into a snapshot. This generally saves costs at the expense of greater - # startup time on next workstation start, as the service will need to - # create a disk from the archival snapshot. - # - # A value of `"0s"` indicates that the disk will never be archived. - class GceHyperdiskBalancedHighAvailability - 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. Must be empty if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#read_only read_only} - # is false. Updating - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # will update content in the ephemeral directory after the workstation is - # restarted. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, see - # [the filesystems available in Container-Optimized - # OS](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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. - # - # Only file systems supported by Container-Optimized OS (COS) - # are explicitly supported. For a list of supported file systems, please - # refer to the [COS - # documentation](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems). - # - # 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. - # If using a custom container image, the service account must have - # [Artifact Registry - # Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) - # 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 - - # HTTP options for the running workstations. - # @!attribute [rw] allowed_unauthenticated_cors_preflight_requests - # @return [::Boolean] - # Optional. By default, the workstations service makes sure that all - # requests to the workstation are authenticated. CORS preflight requests do - # not include cookies or custom headers, and so are considered - # unauthenticated and blocked by the workstations service. Enabling this - # option allows these unauthenticated CORS preflight requests through to - # the workstation, where it becomes the responsibility of the destination - # server in the workstation to validate the request. - # @!attribute [rw] disable_localhost_replacement - # @return [::Boolean] - # Optional. By default, the workstations service replaces references to - # localhost, 127.0.0.1, and 0.0.0.0 with the workstation's hostname in http - # responses from the workstation so that applications under development run - # properly on the workstation. This may intefere with some applications, - # and so this option allows that behavior to be disabled. - class HttpOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A PortRange defines a range of ports. Both - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} - # are inclusive. To specify a single port, both - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#first first} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PortRange#last last} - # should be the same. - # @!attribute [rw] first - # @return [::Integer] - # Required. Starting port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - # @!attribute [rw] last - # @return [::Integer] - # Required. Ending port number for the current range of ports. - # Valid ports are 22, 80, and ports within the range 1024-65535. - class PortRange - 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] - # Identifier. 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 [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationPersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!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. - # @!attribute [r] kms_key - # @return [::String] - # Output only. The name of the Google Cloud KMS encryption key used to - # encrypt this workstation. The KMS key can only be configured in the - # WorkstationConfig. The expected format is - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [r] boost_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation::WorkstationBoostConfig>] - # Output only. List of available boost configuration IDs that this - # workstation can be boosted up to. - # @!attribute [rw] source_workstation - # @return [::String] - # Optional. The source workstation from which this workstation's persistent - # directories were cloned on creation. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] runtime_host - # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost] - # Optional. Output only. Runtime host for the workstation when in - # STATE_RUNNING. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this workstation is in degraded mode, in which case it - # may require user action to restore full functionality. The - # {::Google::Cloud::Workstations::V1beta::Workstation#conditions conditions} field - # contains detailed information about the status of the workstation. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation's current state. - class Workstation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A directory to persist across workstation sessions. Updates to this field - # will only take effect on this workstation after it is restarted. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. The mount path of the persistent directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. Size of the persistent directory in GB. If specified in an - # update request, this is the desired size of the directory. - class WorkstationPersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Boost configuration for this workstation. This object is populated from the - # parent workstation configuration. - # @!attribute [r] id - # @return [::String] - # Output only. Boost configuration ID. - # @!attribute [r] running - # @return [::Boolean] - # Output only. Whether or not the current workstation is actively boosted - # with this id. - class WorkstationBoostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Runtime host for the workstation. - # @!attribute [rw] gce_instance_host - # @return [::Google::Cloud::Workstations::V1beta::Workstation::RuntimeHost::GceInstanceHost] - # Specifies a Compute Engine instance as the host. - class RuntimeHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Compute Engine instance host. - # @!attribute [r] name - # @return [::String] - # Optional. Output only. The name of the Compute Engine instance. - # @!attribute [r] id - # @return [::String] - # Optional. Output only. The ID of the Compute Engine instance. - # @!attribute [r] zone - # @return [::String] - # Optional. Output only. The zone of the Compute Engine instance. - class GceInstanceHost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - 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 - - # @!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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationClusters to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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 result, 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the WorkstationConfigs to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. Workstation configuration to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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. Workstation configuration 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 result, 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 result, 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the Workstations to be listed. Possible filters are - # described in https://google.aip.dev/160. - 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. If source_workstation is specified, the - # user must have `workstations.workstations.use` permission on the source - # workstation, and the Cloud Workstations Service Agent for the project where - # you are creating the new workstation must have compute.disks.createSnapshot - # and compute.snapshots.useReadOnly on the source project. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, 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 should be - # updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the result, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation is not found, a new workstation 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 result, 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 result, 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. - # @!attribute [rw] boost_config - # @return [::String] - # Optional. If set, the workstation starts using the boost configuration with - # the specified ID. - 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 result, 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. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port for which the access token should be generated. If - # specified, the generated access token grants access only to the - # specified port of the workstation. If specified, values must be within the - # range [1 - 65535]. If not specified, the generated access token grants - # access to all ports of the workstation. - 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 - - # Request message for PushCredentials. - # @!attribute [rw] workstation - # @return [::String] - # Required. Name of the workstation for which the credentials should be - # pushed. - # @!attribute [rw] application_default_credentials - # @return [::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken] - # Optional. Credentials used by Cloud Client Libraries, Google API Client - # Libraries, and other tooling within the user conainer: - # https://cloud.google.com/docs/authentication/application-default-credentials - class PushCredentialsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # OAuth token. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address encapsulated in the OAuth token. - # @!attribute [rw] scopes - # @return [::String] - # Optional. The scopes encapsulated in the OAuth token. - # See https://developers.google.com/identity/protocols/oauth2/scopes for - # more information. - # @!attribute [rw] access_token - # @return [::String] - # Required. The OAuth token. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time the OAuth access token will expire. This should be the - # time the access token was generated plus the expires_in offset returned - # from the Access Token Response. - class OAuthToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metadata message for PushCredentials. - class PushCredentialsMetadata - 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-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 2f6ae6f951ca..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json +++ /dev/null @@ -1,855 +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" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_PushCredentials_sync", - "title": "Snippet for the push_credentials call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials.", - "file": "workstations/push_credentials.rb", - "language": "RUBY", - "client_method": { - "short_name": "push_credentials", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#push_credentials", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::PushCredentialsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "PushCredentials", - "full_name": "google.cloud.workstations.v1beta.Workstations.PushCredentials", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "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-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/push_credentials.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb deleted file mode 100644 index a2f4b5c117f8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/push_credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_PushCredentials_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the push_credentials 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#push_credentials. -# -def push_credentials - # 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::PushCredentialsRequest.new - - # Call the push_credentials method. - result = client.push_credentials request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to 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_PushCredentials_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 af5378e9c6a7..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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::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 2484c4f4930c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb +++ /dev/null @@ -1,1280 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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" - filter = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - boost_config = "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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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" - port = 42 - - 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials - # Create test objects. - 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 = "hello world" - application_default_credentials = {} - - push_credentials_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-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_push_credentials_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, push_credentials_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, push_credentials_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 b76165c92c75..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb +++ /dev/null @@ -1,1516 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_clusters_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstation_configs_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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" - filter = "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"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workstations_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_workstations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_workstations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - boost_config = "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"] - assert_equal "hello world", request["boost_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_workstation name: name, validate_only: validate_only, etag: etag, boost_config: boost_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_workstation({ name: name, validate_only: validate_only, etag: etag, boost_config: boost_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag, boost_config: boost_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, 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 - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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" - port = 42 - - 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"] - assert_equal 42, request["port"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_access_token expire_time: expire_time, workstation: workstation, port: port do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_access_token({ expire_time: expire_time, workstation: workstation, port: port }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation, port: port), 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_push_credentials - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = "hello world" - application_default_credentials = {} - - push_credentials_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :push_credentials, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest, request - assert_equal "hello world", request["workstation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest::OAuthToken), request["application_default_credentials"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, push_credentials_client_stub do - # Create client - c = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.push_credentials workstation: workstation, application_default_credentials: application_default_credentials do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.push_credentials ::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.push_credentials({ workstation: workstation, application_default_credentials: application_default_credentials }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.push_credentials(::Google::Cloud::Workstations::V1beta::PushCredentialsRequest.new(workstation: workstation, application_default_credentials: application_default_credentials), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, push_credentials_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore b/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json deleted file mode 100644 index b76a2b576cdf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "developerknowledge.googleapis.com", - "api_shortname": "developerknowledge", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest", - "distribution_name": "google-developers-developer_knowledge-v1", - "is_cloud": true, - "language": "ruby", - "name": "developerknowledge", - "name_pretty": "Developer Knowledge V1 API", - "product_documentation": "https://developers.google.com/knowledge", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/knowledge", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml b/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml deleted file mode 100644 index eca990fb3b4d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-developers-developer_knowledge-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-developers-developer_knowledge-v1.rb" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/.yardopts b/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts deleted file mode 100644 index 029e31f7886d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Developer Knowledge 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-developers-developer_knowledge-v1/AUTHENTICATION.md b/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md deleted file mode 100644 index cb46050750cd..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/developers/developer_knowledge/v1" - -::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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/developers/developer_knowledge/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-v1/CHANGELOG.md b/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md b/owl-bot-staging/google-developers-developer_knowledge-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/README.md deleted file mode 100644 index b4b5340b19fc..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Developer Knowledge V1 API - -The Developer Knowledge API provides access to Google's developer knowledge. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Developer Knowledge V1 API. Most users should consider using -the main client gem, -[google-developers-developer_knowledge](https://rubygems.org/gems/google-developers-developer_knowledge). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-developers-developer_knowledge-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/developerknowledge.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/developers/developer_knowledge/v1" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new -request = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new # (request fields as keyword arguments...) -response = client.search_document_chunks request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/knowledge) -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/developers/developer_knowledge/v1" -require "logger" - -client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-developers-developer_knowledge`, -and lower-level _versioned_ client libraries with names such as -`google-developers-developer_knowledge-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-developers-developer_knowledge`. -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-developers-developer_knowledge-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-developers-developer_knowledge-v1/Rakefile b/owl-bot-staging/google-developers-developer_knowledge-v1/Rakefile deleted file mode 100644 index ca756f3b2f8a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-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/developers/developer_knowledge/v1/developer_knowledge/credentials" - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-developers-developer_knowledge-v1" - header "google-developers-developer_knowledge-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-developers-developer_knowledge-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-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-developers-developer_knowledge-v1/gapic_metadata.json b/owl-bot-staging/google-developers-developer_knowledge-v1/gapic_metadata.json deleted file mode 100644 index 37fb4a1b5f6d..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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.developers.knowledge.v1", - "libraryPackage": "::Google::Developers::DeveloperKnowledge::V1", - "services": { - "DeveloperKnowledge": { - "clients": { - "grpc": { - "libraryClient": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client", - "rpcs": { - "SearchDocumentChunks": { - "methods": [ - "search_document_chunks" - ] - }, - "GetDocument": { - "methods": [ - "get_document" - ] - }, - "BatchGetDocuments": { - "methods": [ - "batch_get_documents" - ] - }, - "AnswerQuery": { - "methods": [ - "answer_query" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec b/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec deleted file mode 100644 index ff236befee57..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/google-developers-developer_knowledge-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/developers/developer_knowledge/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-developers-developer_knowledge-v1" - gem.version = Google::Developers::DeveloperKnowledge::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Developer Knowledge API provides access to Google's developer knowledge. Note that google-developers-developer_knowledge-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-developers-developer_knowledge instead. See the readme for more details." - gem.summary = "The Developer Knowledge API provides access to Google's developer knowledge." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-v1.rb deleted file mode 100644 index b1e644ed99d8..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google-developers-developer_knowledge-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/developers/developer_knowledge/v1" diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1.rb deleted file mode 100644 index d9cee294ec23..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge" -require "google/developers/developer_knowledge/v1/version" - -module Google - module Developers - module DeveloperKnowledge - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/developers/developer_knowledge/v1" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/developers/developer_knowledge/v1" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/developers/developer_knowledge/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb deleted file mode 100644 index e18de241d98e..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/developers/developer_knowledge/v1/version" - -require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" -require "google/developers/developer_knowledge/v1/developer_knowledge/paths" -require "google/developers/developer_knowledge/v1/developer_knowledge/client" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - -module Google - module Developers - module DeveloperKnowledge - module V1 - ## - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/developers/developer_knowledge/v1/developer_knowledge" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module DeveloperKnowledge - end - end - end - end -end - -helper_path = ::File.join __dir__, "developer_knowledge", "helpers.rb" -require "google/developers/developer_knowledge/v1/developer_knowledge/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb deleted file mode 100644 index 5b31292cee99..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb +++ /dev/null @@ -1,847 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/developers/knowledge/v1/developerknowledge_pb" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - ## - # Client for the DeveloperKnowledge service. - # - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_knowledge_stub - - ## - # Configure the DeveloperKnowledge Client class. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperKnowledge clients - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_documents.timeout = 60.0 - default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @developer_knowledge_stub.universe_domain - end - - ## - # Create a new DeveloperKnowledge client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperKnowledge 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/developers/knowledge/v1/developerknowledge_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 - - @developer_knowledge_stub = ::Gapic::ServiceStub.new( - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @developer_knowledge_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 - @developer_knowledge_stub.logger - end - - # Service calls - - ## - # Searches for developer knowledge across Google's developer documentation. - # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s - # based on the user's query. There may be many chunks from the same - # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full - # documents, use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # with the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # returned in the - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. - # - # @overload search_document_chunks(request, options = nil) - # Pass arguments to `search_document_chunks` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_document_chunks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @param page_size [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - # - # # Call the search_document_chunks method. - # result = client.search_document_chunks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - # p item - # end - # - def search_document_chunks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest - - # Converts hash and nil to 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_document_chunks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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_document_chunks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_document_chunks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :search_document_chunks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single document with its full Markdown content. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_document(name: nil, view: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :get_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves multiple documents, each with its full Markdown content. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_get_documents(names: nil, view: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param names [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method. - # result = client.batch_get_documents request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - # p result - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.batch_get_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :batch_get_documents, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Answers a query using grounded generation. - # - # @overload answer_query(request, options = nil) - # Pass arguments to `answer_query` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload answer_query(query: nil) - # Pass arguments to `answer_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. The query to answer. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - # - # # Call the answer_query method. - # result = client.answer_query request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - # p result - # - def answer_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.answer_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::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.answer_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.answer_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.call_rpc :answer_query, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DeveloperKnowledge API. - # - # This class represents the configuration for DeveloperKnowledge, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search_document_chunks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DeveloperKnowledge API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search_document_chunks` - # @return [::Gapic::Config::Method] - # - attr_reader :search_document_chunks - ## - # RPC-specific configuration for `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `answer_query` - # @return [::Gapic::Config::Method] - # - attr_reader :answer_query - - # @private - def initialize parent_rpcs = nil - search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks - @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query - @answer_query = ::Gapic::Config::Method.new answer_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb deleted file mode 100644 index 4d6b73d55cf7..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # Credentials for the DeveloperKnowledge 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-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb deleted file mode 100644 index 6389c8f3c5e6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # Path helper methods for the DeveloperKnowledge API. - module Paths - ## - # Create a fully-qualified Document resource string. - # - # The resource will be in the following format: - # - # `documents/{document}` - # - # @param document [String] - # - # @return [::String] - def document_path document: - "documents/#{document}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb deleted file mode 100644 index 6b7630f75bd6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/developers/developer_knowledge/v1/version" - -require "google/developers/developer_knowledge/v1/developer_knowledge/credentials" -require "google/developers/developer_knowledge/v1/developer_knowledge/paths" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/client" - -module Google - module Developers - module DeveloperKnowledge - module V1 - ## - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - # To load this service and instantiate a REST client: - # - # require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module DeveloperKnowledge - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb deleted file mode 100644 index a0c05ad489da..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb +++ /dev/null @@ -1,800 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - module Rest - ## - # REST client for the DeveloperKnowledge service. - # - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks} - # to find relevant page URIs based on a query, and then use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerknowledge.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_knowledge_stub - - ## - # Configure the DeveloperKnowledge Client class. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperKnowledge clients - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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", "Developers", "DeveloperKnowledge", "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_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_documents.timeout = 60.0 - default_config.rpcs.batch_get_documents.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 DeveloperKnowledge Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 - @developer_knowledge_stub.universe_domain - end - - ## - # Create a new DeveloperKnowledge REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperKnowledge 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 - - @developer_knowledge_stub = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @developer_knowledge_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 - @developer_knowledge_stub.logger - end - - # Service calls - - ## - # Searches for developer knowledge across Google's developer documentation. - # Returns {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s - # based on the user's query. There may be many chunks from the same - # {::Google::Developers::DeveloperKnowledge::V1::Document Document}. To retrieve full - # documents, use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # with the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # returned in the - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse#results SearchDocumentChunksResponse.results}. - # - # @overload search_document_chunks(request, options = nil) - # Pass arguments to `search_document_chunks` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document_chunks(query: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_document_chunks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @param page_size [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - # - # # Call the search_document_chunks method. - # result = client.search_document_chunks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - # p item - # end - # - def search_document_chunks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest - - # Converts hash and nil to an 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_document_chunks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document_chunks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_document_chunks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.search_document_chunks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_knowledge_stub, :search_document_chunks, "results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single document with its full Markdown content. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_document(name: nil, view: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.get_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves multiple documents, each with its full Markdown content. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_get_documents(names: nil, view: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param names [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @param view [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method. - # result = client.batch_get_documents request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - # p result - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.batch_get_documents request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Answers a query using grounded generation. - # - # @overload answer_query(request, options = nil) - # Pass arguments to `answer_query` via a request object, either of type - # {::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload answer_query(query: nil) - # Pass arguments to `answer_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param query [::String] - # Required. The query to answer. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/developers/developer_knowledge/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - # - # # Call the answer_query method. - # result = client.answer_query request - # - # # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - # p result - # - def answer_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.answer_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Developers::DeveloperKnowledge::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.answer_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.answer_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_knowledge_stub.answer_query request, 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 DeveloperKnowledge REST API. - # - # This class represents the configuration for DeveloperKnowledge 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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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 - # # search_document_chunks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search_document_chunks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerknowledge.googleapis.com" - - config_attr :endpoint, nil, ::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 DeveloperKnowledge API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search_document_chunks` - # @return [::Gapic::Config::Method] - # - attr_reader :search_document_chunks - ## - # RPC-specific configuration for `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `answer_query` - # @return [::Gapic::Config::Method] - # - attr_reader :answer_query - - # @private - def initialize parent_rpcs = nil - search_document_chunks_config = parent_rpcs.search_document_chunks if parent_rpcs.respond_to? :search_document_chunks - @search_document_chunks = ::Gapic::Config::Method.new search_document_chunks_config - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query - @answer_query = ::Gapic::Config::Method.new answer_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb deleted file mode 100644 index 2b64ff55126a..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/developers/knowledge/v1/developerknowledge_pb" - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - module Rest - ## - # REST service stub for the DeveloperKnowledge 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 search_document_chunks REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse] - # A result object deserialized from the server's reply - def search_document_chunks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_document_chunks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document_chunks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_document REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # A result object deserialized from the server's reply - def get_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::Document.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_get_documents REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse] - # A result object deserialized from the server's reply - def batch_get_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_get_documents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the answer_query REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse] - # A result object deserialized from the server's reply - def answer_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_answer_query_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "answer_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.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 search_document_chunks REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest] - # 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_document_chunks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/documents:searchDocumentChunks", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_document REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^documents(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_documents REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_get_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/documents:batchGet", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the answer_query REST call - # - # @param request_pb [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_answer_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1:answerQuery", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/rest.rb deleted file mode 100644 index 564abffb5326..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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/developers/developer_knowledge/v1/developer_knowledge/rest" -require "google/developers/developer_knowledge/v1/version" - -module Google - module Developers - module DeveloperKnowledge - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/developers/developer_knowledge/v1/rest" - # client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/v1/version.rb deleted file mode 100644 index 27f225b083b3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/developer_knowledge/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 Developers - module DeveloperKnowledge - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb deleted file mode 100644 index 1b5fb1c2dc8e..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/developers/knowledge/v1/developerknowledge.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 = "\n7google/developers/knowledge/v1/developerknowledge.proto\x12\x1egoogle.developers.knowledge.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x04view\x18\x08 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x03\x12!\n\x14\x63ontent_length_bytes\x18\t \x01(\x05\x42\x03\xe0\x41\x03:Z\xea\x41W\n*developerknowledge.googleapis.com/Document\x12\x14\x64ocuments/{document}*\tdocuments2\x08\x64ocument\"w\n\x1bSearchDocumentChunksRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"|\n\x1cSearchDocumentChunksResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.developers.knowledge.v1.DocumentChunk\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x12GetDocumentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"\x9e\x01\n\x18\x42\x61tchGetDocumentsRequest\x12\x41\n\x05names\x18\x01 \x03(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"X\n\x19\x42\x61tchGetDocumentsResponse\x12;\n\tdocuments\x18\x01 \x03(\x0b\x32(.google.developers.knowledge.v1.Document\"(\n\x12\x41nswerQueryRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\"M\n\x13\x41nswerQueryResponse\x12\x36\n\x06\x61nswer\x18\x01 \x01(\x0b\x32&.google.developers.knowledge.v1.Answer\"\xdb\x04\n\x06\x41nswer\x12\x13\n\x0b\x61nswer_text\x18\x01 \x01(\t\x12M\n\tcitations\x18\x02 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.AnswerCitationB\x03\xe0\x41\x03\x12O\n\nreferences\x18\x03 \x03(\x0b\x32\x36.google.developers.knowledge.v1.Answer.AnswerReferenceB\x03\xe0\x41\x03\x1a\x8f\x01\n\x0e\x41nswerCitation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.CitationSourceB\x03\xe0\x41\x03\x1a.\n\x0e\x43itationSource\x12\x1c\n\x0freference_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x1ay\n\x0f\x41nswerReference\x12[\n\x12\x64ocument_reference\x18\x01 \x01(\x0b\x32\x38.google.developers.knowledge.v1.Answer.DocumentReferenceB\x03\xe0\x41\x03H\x00\x42\t\n\x07\x63ontent\x1a_\n\x11\x44ocumentReference\x12J\n\x0e\x64ocument_chunk\x18\x01 \x01(\x0b\x32-.google.developers.knowledge.v1.DocumentChunkB\x03\xe0\x41\x03\"\xbb\x01\n\rDocumentChunk\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x08\x64ocument\x18\x04 \x01(\x0b\x32(.google.developers.knowledge.v1.DocumentB\x03\xe0\x41\x03*y\n\x0c\x44ocumentView\x12\x1d\n\x19\x44OCUMENT_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44OCUMENT_VIEW_BASIC\x10\x01\x12\x16\n\x12\x44OCUMENT_VIEW_FULL\x10\x02\x12\x19\n\x15\x44OCUMENT_VIEW_CONTENT\x10\x03\x32\x81\x06\n\x12\x44\x65veloperKnowledge\x12\xbd\x01\n\x14SearchDocumentChunks\x12;.google.developers.knowledge.v1.SearchDocumentChunksRequest\x1a<.google.developers.knowledge.v1.SearchDocumentChunksResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/documents:searchDocumentChunks\x12\x93\x01\n\x0bGetDocument\x12\x32.google.developers.knowledge.v1.GetDocumentRequest\x1a(.google.developers.knowledge.v1.Document\"&\xda\x41\x04name\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=documents/**}\x12\xa8\x01\n\x11\x42\x61tchGetDocuments\x12\x38.google.developers.knowledge.v1.BatchGetDocumentsRequest\x1a\x39.google.developers.knowledge.v1.BatchGetDocumentsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/documents:batchGet\x12\x92\x01\n\x0b\x41nswerQuery\x12\x32.google.developers.knowledge.v1.AnswerQueryRequest\x1a\x33.google.developers.knowledge.v1.AnswerQueryResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1:answerQuery:\x01*\x1aU\xca\x41!developerknowledge.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x02\n\"com.google.developers.knowledge.v1B\x17\x44\x65veloperKnowledgeProtoP\x01ZGgoogle.golang.org/genproto/googleapis/developers/knowledge/v1;knowledge\xaa\x02\'Google.Developers.DeveloperKnowledge.V1\xca\x02\'Google\\Developers\\DeveloperKnowledge\\V1\xea\x02*Google::Developers::DeveloperKnowledge::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Developers - module DeveloperKnowledge - module V1 - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Document").msgclass - SearchDocumentChunksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksRequest").msgclass - SearchDocumentChunksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.SearchDocumentChunksResponse").msgclass - GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.GetDocumentRequest").msgclass - BatchGetDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsRequest").msgclass - BatchGetDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.BatchGetDocumentsResponse").msgclass - AnswerQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryRequest").msgclass - AnswerQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.AnswerQueryResponse").msgclass - Answer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer").msgclass - Answer::AnswerCitation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerCitation").msgclass - Answer::CitationSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.CitationSource").msgclass - Answer::AnswerReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.AnswerReference").msgclass - Answer::DocumentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.Answer.DocumentReference").msgclass - DocumentChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentChunk").msgclass - DocumentView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.developers.knowledge.v1.DocumentView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb deleted file mode 100644 index c89acbf572dd..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/developers/knowledge/v1/developerknowledge.proto for package 'Google.Developers.DeveloperKnowledge.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/developers/knowledge/v1/developerknowledge_pb' - -module Google - module Developers - module DeveloperKnowledge - module V1 - module DeveloperKnowledge - # The Developer Knowledge API provides programmatic access to Google's public - # developer documentation, enabling you to integrate this knowledge base into - # your own applications and workflows. - # - # The API is designed to be the canonical source for machine-readable access to - # Google's developer documentation. - # - # A typical use case is to first use - # [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks] - # to find relevant page URIs based on a query, and then use - # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] - # or - # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] - # to fetch the full content of the top results. - # - # All document content is provided in Markdown format. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.developers.knowledge.v1.DeveloperKnowledge' - - # Searches for developer knowledge across Google's developer documentation. - # Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s - # based on the user's query. There may be many chunks from the same - # [Document][google.developers.knowledge.v1.Document]. To retrieve full - # documents, use - # [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] - # or - # [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] - # with the - # [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] - # returned in the - # [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results]. - rpc :SearchDocumentChunks, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse - # Retrieves a single document with its full Markdown content. - rpc :GetDocument, ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, ::Google::Developers::DeveloperKnowledge::V1::Document - # Retrieves multiple documents, each with its full Markdown content. - rpc :BatchGetDocuments, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse - # Answers a query using grounded generation. - rpc :AnswerQuery, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md deleted file mode 100644 index 76079269bdd8..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Developer Knowledge 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-developers-developer_knowledge-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb deleted file mode 100644 index 60e74d520a79..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/developers/knowledge/v1/developerknowledge.rb +++ /dev/null @@ -1,371 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Developers - module DeveloperKnowledge - module V1 - # A Document represents a piece of content from the Developer Knowledge corpus. - # @!attribute [rw] name - # @return [::String] - # Identifier. Contains the resource name of the document. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [r] uri - # @return [::String] - # Output only. Provides the URI of the content, such as - # `docs.cloud.google.com/storage/docs/creating-buckets`. - # @!attribute [r] content - # @return [::String] - # Output only. Contains the full content of the document in Markdown format. - # @!attribute [r] description - # @return [::String] - # Output only. Provides a description of the document. - # @!attribute [r] data_source - # @return [::String] - # Output only. Specifies the data source of the document. - # Example data source: `firebase.google.com` - # @!attribute [r] title - # @return [::String] - # Output only. Provides the title of the document. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Represents the timestamp when the content or metadata of the - # document was last updated. - # @!attribute [r] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Output only. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. - # @!attribute [r] content_length_bytes - # @return [::Integer] - # Output only. The length of the `content` field in bytes. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - # @!attribute [rw] query - # @return [::String] - # Required. Provides the raw query string provided by the user, such as "How - # to create a Cloud Storage bucket?". - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Specifies the maximum number of results to return. The service - # may return fewer than this value. - # - # If unspecified, at most 5 results will be returned. - # - # The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Contains a page token, received from a previous - # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Applies a strict filter to the search results. The expression - # supports a subset of the syntax described at https://google.aip.dev/160. - # - # While `SearchDocumentChunks` returns - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter - # is applied to `DocumentChunk.document` fields. - # - # Supported fields for filtering: - # - # * `data_source` (STRING): The source of the document, e.g. - # `docs.cloud.google.com`. See - # https://developers.google.com/knowledge/reference/corpus-reference for - # the complete list of data sources in the corpus. - # * `update_time` (TIMESTAMP): The timestamp of when the document was last - # meaningfully updated. A meaningful update is one that changes document's - # markdown content or metadata. - # * `uri` (STRING): The document URI, e.g. - # `https://docs.cloud.google.com/bigquery/docs/tables`. - # - # STRING fields support `=` (equals) and `!=` (not equals) operators for - # **exact match** on the whole string. Partial match, prefix match, and - # regexp match are not supported. - # - # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. - # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. - # - # Note: Field names must be in `snake_case` (e.g., `data_source`). Values on - # the right-hand side of filtering expressions must be string literals - # enclosed in double quotes (e.g., `"docs.cloud.google.com"`). - # - # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical - # operators. `OR` has higher precedence than `AND`. Use parentheses for - # explicit precedence grouping. - # - # Examples: - # - # * `data_source = "docs.cloud.google.com" OR data_source = - # "firebase.google.com"` - # * `data_source != "firebase.google.com"` - # * `update_time < "2024-01-01T00:00:00Z"` - # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = - # "developer.chrome.com" OR data_source = "web.dev")` - # * `uri = "https://docs.cloud.google.com/release-notes"` - # - # The `filter` string must not exceed 500 characters; values longer than 500 - # characters will result in an `INVALID_ARGUMENT` error. - class SearchDocumentChunksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - # @!attribute [rw] results - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>] - # Contains the search results for the given query. Each - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk} in this list - # contains a snippet of content relevant to the search query. Use the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent} - # field of each result with - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to retrieve the full document content. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. Provides a token that can be sent as `page_token` to retrieve the - # next page. If this field is omitted, there are no subsequent pages. - class SearchDocumentChunksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}. - # @!attribute [rw] name - # @return [::String] - # Required. Specifies the name of the document to retrieve. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [rw] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # defaults to `DOCUMENT_VIEW_CONTENT`. - class GetDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. Specifies the names of the documents to retrieve. A maximum of 20 - # documents can be retrieved in a batch. The documents are returned in the - # same order as the `names` in the request. - # - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [rw] view - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView] - # Optional. Specifies the - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the - # document. If unspecified, - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # defaults to `DOCUMENT_VIEW_CONTENT`. - class BatchGetDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [rw] documents - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Document>] - # Contains the documents requested. - class BatchGetDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. - # @!attribute [rw] query - # @return [::String] - # Required. The query to answer. - class AnswerQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query DeveloperKnowledge.AnswerQuery}. - # @!attribute [rw] answer - # @return [::Google::Developers::DeveloperKnowledge::V1::Answer] - # The answer to the query. - class AnswerQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An answer to a query. - # @!attribute [rw] answer_text - # @return [::String] - # Contains the text of the answer. - # @!attribute [r] citations - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerCitation>] - # Output only. Contains citations for the answer. - # @!attribute [r] references - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference>] - # Output only. Contains references for the answer. - class Answer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Citation info for a segment. - # @!attribute [r] start_index - # @return [::Integer] - # Output only. Indicates the start of the segment, measured in bytes (UTF-8 - # unicode), inclusive. If there are multi-byte characters, such as - # non-ASCII characters, the index measurement is longer than the string - # length. - # @!attribute [r] end_index - # @return [::Integer] - # Output only. Indicates the end of the segment, measured in bytes (UTF-8 - # unicode), exclusive. If there are multi-byte characters, such as - # non-ASCII characters, the index measurement is longer than the string - # length. - # @!attribute [r] sources - # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Answer::CitationSource>] - # Output only. Contains citation sources for the attributed segment. - class AnswerCitation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Citation source. - # @!attribute [r] reference_index - # @return [::Integer] - # Output only. Contains the index of the - # {::Google::Developers::DeveloperKnowledge::V1::Answer::AnswerReference Answer.AnswerReference} - # in the `references` repeated field. - class CitationSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a source. - # @!attribute [r] document_reference - # @return [::Google::Developers::DeveloperKnowledge::V1::Answer::DocumentReference] - # Output only. The reference document. - class AnswerReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a document. - # @!attribute [r] document_chunk - # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentChunk] - # Output only. Contains the document chunk. The `document_chunk.id` field - # is not set and will be empty. - class DocumentReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A DocumentChunk represents a piece of content from a - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} in the DeveloperKnowledge - # corpus. To fetch the entire document content, pass the `parent` to - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - # @!attribute [r] parent - # @return [::String] - # Output only. Contains the resource name of the document this chunk is from. - # Format: `documents/{uri_without_scheme}` - # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` - # @!attribute [r] id - # @return [::String] - # Output only. Specifies the ID of this chunk within the document. The chunk - # ID is unique within a document, but not globally unique across documents. - # The chunk ID is not stable and may change over time. - # @!attribute [r] content - # @return [::String] - # Output only. Contains the content of the document chunk. - # @!attribute [r] document - # @return [::Google::Developers::DeveloperKnowledge::V1::Document] - # Output only. Represents metadata about the - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} this chunk is from. The - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of this - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} message will be set to - # `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients - # do not need to call - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # if they only need the metadata fields. Otherwise, clients should use - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # or - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments} - # to fetch the full document content. - class DocumentChunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies which fields of the - # {::Google::Developers::DeveloperKnowledge::V1::Document Document} are included. - module DocumentView - # The default / unset value. See each API method for its default value if - # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} is not - # specified. - DOCUMENT_VIEW_UNSPECIFIED = 0 - - # Includes only the basic metadata fields: - # - # - `name` - # - `uri` - # - `data_source` - # - `title` - # - `description` - # - `update_time` - # - `view` - # - `content_length_bytes` - # - # This is the default of view for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}. - DOCUMENT_VIEW_BASIC = 1 - - # Includes all {::Google::Developers::DeveloperKnowledge::V1::Document Document} fields. - DOCUMENT_VIEW_FULL = 2 - - # Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. - # - # This is the default of view for - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument} - # and - # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}. - DOCUMENT_VIEW_CONTENT = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/Gemfile deleted file mode 100644 index c5326ddd4ac6..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-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-developers-developer_knowledge-v1", path: "../" -else - gem "google-developers-developer_knowledge-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-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb deleted file mode 100644 index 1da8579829f3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/answer_query.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the answer_query call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query. -# -def answer_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new - - # Call the answer_query method. - result = client.answer_query request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb deleted file mode 100644 index 6ea4b06d9af5..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/batch_get_documents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the batch_get_documents call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents. -# -def batch_get_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new - - # Call the batch_get_documents method. - result = client.batch_get_documents request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb deleted file mode 100644 index 8cee8fa202c9..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/get_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the get_document call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document. -# -def get_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new - - # Call the get_document method. - result = client.get_document request - - # The returned object is of type Google::Developers::DeveloperKnowledge::V1::Document. - p result -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb deleted file mode 100644 index bccd09dd9fcf..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/developer_knowledge/search_document_chunks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] -require "google/developers/developer_knowledge/v1" - -## -# Snippet for the search_document_chunks call in the DeveloperKnowledge service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks. -# -def search_document_chunks - # Create a client object. The client can be reused for multiple calls. - client = Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new - - # Call the search_document_chunks method. - result = client.search_document_chunks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Developers::DeveloperKnowledge::V1::DocumentChunk. - p item - end -end -# [END developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync] diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json b/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json deleted file mode 100644 index 9a973865b831..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/snippets/snippet_metadata_google.developers.knowledge.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-developers-developer_knowledge-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.developers.knowledge.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_SearchDocumentChunks_sync", - "title": "Snippet for the search_document_chunks call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks.", - "file": "developer_knowledge/search_document_chunks.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_document_chunks", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "SearchDocumentChunks", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_GetDocument_sync", - "title": "Snippet for the get_document call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document.", - "file": "developer_knowledge/get_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_document", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::Document", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "GetDocument", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.GetDocument", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_BatchGetDocuments_sync", - "title": "Snippet for the batch_get_documents call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents.", - "file": "developer_knowledge/batch_get_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_documents", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "BatchGetDocuments", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerknowledge_v1_generated_DeveloperKnowledge_AnswerQuery_sync", - "title": "Snippet for the answer_query call in the DeveloperKnowledge service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query.", - "file": "developer_knowledge/answer_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "answer_query", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#answer_query", - "async": false, - "parameters": [ - { - "type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse", - "client": { - "short_name": "DeveloperKnowledge::Client", - "full_name": "::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client" - }, - "method": { - "short_name": "AnswerQuery", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge.AnswerQuery", - "service": { - "short_name": "DeveloperKnowledge", - "full_name": "google.developers.knowledge.v1.DeveloperKnowledge" - } - } - }, - "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-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_paths_test.rb deleted file mode 100644 index 025870f575c3..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/developer_knowledge/v1/developer_knowledge" - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_document_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.document_path document: "value0" - assert_equal "documents/value0", path - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb deleted file mode 100644 index 9521d08dc860..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_rest_test.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge/rest" - - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - query = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_document_chunks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_search_document_chunks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_document_chunks_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_document_chunks_client_stub.call_count - end - end - end - - def test_get_document - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::Document.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DOCUMENT_VIEW_UNSPECIFIED - - get_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_get_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_document_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_document({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_document name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_document({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_count - end - end - end - - def test_batch_get_documents - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - names = ["hello world"] - view = :DOCUMENT_VIEW_UNSPECIFIED - - batch_get_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_batch_get_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_documents_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_get_documents({ names: names, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_get_documents names: names, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_get_documents({ names: names, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_count - end - end - end - - def test_answer_query - # Create test objects. - client_result = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - query = "hello world" - - answer_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::ServiceStub.stub :transcode_answer_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, answer_query_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.answer_query({ query: query }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.answer_query query: query do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.answer_query({ query: query }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, answer_query_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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_test.rb deleted file mode 100644 index a43b73fefb45..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/google/developers/developer_knowledge/v1/developer_knowledge_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/developers/knowledge/v1/developerknowledge_pb" -require "google/developers/developer_knowledge/v1/developer_knowledge" - -class ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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_search_document_chunks - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - query = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_document_chunks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_document_chunks, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest, request - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_document_chunks_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_document_chunks query: query, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_document_chunks ::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_document_chunks({ query: query, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_document_chunks(::Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.new(query: query, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_document_chunks_client_stub.call_rpc_count - end - end - - def test_get_document - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::Document.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = :DOCUMENT_VIEW_UNSPECIFIED - - get_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_document, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest, request - assert_equal "hello world", request["name"] - assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_document_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_document({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_document name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_document ::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_document({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_document(::Google::Developers::DeveloperKnowledge::V1::GetDocumentRequest.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_document_client_stub.call_rpc_count - end - end - - def test_batch_get_documents - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - names = ["hello world"] - view = :DOCUMENT_VIEW_UNSPECIFIED - - batch_get_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_documents, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest, request - assert_equal ["hello world"], request["names"] - assert_equal :DOCUMENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_documents_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_get_documents({ names: names, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_get_documents names: names, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_get_documents ::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_get_documents({ names: names, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_get_documents(::Google::Developers::DeveloperKnowledge::V1::BatchGetDocumentsRequest.new(names: names, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_rpc_count - end - end - - def test_answer_query - # Create GRPC objects. - grpc_response = ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - query = "hello world" - - answer_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :answer_query, name - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest, request - assert_equal "hello world", request["query"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, answer_query_client_stub do - # Create client - c = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.answer_query({ query: query }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.answer_query query: query do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.answer_query ::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.answer_query({ query: query }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.answer_query(::Google::Developers::DeveloperKnowledge::V1::AnswerQueryRequest.new(query: query), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, answer_query_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::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::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb b/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-developers-developer_knowledge-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials-v1/.gitignore b/owl-bot-staging/google-iam-credentials-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 f135131dde2c..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.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-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 6165a018ba38..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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - 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 e50c0aa546c8..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb +++ /dev/null @@ -1,33 +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 -pool.add_serialized_file(descriptor_data) - -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 e7e7c3b84421..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb +++ /dev/null @@ -1,856 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 00f36f66f3e4..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +++ /dev/null @@ -1,785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 e27e78574f32..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb +++ /dev/null @@ -1,24 +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 -pool.add_serialized_file(descriptor_data) - -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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-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 e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-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 3b870f137cb7..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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.sign_blob({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.sign_blob name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.sign_jwt name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 6fc2459f3e5f..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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v2/.gitignore b/owl-bot-staging/google-iam-v2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v2/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v2/.repo-metadata.json b/owl-bot-staging/google-iam-v2/.repo-metadata.json deleted file mode 100644 index f361454bbf48..000000000000 --- a/owl-bot-staging/google-iam-v2/.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-v2", - "distribution_name": "google-iam-v2", - "is_cloud": false, - "language": "ruby", - "name": "iam", - "name_pretty": "IAM V2 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. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v2/.rubocop.yml b/owl-bot-staging/google-iam-v2/.rubocop.yml deleted file mode 100644 index 34e52b136070..000000000000 --- a/owl-bot-staging/google-iam-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-iam-v2.rb" diff --git a/owl-bot-staging/google-iam-v2/.toys.rb b/owl-bot-staging/google-iam-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-iam-v2/.yardopts b/owl-bot-staging/google-iam-v2/.yardopts deleted file mode 100644 index 74817379a031..000000000000 --- a/owl-bot-staging/google-iam-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="IAM V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-iam-v2/AUTHENTICATION.md b/owl-bot-staging/google-iam-v2/AUTHENTICATION.md deleted file mode 100644 index 6a0825ac614f..000000000000 --- a/owl-bot-staging/google-iam-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-iam-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/iam/v2" - -client = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v2" - -::Google::Iam::V2::Policies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V2::Policies::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-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/iam/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V2::Policies::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-v2/CHANGELOG.md b/owl-bot-staging/google-iam-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v2/Gemfile b/owl-bot-staging/google-iam-v2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v2/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v2/LICENSE.md b/owl-bot-staging/google-iam-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-iam-v2/README.md b/owl-bot-staging/google-iam-v2/README.md deleted file mode 100644 index 52e492f214ea..000000000000 --- a/owl-bot-staging/google-iam-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the IAM V2 API - -Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. - -Manages identity and access control policies for Google Cloud Platform 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 IAM V2 API. Most users should consider using -the main client gem, -[google-iam-client](https://rubygems.org/gems/google-iam-client). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v2" - -client = ::Google::Iam::V2::Policies::Client.new -request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_policies request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-iam-v2) -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/v2" -require "logger" - -client = ::Google::Iam::V2::Policies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam-client`, -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-client`. -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-v2/Rakefile b/owl-bot-staging/google-iam-v2/Rakefile deleted file mode 100644 index 17091d3aff5d..000000000000 --- a/owl-bot-staging/google-iam-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-iam-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/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-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-iam-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-iam-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-iam-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v2" - header "google-iam-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-iam-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-iam-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-iam-v2/gapic_metadata.json b/owl-bot-staging/google-iam-v2/gapic_metadata.json deleted file mode 100644 index f9325ed5c881..000000000000 --- a/owl-bot-staging/google-iam-v2/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.iam.v2", - "libraryPackage": "::Google::Iam::V2", - "services": { - "Policies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V2::Policies::Client", - "rpcs": { - "ListPolicies": { - "methods": [ - "list_policies" - ] - }, - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "CreatePolicy": { - "methods": [ - "create_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "DeletePolicy": { - "methods": [ - "delete_policy" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec b/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec deleted file mode 100644 index e7bf97f93984..000000000000 --- a/owl-bot-staging/google-iam-v2/google-iam-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v2" - gem.version = Google::Iam::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control policies for Google Cloud Platform resources. Note that google-iam-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-client instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb b/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb deleted file mode 100644 index 976c5cee3515..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google-iam-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/iam/v2" diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb deleted file mode 100644 index fc5ba38b2a63..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v2/policies" -require "google/iam/v2/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v2" - # client = ::Google::Iam::V2::Policies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v2" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module V2 - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/iam/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb deleted file mode 100644 index 13a714e88610..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/deny_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v2/deny.proto - -require 'google/protobuf' - -require 'google/type/expr_pb' - - -descriptor_data = "\n\x18google/iam/v2/deny.proto\x12\rgoogle.iam.v2\x1a\x16google/type/expr.proto\"\xab\x01\n\x08\x44\x65nyRule\x12\x19\n\x11\x64\x65nied_principals\x18\x01 \x03(\t\x12\x1c\n\x14\x65xception_principals\x18\x02 \x03(\t\x12\x1a\n\x12\x64\x65nied_permissions\x18\x03 \x03(\t\x12\x1d\n\x15\x65xception_permissions\x18\x04 \x03(\t\x12+\n\x10\x64\x65nial_condition\x18\x05 \x01(\x0b\x32\x11.google.type.ExprB{\n\x11\x63om.google.iam.v2B\rDenyRuleProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V2 - DenyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DenyRule").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb deleted file mode 100644 index 7c30e2a1e284..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v2/version" - -require "google/iam/v2/policies/credentials" -require "google/iam/v2/policies/operations" -require "google/iam/v2/policies/client" -require "google/iam/v2/policies/rest" - -module Google - module Iam - module V2 - ## - # An interface for managing Identity and Access Management (IAM) policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v2/policies" - # client = ::Google::Iam::V2::Policies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v2/policies/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module Policies - end - end - end -end - -helper_path = ::File.join __dir__, "policies", "helpers.rb" -require "google/iam/v2/policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb deleted file mode 100644 index 9484b167af02..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/client.rb +++ /dev/null @@ -1,989 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v2/policy_pb" - -module Google - module Iam - module V2 - module Policies - ## - # Client for the Policies service. - # - # An interface for managing Identity and Access Management (IAM) policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :policies_stub - - ## - # Configure the Policies Client class. - # - # See {::Google::Iam::V2::Policies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Policies clients - # ::Google::Iam::V2::Policies::Client.configure do |config| - # config.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", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_policies.timeout = 60.0 - default_config.rpcs.list_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_policy.timeout = 60.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_policy.timeout = 60.0 - default_config.rpcs.create_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy.timeout = 60.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_policy.timeout = 60.0 - default_config.rpcs.delete_policy.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 Policies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V2::Policies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policies_stub.universe_domain - end - - ## - # Create a new Policies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V2::Policies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V2::Policies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Policies 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/v2/policy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @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 - - @policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V2::Policies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policies_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::Iam::V2::Policies::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @policies_stub.logger - end - - # Service calls - - ## - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - # - # @overload list_policies(request, options = nil) - # Pass arguments to `list_policies` via a request object, either of type - # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param page_size [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @param page_token [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V2::Policy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::ListPoliciesRequest.new - # - # # Call the list_policies method. - # result = client.list_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V2::Policy. - # p item - # end - # - def list_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :list_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policies_stub, :list_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V2::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V2::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Iam::V2::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :get_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a policy. - # - # @overload create_policy(request, options = nil) - # Pass arguments to `create_policy` via a request object, either of type - # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy(parent: nil, policy: nil, policy_id: nil) - # Pass arguments to `create_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to create. - # @param policy_id [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::CreatePolicyRequest.new - # - # # Call the create_policy method. - # result = client.create_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :create_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use {::Google::Iam::V2::Policies::Client#get_policy GetPolicy} to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :update_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy. This action is permanent. - # - # @overload delete_policy(request, options = nil) - # Pass arguments to `delete_policy` via a request object, either of type - # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy(name: nil, etag: nil) - # Pass arguments to `delete_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param etag [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `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/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::DeletePolicyRequest.new - # - # # Call the delete_policy method. - # result = client.delete_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.call_rpc :delete_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Policies API. - # - # This class represents the configuration for Policies, - # providing control 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::V2::Policies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V2::Policies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V2::Policies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V2::Policies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Policies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policies - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `create_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `delete_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy - - # @private - def initialize parent_rpcs = nil - list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies - @list_policies = ::Gapic::Config::Method.new list_policies_config - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy - @create_policy = ::Gapic::Config::Method.new create_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy - @delete_policy = ::Gapic::Config::Method.new delete_policy_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.rb deleted file mode 100644 index 99a803e1b8c6..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/credentials.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 "googleauth" - -module Google - module Iam - module V2 - module Policies - # Credentials for the Policies 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 diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/operations.rb deleted file mode 100644 index 1f11efd8851b..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam - module V2 - module Policies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb deleted file mode 100644 index c1f6d1def0ec..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v2/version" - -require "google/iam/v2/policies/credentials" -require "google/iam/v2/policies/rest/operations" -require "google/iam/v2/policies/rest/client" - -module Google - module Iam - module V2 - ## - # An interface for managing Identity and Access Management (IAM) policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v2/policies/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module Policies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v2/policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb deleted file mode 100644 index c440f4d15471..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/client.rb +++ /dev/null @@ -1,911 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v2/policy_pb" -require "google/iam/v2/policies/rest/service_stub" - -module Google - module Iam - module V2 - module Policies - module Rest - ## - # REST client for the Policies service. - # - # An interface for managing Identity and Access Management (IAM) policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :policies_stub - - ## - # Configure the Policies Client class. - # - # See {::Google::Iam::V2::Policies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Policies clients - # ::Google::Iam::V2::Policies::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", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_policies.timeout = 60.0 - default_config.rpcs.list_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_policy.timeout = 60.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_policy.timeout = 60.0 - default_config.rpcs.create_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy.timeout = 60.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_policy.timeout = 60.0 - default_config.rpcs.delete_policy.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 Policies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V2::Policies::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 - @policies_stub.universe_domain - end - - ## - # Create a new Policies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Policies 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::Iam::V2::Policies::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 - - @policies_stub = ::Google::Iam::V2::Policies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policies_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::Iam::V2::Policies::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @policies_stub.logger - end - - # Service calls - - ## - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - # - # @overload list_policies(request, options = nil) - # Pass arguments to `list_policies` via a request object, either of type - # {::Google::Iam::V2::ListPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::ListPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param page_size [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @param page_token [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::ListPoliciesRequest.new - # - # # Call the list_policies method. - # result = client.list_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V2::Policy. - # p item - # end - # - def list_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::ListPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.list_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policies_stub, :list_policies, "policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a policy. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Iam::V2::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V2::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Iam::V2::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.get_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a policy. - # - # @overload create_policy(request, options = nil) - # Pass arguments to `create_policy` via a request object, either of type - # {::Google::Iam::V2::CreatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::CreatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy(parent: nil, policy: nil, policy_id: nil) - # Pass arguments to `create_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to create. - # @param policy_id [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::CreatePolicyRequest.new - # - # # Call the create_policy method. - # result = client.create_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::CreatePolicyRequest - - # Converts hash and nil to an 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_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.create_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use {::Google::Iam::V2::Policies::Rest::Client#get_policy GetPolicy} to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Iam::V2::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Iam::V2::Policy, ::Hash] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.update_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy. This action is permanent. - # - # @overload delete_policy(request, options = nil) - # Pass arguments to `delete_policy` via a request object, either of type - # {::Google::Iam::V2::DeletePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V2::DeletePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy(name: nil, etag: nil) - # Pass arguments to `delete_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @param etag [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `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/iam/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V2::Policies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V2::DeletePolicyRequest.new - # - # # Call the delete_policy method. - # result = client.delete_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V2::DeletePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policies_stub.delete_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Policies REST API. - # - # This class represents the configuration for Policies 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::V2::Policies::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_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V2::Policies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 Policies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policies - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `create_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `delete_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy - - # @private - def initialize parent_rpcs = nil - list_policies_config = parent_rpcs.list_policies if parent_rpcs.respond_to? :list_policies - @list_policies = ::Gapic::Config::Method.new list_policies_config - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - create_policy_config = parent_rpcs.create_policy if parent_rpcs.respond_to? :create_policy - @create_policy = ::Gapic::Config::Method.new create_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - delete_policy_config = parent_rpcs.delete_policy if parent_rpcs.respond_to? :delete_policy - @delete_policy = ::Gapic::Config::Method.new delete_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/operations.rb deleted file mode 100644 index 389d302a8513..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/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 Iam - module V2 - module Policies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Policies 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 Policies 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::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb deleted file mode 100644 index cfcc7003472b..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policies/rest/service_stub.rb +++ /dev/null @@ -1,386 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v2/policy_pb" - -module Google - module Iam - module V2 - module Policies - module Rest - ## - # REST service stub for the Policies 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_policies REST call - # - # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V2::ListPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::ListPoliciesResponse] - # A result object deserialized from the server's reply - def list_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V2::ListPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy REST call - # - # @param request_pb [::Google::Iam::V2::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V2::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V2::Policy] - # A result object deserialized from the server's reply - def get_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V2::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_policy REST call - # - # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy REST call - # - # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy REST call - # - # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_policies REST call - # - # @param request_pb [::Google::Iam::V2::ListPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}", - matches: [ - ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy REST call - # - # @param request_pb [::Google::Iam::V2::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_policy REST call - # - # @param request_pb [::Google::Iam::V2::CreatePolicyRequest] - # 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_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}", - body: "policy", - matches: [ - ["parent", %r{^policies/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy REST call - # - # @param request_pb [::Google::Iam::V2::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v2/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy REST call - # - # @param request_pb [::Google::Iam::V2::DeletePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^policies/[^/]+/[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb deleted file mode 100644 index ac1b3aaac015..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v2/policy.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/iam/v2/deny_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1agoogle/iam/v2/policy.proto\x12\rgoogle.iam.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/iam/v2/deny.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x03\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x11\n\x04kind\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12;\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32&.google.iam.v2.Policy.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12(\n\x05rules\x18\n \x03(\x0b\x32\x19.google.iam.v2.PolicyRule\x12\x1f\n\x12managing_authority\x18\x0b \x01(\tB\x03\xe0\x41\x05\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\nPolicyRule\x12,\n\tdeny_rule\x18\x02 \x01(\x0b\x32\x17.google.iam.v2.DenyRuleH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x06\n\x04kind\"Q\n\x13ListPoliciesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"X\n\x14ListPoliciesResponse\x12\'\n\x08policies\x18\x01 \x03(\x0b\x32\x15.google.iam.v2.Policy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"%\n\x10GetPolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"i\n\x13\x43reatePolicyRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\x12\x11\n\tpolicy_id\x18\x03 \x01(\t\"A\n\x13UpdatePolicyRequest\x12*\n\x06policy\x18\x01 \x01(\x0b\x32\x15.google.iam.v2.PolicyB\x03\xe0\x41\x02\";\n\x13\x44\x65letePolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"J\n\x17PolicyOperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xd0\x06\n\x08Policies\x12\x83\x01\n\x0cListPolicies\x12\".google.iam.v2.ListPoliciesRequest\x1a#.google.iam.v2.ListPoliciesResponse\"*\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{parent=policies/*/*}\x12m\n\tGetPolicy\x12\x1f.google.iam.v2.GetPolicyRequest\x1a\x15.google.iam.v2.Policy\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v2/{name=policies/*/*/*}\x12\xba\x01\n\x0c\x43reatePolicy\x12\".google.iam.v2.CreatePolicyRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x17parent,policy,policy_id\x82\xd3\xe4\x93\x02#\"\x19/v2/{parent=policies/*/*}:\x06policy\x12\xa7\x01\n\x0cUpdatePolicy\x12\".google.iam.v2.UpdatePolicyRequest\x1a\x1d.google.longrunning.Operation\"T\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\x82\xd3\xe4\x93\x02*\x1a /v2/{policy.name=policies/*/*/*}:\x06policy\x12\x9f\x01\n\x0c\x44\x65letePolicy\x12\".google.iam.v2.DeletePolicyRequest\x1a\x1d.google.longrunning.Operation\"L\xca\x41!\n\x06Policy\x12\x17PolicyOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v2/{name=policies/*/*/*}\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBy\n\x11\x63om.google.iam.v2B\x0bPolicyProtoP\x01Z)cloud.google.com/go/iam/apiv2/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V2\xca\x02\x13Google\\Cloud\\Iam\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V2 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.Policy").msgclass - PolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyRule").msgclass - ListPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesRequest").msgclass - ListPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.ListPoliciesResponse").msgclass - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.GetPolicyRequest").msgclass - CreatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.CreatePolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.UpdatePolicyRequest").msgclass - DeletePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.DeletePolicyRequest").msgclass - PolicyOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v2.PolicyOperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb deleted file mode 100644 index bd26fe57cd18..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/policy_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v2/policy.proto for package 'google.iam.v2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v2/policy_pb' - -module Google - module Iam - module V2 - module Policies - # An interface for managing Identity and Access Management (IAM) policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v2.Policies' - - # Retrieves the policies of the specified kind that are attached to a - # resource. - # - # The response lists only policy metadata. In particular, policy rules are - # omitted. - rpc :ListPolicies, ::Google::Iam::V2::ListPoliciesRequest, ::Google::Iam::V2::ListPoliciesResponse - # Gets a policy. - rpc :GetPolicy, ::Google::Iam::V2::GetPolicyRequest, ::Google::Iam::V2::Policy - # Creates a policy. - rpc :CreatePolicy, ::Google::Iam::V2::CreatePolicyRequest, ::Google::Longrunning::Operation - # Updates the specified policy. - # - # You can update only the rules and the display name for the policy. - # - # To update a policy, you should use a read-modify-write loop: - # - # 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - # 2. Modify the policy as needed. - # 3. Use `UpdatePolicy` to write the updated policy. - # - # This pattern helps prevent conflicts between concurrent updates. - rpc :UpdatePolicy, ::Google::Iam::V2::UpdatePolicyRequest, ::Google::Longrunning::Operation - # Deletes a policy. This action is permanent. - rpc :DeletePolicy, ::Google::Iam::V2::DeletePolicyRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb deleted file mode 100644 index d430e48053e6..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/rest.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v2/policies/rest" -require "google/iam/v2/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v2/rest" - # client = ::Google::Iam::V2::Policies::Rest::Client.new - # - module V2 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb b/owl-bot-staging/google-iam-v2/lib/google/iam/v2/version.rb deleted file mode 100644 index da9bc723e32d..000000000000 --- a/owl-bot-staging/google-iam-v2/lib/google/iam/v2/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 V2 - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/README.md b/owl-bot-staging/google-iam-v2/proto_docs/README.md deleted file mode 100644 index 155a17d3cb7c..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# IAM V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.rb deleted file mode 100644 index 85ac06367665..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/deny.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 Iam - module V2 - # A deny rule in an IAM deny policy. - # @!attribute [rw] denied_principals - # @return [::Array<::String>] - # The identities that are prevented from using one or more permissions on - # Google Cloud resources. This field can contain the following values: - # - # * `principalSet://goog/public:all`: A special identifier that represents - # any principal that is on the internet, even if they do not have a Google - # Account or are not logged in. - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - # the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # @!attribute [rw] exception_principals - # @return [::Array<::String>] - # The identities that are excluded from the deny rule, even if they are - # listed in the `denied_principals`. For example, you could add a Google - # group to the `denied_principals`, then exclude specific users who belong to - # that group. - # - # This field can contain the same values as the `denied_principals` field, - # excluding `principalSet://goog/public:all`, which represents all users on - # the internet. - # @!attribute [rw] denied_permissions - # @return [::Array<::String>] - # The permissions that are explicitly denied by this rule. Each permission - # uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - # is the fully qualified domain name for the service. For example, - # `iam.googleapis.com/roles.list`. - # @!attribute [rw] exception_permissions - # @return [::Array<::String>] - # Specifies the permissions that this rule excludes from the set of denied - # permissions given by `denied_permissions`. If a permission appears in - # `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - # denied. - # - # The excluded permissions can be specified using the same syntax as - # `denied_permissions`. - # @!attribute [rw] denial_condition - # @return [::Google::Type::Expr] - # The condition that determines whether this deny rule applies to a request. - # If the condition expression evaluates to `true`, then the deny rule is - # applied; otherwise, the deny rule is not applied. - # - # Each deny rule is evaluated independently. If this deny rule does not apply - # to a request, other deny rules might still apply. - # - # The condition can use CEL functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - # functions and operators are not supported. - class DenyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb deleted file mode 100644 index 917b870c27c0..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/iam/v2/policy.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V2 - # Data for an IAM policy. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the `Policy`, which must be unique. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, requests can use the alphanumeric or the numeric ID. - # Responses always contain the numeric ID. - # @!attribute [rw] uid - # @return [::String] - # Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - # `Policy` is created. - # @!attribute [r] kind - # @return [::String] - # Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - # @!attribute [rw] display_name - # @return [::String] - # A user-specified description of the `Policy`. This value can be up to 63 - # characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # A key-value map to store arbitrary metadata for the `Policy`. Keys - # can be up to 63 characters. Values can be up to 255 characters. - # @!attribute [rw] etag - # @return [::String] - # An opaque tag that identifies the current version of the `Policy`. IAM uses - # this value to help manage concurrent updates, so they do not cause one - # update to be overwritten by another. - # - # If this field is present in a [CreatePolicy][] request, the value is - # ignored. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V2::PolicyRule>] - # A list of rules that specify the behavior of the `Policy`. All of the rules - # should be of the `kind` specified in the `Policy`. - # @!attribute [rw] managing_authority - # @return [::String] - # Immutable. Specifies that this policy is managed by an authority and can only be - # modified by that authority. Usage is restricted. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single rule in a `Policy`. - # @!attribute [rw] deny_rule - # @return [::Google::Iam::V2::DenyRule] - # A rule for a deny policy. - # @!attribute [rw] description - # @return [::String] - # A user-specified description of the rule. This value can be up to 256 - # characters. - class PolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListPolicies`. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to list. Format: - # `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of policies to return. IAM ignores this value and uses - # the value 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to - # retrieve the next page. - class ListPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListPolicies`. - # @!attribute [rw] policies - # @return [::Array<::Google::Iam::V2::Policy>] - # Metadata for the policies that are attached to the resource. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that you can use in a {::Google::Iam::V2::ListPoliciesRequest ListPoliciesRequest} to retrieve the - # next page. If this field is omitted, there are no additional pages. - class ListPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the policy to retrieve. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `CreatePolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource that the policy is attached to, along with the kind of policy - # to create. Format: `policies/{attachment_point}/denypolicies` - # - # - # The attachment point is identified by its URL-encoded full resource name, - # which means that the forward-slash character, `/`, must be written as - # `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] policy - # @return [::Google::Iam::V2::Policy] - # Required. The policy to create. - # @!attribute [rw] policy_id - # @return [::String] - # The ID to use for this policy, which will become the final component of - # the policy's resource name. The ID must contain 3 to 63 characters. It can - # contain lowercase letters and numbers, as well as dashes (`-`) and periods - # (`.`). The first character must be a lowercase letter. - class CreatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `UpdatePolicy`. - # @!attribute [rw] policy - # @return [::Google::Iam::V2::Policy] - # Required. The policy to update. - # - # To prevent conflicting updates, the `etag` value must match the value that - # is stored in IAM. If the `etag` values do not match, the request fails with - # a `409` error code and `ABORTED` status. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DeletePolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the policy to delete. Format: - # `policies/{attachment_point}/denypolicies/{policy_id}` - # - # - # Use the URL-encoded full resource name, which means that the forward-slash - # character, `/`, must be written as `%2F`. For example, - # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - # - # For organizations and folders, use the numeric ID in the full resource - # name. For projects, you can use the alphanumeric or the numeric ID. - # @!attribute [rw] etag - # @return [::String] - # Optional. The expected `etag` of the policy to delete. If the value does not match - # the value that is stored in IAM, the request fails with a `409` error code - # and `ABORTED` status. - # - # If you omit this field, the policy is deleted regardless of its current - # `etag`. - class DeletePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for long-running `Policy` operations. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp when the `google.longrunning.Operation` was created. - class PolicyOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v2/snippets/Gemfile b/owl-bot-staging/google-iam-v2/snippets/Gemfile deleted file mode 100644 index 0b586e897f32..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-iam-v2", path: "../" -else - gem "google-iam-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb deleted file mode 100644 index 992efa4ac456..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/create_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_CreatePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the create_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#create_policy. -# -def create_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::CreatePolicyRequest.new - - # Call the create_policy method. - result = client.create_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb deleted file mode 100644 index 97dbcb650132..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/delete_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_DeletePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the delete_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#delete_policy. -# -def delete_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::DeletePolicyRequest.new - - # Call the delete_policy method. - result = client.delete_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb deleted file mode 100644 index 6820282d9a3b..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/get_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_GetPolicy_sync] -require "google/iam/v2" - -## -# Snippet for the get_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#get_policy. -# -def get_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::GetPolicyRequest.new - - # Call the get_policy method. - result = client.get_policy request - - # The returned object is of type Google::Iam::V2::Policy. - p result -end -# [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb b/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb deleted file mode 100644 index d7d580e8441f..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/list_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_ListPolicies_sync] -require "google/iam/v2" - -## -# Snippet for the list_policies call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#list_policies. -# -def list_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::ListPoliciesRequest.new - - # Call the list_policies method. - result = client.list_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V2::Policy. - p item - end -end -# [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb b/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb deleted file mode 100644 index 417fd211883b..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/policies/update_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v2_generated_Policies_UpdatePolicy_sync] -require "google/iam/v2" - -## -# Snippet for the update_policy call in the Policies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V2::Policies::Client#update_policy. -# -def update_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V2::Policies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V2::UpdatePolicyRequest.new - - # Call the update_policy method. - result = client.update_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json b/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json deleted file mode 100644 index a44511598630..000000000000 --- a/owl-bot-staging/google-iam-v2/snippets/snippet_metadata_google.iam.v2.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v2_generated_Policies_ListPolicies_sync", - "title": "Snippet for the list_policies call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#list_policies.", - "file": "policies/list_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policies", - "full_name": "::Google::Iam::V2::Policies::Client#list_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::ListPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V2::ListPoliciesResponse", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "ListPolicies", - "full_name": "google.iam.v2.Policies.ListPolicies", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_GetPolicy_sync", - "title": "Snippet for the get_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#get_policy.", - "file": "policies/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Iam::V2::Policies::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V2::Policy", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.iam.v2.Policies.GetPolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_CreatePolicy_sync", - "title": "Snippet for the create_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#create_policy.", - "file": "policies/create_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy", - "full_name": "::Google::Iam::V2::Policies::Client#create_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::CreatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "CreatePolicy", - "full_name": "google.iam.v2.Policies.CreatePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#update_policy.", - "file": "policies/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Iam::V2::Policies::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.iam.v2.Policies.UpdatePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v2_generated_Policies_DeletePolicy_sync", - "title": "Snippet for the delete_policy call in the Policies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V2::Policies::Client#delete_policy.", - "file": "policies/delete_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy", - "full_name": "::Google::Iam::V2::Policies::Client#delete_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V2::DeletePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Policies::Client", - "full_name": "::Google::Iam::V2::Policies::Client" - }, - "method": { - "short_name": "DeletePolicy", - "full_name": "google.iam.v2.Policies.DeletePolicy", - "service": { - "short_name": "Policies", - "full_name": "google.iam.v2.Policies" - } - } - }, - "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-iam-v2/test/google/iam/v2/policies_operations_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_operations_test.rb deleted file mode 100644 index 7dcd32b68c5f..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_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/iam/v2/policy_pb" -require "google/iam/v2/policy_services_pb" -require "google/iam/v2/policies" - -class ::Google::Iam::V2::Policies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb deleted file mode 100644 index fbecbeaf511a..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v2/policy_pb" -require "google/iam/v2/policies/rest" - - -class ::Google::Iam::V2::Policies::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_policies - # Create test objects. - client_result = ::Google::Iam::V2::ListPoliciesResponse.new - http_response = OpenStruct.new 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_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_list_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policies_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_count - end - end - end - - def test_get_policy - # Create test objects. - client_result = ::Google::Iam::V2::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_count - end - end - end - - def test_create_policy - # Create test objects. - 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" - policy = {} - policy_id = "hello world" - - create_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_create_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy parent: parent, policy: policy, policy_id: policy_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_client_stub.call_count - end - end - end - - def test_update_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy({ policy: policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy policy: policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy({ policy: policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_count - end - end - end - - def test_delete_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V2::Policies::Rest::ServiceStub.stub :transcode_delete_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::V2::Policies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb b/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb deleted file mode 100644 index 8a3804aaab70..000000000000 --- a/owl-bot-staging/google-iam-v2/test/google/iam/v2/policies_test.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v2/policy_pb" -require "google/iam/v2/policies" - -class ::Google::Iam::V2::Policies::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_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V2::ListPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policies, name - assert_kind_of ::Google::Iam::V2::ListPoliciesRequest, 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_policies_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policies ::Google::Iam::V2::ListPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policies(::Google::Iam::V2::ListPoliciesRequest.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_policies_client_stub.call_rpc_count - end - end - - def test_get_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V2::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Iam::V2::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy ::Google::Iam::V2::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy(::Google::Iam::V2::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_rpc_count - end - end - - def test_create_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy = {} - policy_id = "hello world" - - create_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy, name - assert_kind_of ::Google::Iam::V2::CreatePolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] - assert_equal "hello world", request["policy_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy parent: parent, policy: policy, policy_id: policy_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy ::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy({ parent: parent, policy: policy, policy_id: policy_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy(::Google::Iam::V2::CreatePolicyRequest.new(parent: parent, policy: policy, policy_id: policy_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_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Iam::V2::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V2::Policy), request["policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy({ policy: policy }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy policy: policy do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy ::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy({ policy: policy }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy(::Google::Iam::V2::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| - assert_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_policy_client_stub.call_rpc_count - end - end - - def test_delete_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy, name - assert_kind_of ::Google::Iam::V2::DeletePolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_client_stub do - # Create client - c = ::Google::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy ::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy(::Google::Iam::V2::DeletePolicyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V2::Policies::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::V2::Policies::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::V2::Policies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V2::Policies::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::Iam::V2::Policies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V2::Policies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v2/test/helper.rb b/owl-bot-staging/google-iam-v2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v2/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v3/.gitignore b/owl-bot-staging/google-iam-v3/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v3/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v3/.repo-metadata.json b/owl-bot-staging/google-iam-v3/.repo-metadata.json deleted file mode 100644 index 99b5e3acd3ae..000000000000 --- a/owl-bot-staging/google-iam-v3/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest", - "distribution_name": "google-iam-v3", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3 API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3/.rubocop.yml b/owl-bot-staging/google-iam-v3/.rubocop.yml deleted file mode 100644 index a513a8400ebb..000000000000 --- a/owl-bot-staging/google-iam-v3/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v3.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-v3.rb" diff --git a/owl-bot-staging/google-iam-v3/.toys.rb b/owl-bot-staging/google-iam-v3/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v3/.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-v3/.yardopts b/owl-bot-staging/google-iam-v3/.yardopts deleted file mode 100644 index b0b7998f4801..000000000000 --- a/owl-bot-staging/google-iam-v3/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) V3 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-v3/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3/AUTHENTICATION.md deleted file mode 100644 index 8f81a23b250f..000000000000 --- a/owl-bot-staging/google-iam-v3/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v3 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-v3 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/v3" - -client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3" - -::Google::Iam::V3::AccessPolicies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3::AccessPolicies::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-v3 -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/v3" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3::AccessPolicies::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-v3/CHANGELOG.md b/owl-bot-staging/google-iam-v3/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3/Gemfile b/owl-bot-staging/google-iam-v3/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v3/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3/LICENSE.md b/owl-bot-staging/google-iam-v3/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/README.md b/owl-bot-staging/google-iam-v3/README.md deleted file mode 100644 index d40036b5625e..000000000000 --- a/owl-bot-staging/google-iam-v3/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3 API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Identity and Access Management (IAM) V3 API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v3 -``` - -## 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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3" - -client = ::Google::Iam::V3::AccessPolicies::Client.new -request = ::Google::Iam::V3::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_access_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3" -require "logger" - -client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-v3`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-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-v3`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-iam-v3/Rakefile b/owl-bot-staging/google-iam-v3/Rakefile deleted file mode 100644 index 0b6c7b75d2e4..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3 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/v3/access_policies/credentials" - ::Google::Iam::V3::AccessPolicies::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-v3 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-v3 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-v3 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-v3 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3" - header "google-iam-v3 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v3 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-v3 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-v3 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-v3/gapic_metadata.json b/owl-bot-staging/google-iam-v3/gapic_metadata.json deleted file mode 100644 index 62878ea653a0..000000000000 --- a/owl-bot-staging/google-iam-v3/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3", - "libraryPackage": "::Google::Iam::V3", - "services": { - "AccessPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::AccessPolicies::Client", - "rpcs": { - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "SearchAccessPolicyBindings": { - "methods": [ - "search_access_policy_bindings" - ] - } - } - } - } - }, - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec b/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec deleted file mode 100644 index 36aa9ae1b51a..000000000000 --- a/owl-bot-staging/google-iam-v3/google-iam-v3.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3" - gem.version = Google::Iam::V3::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb b/owl-bot-staging/google-iam-v3/lib/google-iam-v3.rb deleted file mode 100644 index 567b503c671b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google-iam-v3.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/v3" diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3.rb deleted file mode 100644 index b4c095ee8854..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3.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/v3/access_policies" -require "google/iam/v3/policy_bindings" -require "google/iam/v3/principal_access_boundary_policies" -require "google/iam/v3/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module V3 - end - end -end - -helper_path = ::File.join __dir__, "v3", "_helpers.rb" -require "google/iam/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb deleted file mode 100644 index 5127f5311dc8..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/version" - -require "google/iam/v3/access_policies/credentials" -require "google/iam/v3/access_policies/paths" -require "google/iam/v3/access_policies/operations" -require "google/iam/v3/access_policies/client" -require "google/iam/v3/access_policies/rest" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) access policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/access_policies" - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/access_policies/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module AccessPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "access_policies", "helpers.rb" -require "google/iam/v3/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb deleted file mode 100644 index 64961d0c2f2b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/client.rb +++ /dev/null @@ -1,1113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/access_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module AccessPolicies - ## - # Client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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/v3/access_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::AccessPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_policy&.name - header_params["access_policy.name"] = request.access_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. - # - # This class represents the configuration for AccessPolicies, - # providing control 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::V3::AccessPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::AccessPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.rb deleted file mode 100644 index f165dafeae74..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module AccessPolicies - # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/operations.rb deleted file mode 100644 index 706c5cd82a59..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/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 Iam - module V3 - module AccessPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb deleted file mode 100644 index 870d21d50a77..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module AccessPolicies - # Path helper methods for the AccessPolicies API. - module Paths - ## - # Create a fully-qualified AccessPolicy resource string. - # - # @overload access_policy_path(organization:, location:, access_policy:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` - # - # @param organization [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(folder:, location:, access_policy:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` - # - # @param folder [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(project:, location:, access_policy:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` - # - # @param project [String] - # @param location [String] - # @param access_policy [String] - # - # @return [::String] - def access_policy_path **args - resources = { - "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:location:project" => (proc do |project:, location:, access_policy:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb deleted file mode 100644 index df4af139d08c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v3/version" - -require "google/iam/v3/access_policies/credentials" -require "google/iam/v3/access_policies/paths" -require "google/iam/v3/access_policies/rest/operations" -require "google/iam/v3/access_policies/rest/client" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) access policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/access_policies/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module AccessPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb deleted file mode 100644 index 3d26c85246d0..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/client.rb +++ /dev/null @@ -1,1028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/access_policies_service_pb" -require "google/iam/v3/access_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module AccessPolicies - module Rest - ## - # REST client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3::AccessPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3::AccessPolicies::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::AccessPolicies::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 - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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::Iam::V3::AccessPolicies::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 - - @access_policies_stub = ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreateAccessPolicyRequest - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.search_access_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. - # - # This class represents the configuration for AccessPolicies 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::V3::AccessPolicies::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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::AccessPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb deleted file mode 100644 index 45a22d4ef879..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module AccessPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb deleted file mode 100644 index 78afacefef95..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/access_policies_service_pb" - -module Google - module Iam - module V3 - module AccessPolicies - module Rest - ## - # REST service stub for the AccessPolicies 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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::AccessPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListAccessPoliciesResponse.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_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchAccessPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchAccessPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_access_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreateAccessPolicyRequest] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/accessPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchAccessPolicyBindingsRequest] - # 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_access_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb deleted file mode 100644 index 2f20e83c23b6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/access_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/access_policy_resources_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n+google/iam/v3/access_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/iam/v3/access_policy_resources.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc8\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"p\n\x19UpdateAccessPolicyRequest\x12\x37\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1b.google.iam.v3.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"p\n\x1aListAccessPoliciesResponse\x12\x34\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1b.google.iam.v3.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchAccessPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xd2\x10\n\x0e\x41\x63\x63\x65ssPolicies\x12\x84\x03\n\x12\x43reateAccessPolicy\x12(.google.iam.v3.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa4\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xd1\x01\"2/v3/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZB\"1/v3/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZH\"7/v3/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x8a\x02\n\x0fGetAccessPolicy\x12%.google.iam.v3.GetAccessPolicyRequest\x1a\x1b.google.iam.v3.AccessPolicy\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/accessPolicies/*}Z3\x12\x31/v3/{name=folders/*/locations/*/accessPolicies/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\x86\x03\n\x12UpdateAccessPolicy\x12(.google.iam.v3.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xfb\x01\x32@/v3/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZP2?/v3/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZV2E/v3/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xbf\x02\n\x12\x44\x65leteAccessPolicy\x12(.google.iam.v3.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/accessPolicies/*}Z3*1/v3/{name=folders/*/locations/*/accessPolicies/*}Z9*7/v3/{name=organizations/*/locations/*/accessPolicies/*}\x12\xa0\x02\n\x12ListAccessPolicies\x12(.google.iam.v3.ListAccessPoliciesRequest\x1a).google.iam.v3.ListAccessPoliciesResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/accessPoliciesZ3\x12\x31/v3/{parent=folders/*/locations/*}/accessPoliciesZ9\x12\x37/v3/{parent=organizations/*/locations/*}/accessPolicies\x12\xf5\x02\n\x1aSearchAccessPolicyBindings\x12\x30.google.iam.v3.SearchAccessPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchAccessPolicyBindingsResponse\"\xf1\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe3\x01\x12L/v3/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZH\x12\x46/v3/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZI\x12G/v3/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\x11\x63om.google.iam.v3B\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreateAccessPolicyRequest").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeleteAccessPolicyRequest").msgclass - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListAccessPoliciesResponse").msgclass - SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsRequest").msgclass - SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchAccessPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb deleted file mode 100644 index 7f9dfed767c4..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policies_service_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/access_policies_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/access_policies_service_pb' - -module Google - module Iam - module V3 - module AccessPolicies - # Manages Identity and Access Management (IAM) access policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.AccessPolicies' - - # Creates an access policy, and returns a long running operation. - rpc :CreateAccessPolicy, ::Google::Iam::V3::CreateAccessPolicyRequest, ::Google::Longrunning::Operation - # Gets an access policy. - rpc :GetAccessPolicy, ::Google::Iam::V3::GetAccessPolicyRequest, ::Google::Iam::V3::AccessPolicy - # Updates an access policy. - rpc :UpdateAccessPolicy, ::Google::Iam::V3::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an access policy. - rpc :DeleteAccessPolicy, ::Google::Iam::V3::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists access policies. - rpc :ListAccessPolicies, ::Google::Iam::V3::ListAccessPoliciesRequest, ::Google::Iam::V3::ListAccessPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchAccessPolicyBindings, ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3::SearchAccessPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb deleted file mode 100644 index 71dd0c5bd31b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/access_policy_resources_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/access_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n+google/iam/v3/access_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb1\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32,.google.iam.v3.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\".google.iam.v3.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"J\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x33\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3.AccessPolicyRuleB\x03\xe0\x41\x02\"\x9d\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12@\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32&.google.iam.v3.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x41\n\toperation\x18\n \x01(\x0b\x32).google.iam.v3.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12H\n\nconditions\x18\t \x03(\x0b\x32/.google.iam.v3.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x88\x01\n\x11\x63om.google.iam.v3B\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicy").msgclass - AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyDetails").msgclass - AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule").msgclass - AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Operation").msgclass - AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.AccessPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb deleted file mode 100644 index d0c9141ce226..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/iam/v3/operation_metadata.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x84\x01\n\x11\x63om.google.iam.v3B\x16OperationMetadataProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb deleted file mode 100644 index efa28f12adb1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n,google/iam/v3/policy_binding_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xfb\x07\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.google.iam.v3.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x06target\x18\x06 \x01(\x0b\x32#.google.iam.v3.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x41\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32\'.google.iam.v3.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x89\x01\n\x11\x63om.google.iam.v3B\x1bPolicyBindingResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.rb deleted file mode 100644 index 89b89d81de14..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings.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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/operations" -require "google/iam/v3/policy_bindings/client" -require "google/iam/v3/policy_bindings/rest" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/policy_bindings" - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb deleted file mode 100644 index cafa48df11dd..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/client.rb +++ /dev/null @@ -1,1157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/v3/policy_bindings_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PolicyBindings::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control 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::V3::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V3::PolicyBindings::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.rb deleted file mode 100644 index a3f91a0fb8fe..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/operations.rb deleted file mode 100644 index c0c1fbc2d13c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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 Iam - module V3 - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb deleted file mode 100644 index cc9e0c46ea72..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest.rb deleted file mode 100644 index 102093998bd5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/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/iam/v3/version" - -require "google/iam/v3/policy_bindings/credentials" -require "google/iam/v3/policy_bindings/paths" -require "google/iam/v3/policy_bindings/rest/operations" -require "google/iam/v3/policy_bindings/rest/client" - -module Google - module Iam - module V3 - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/policy_bindings/rest" - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb deleted file mode 100644 index 5b8aac9f4ccf..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1072 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3::PolicyBindings::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::V3::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb deleted file mode 100644 index 0856b3e5604d..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ba0446cdb560..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3/policy_bindings_service_pb" - -module Google - module Iam - module V3 - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PolicyBinding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb deleted file mode 100644 index 15d4b16597d4..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/policy_bindings_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n+google/iam/v3/policy_bindings_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xcd\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xa9\x01\n\x1aUpdatePolicyBindingRequest\x12\x39\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32\x1c.google.iam.v3.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"q\n\x1aListPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"y\n\"SearchTargetPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa0\x11\n\x0ePolicyBindings\x12\x8c\x03\n\x13\x43reatePolicyBinding\x12).google.iam.v3.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xd4\x01\"2/v3/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZC\"1/v3/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZI\"7/v3/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\x8d\x02\n\x10GetPolicyBinding\x12&.google.iam.v3.GetPolicyBindingRequest\x1a\x1c.google.iam.v3.PolicyBinding\"\xb2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{name=projects/*/locations/*/policyBindings/*}Z3\x12\x31/v3/{name=folders/*/locations/*/policyBindings/*}Z9\x12\x37/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xac\x03\n\x13UpdatePolicyBinding\x12).google.iam.v3.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xca\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x81\x02\x32\x41/v3/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZR2@/v3/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZX2F/v3/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xc1\x02\n\x13\x44\x65letePolicyBinding\x12).google.iam.v3.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa4\x01*2/v3/{name=projects/*/locations/*/policyBindings/*}Z3*1/v3/{name=folders/*/locations/*/policyBindings/*}Z9*7/v3/{name=organizations/*/locations/*/policyBindings/*}\x12\xa0\x02\n\x12ListPolicyBindings\x12(.google.iam.v3.ListPolicyBindingsRequest\x1a).google.iam.v3.ListPolicyBindingsResponse\"\xb4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa4\x01\x12\x32/v3/{parent=projects/*/locations/*}/policyBindingsZ3\x12\x31/v3/{parent=folders/*/locations/*}/policyBindingsZ9\x12\x37/v3/{parent=organizations/*/locations/*}/policyBindings\x12\x90\x03\n\x1aSearchTargetPolicyBindings\x12\x30.google.iam.v3.SearchTargetPolicyBindingsRequest\x1a\x31.google.iam.v3.SearchTargetPolicyBindingsResponse\"\x8c\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\xf5\x01\x12M/v3/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZN\x12L/v3/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZT\x12R/v3/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb4\x02\n\x11\x63om.google.iam.v3B\x1aPolicyBindingsServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb deleted file mode 100644 index dc8f9d8742f2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/policy_bindings_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/policy_bindings_service_pb' - -module Google - module Iam - module V3 - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3::GetPolicyBindingRequest, ::Google::Iam::V3::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - rpc :UpdatePolicyBinding, ::Google::Iam::V3::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3::ListPolicyBindingsRequest, ::Google::Iam::V3::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.rb deleted file mode 100644 index 74a5371b0372..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies.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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/operations" -require "google/iam/v3/principal_access_boundary_policies/client" -require "google/iam/v3/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3/principal_access_boundary_policies" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb deleted file mode 100644 index 48eb0922884c..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3/principal_access_boundary_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control 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::V3::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index 84103a366146..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/operations.rb deleted file mode 100644 index 9d3205859719..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb deleted file mode 100644 index d7fbd72948b5..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/paths.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest.rb deleted file mode 100644 index 8e3308deab2f..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/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/iam/v3/version" - -require "google/iam/v3/principal_access_boundary_policies/credentials" -require "google/iam/v3/principal_access_boundary_policies/paths" -require "google/iam/v3/principal_access_boundary_policies/rest/operations" -require "google/iam/v3/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3 - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index 0ee7f3632d2b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1017 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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", "V3"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 7063c8a578e1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index f1c525adbc3a..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index 56f9951c56c1..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3/operation_metadata_pb' -require 'google/iam/v3/policy_binding_resources_pb' -require 'google/iam/v3/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policies_service.proto\x12\rgoogle.iam.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/iam/v3/operation_metadata.proto\x1a,google/iam/v3/policy_binding_resources.proto\x1a>google/iam/v3/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdb\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12[\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa5\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12X\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32,.google.iam.v3.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x35\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32\x1c.google.iam.v3.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xec\x0e\n\x1fPrincipalAccessBoundaryPolicies\x12\xf7\x02\n#CreatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02l\"H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xe1\x01\n GetPrincipalAccessBoundaryPolicy\x12\x36.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest\x1a,.google.iam.v3.PrincipalAccessBoundaryPolicy\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xfa\x02\n#UpdatePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf8\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x8d\x01\x32i/v3/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x86\x02\n#DeletePrincipalAccessBoundaryPolicy\x12\x39.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\xf7\x01\n#ListPrincipalAccessBoundaryPolicies\x12\x39.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest\x1a:.google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xa2\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x41.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x42.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v3/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index 4b3c7a40557b..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3/principal_access_boundary_policies_service.proto for package 'google.iam.v3' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3 - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index 2a5009d8b3b2..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n>google/iam/v3/principal_access_boundary_policy_resources.proto\x12\rgoogle.iam.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12W\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32=.google.iam.v3.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x33.google.iam.v3.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x8e\x01\n$PrincipalAccessBoundaryPolicyDetails\x12\x44\n\x05rules\x18\x01 \x03(\x0b\x32\x30.google.iam.v3.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd0\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12L\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32\x37.google.iam.v3.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\x99\x01\n\x11\x63om.google.iam.v3B+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z)cloud.google.com/go/iam/apiv3/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V3\xca\x02\x13Google\\Cloud\\Iam\\V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3 - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/rest.rb deleted file mode 100644 index 05510520f427..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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/v3/access_policies/rest" -require "google/iam/v3/policy_bindings/rest" -require "google/iam/v3/principal_access_boundary_policies/rest" -require "google/iam/v3/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3/rest" - # client = ::Google::Iam::V3::AccessPolicies::Rest::Client.new - # - module V3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb b/owl-bot-staging/google-iam-v3/lib/google/iam/v3/version.rb deleted file mode 100644 index 9892bb2c28a6..000000000000 --- a/owl-bot-staging/google-iam-v3/lib/google/iam/v3/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 V3 - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/README.md b/owl-bot-staging/google-iam-v3/proto_docs/README.md deleted file mode 100644 index 02d67f814ded..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) V3 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-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/iam/v3/access_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb deleted file mode 100644 index b3782521c647..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policies_service.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # Request message for CreateAccessPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] access_policy_id - # @return [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3::AccessPolicy] - # Required. The access policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateAccessPolicy method. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3::AccessPolicy] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListAccessPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListAccessPolicies method. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Iam::V3::AccessPolicy>] - # The access policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchAccessPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchAccessPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb deleted file mode 100644 index e48355d50330..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/access_policy_resources.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # An IAM access policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the access policy. - # - # The following formats are supported: - # - # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` - # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` - # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` - # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the access policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the access policy. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the access policy. Must be less than - # or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was most recently - # updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3::AccessPolicyDetails] - # Optional. The details for the access policy. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Access policy details. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3::AccessPolicyRule>] - # Required. A list of access policy rules. - class AccessPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Access Policy Rule that determines the behavior of the policy. - # @!attribute [rw] description - # @return [::String] - # Optional. Customer specified description of the rule. Must be less than or - # equal to 256 characters. - # @!attribute [rw] effect - # @return [::Google::Iam::V3::AccessPolicyRule::Effect] - # Required. The effect of the rule. - # @!attribute [rw] principals - # @return [::Array<::String>] - # Required. The identities for which this rule's effect governs using one or - # more permissions on Google Cloud resources. This field can contain the - # following values: - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # - # - # If an identifier that was previously set on a policy is soft deleted, then - # calls to read that policy will return the identifier with a deleted - # prefix. Users cannot set identifiers with this syntax. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. - # If the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # @!attribute [rw] excluded_principals - # @return [::Array<::String>] - # Optional. The identities that are excluded from the access policy rule, - # even if they are listed in the `principals`. For example, you could add a - # Google group to the `principals`, then exclude specific users who belong to - # that group. - # @!attribute [rw] operation - # @return [::Google::Iam::V3::AccessPolicyRule::Operation] - # Required. Attributes that are used to determine whether this rule applies - # to a request. - # @!attribute [rw] conditions - # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] - # Optional. The conditions that determine whether this rule applies to a - # request. Conditions are identified by their key, which is the FQDN of the - # service that they are relevant to. For example: - # - # ``` - # "conditions": { - # "iam.googleapis.com": { - # "expression": - # } - # } - # ``` - # - # Each rule is evaluated independently. If this rule does not apply - # to a request, other rules might still apply. - # Currently supported keys are as follows: - # - # - # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate - # resource fields. - # - # * `iam.googleapis.com`: Can use `CEL` functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and - # combine them using boolean and logical operators. Other functions and - # operators are not supported. - class AccessPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Attributes that are used to determine whether this rule applies to a - # request. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # Optional. The permissions that are explicitly affected by this rule. Each - # permission uses the format `{service_fqdn}/{resource}.{verb}`, where - # `{service_fqdn}` is the fully qualified domain name for the service. - # Currently supported permissions are as follows: - # - # * `eventarc.googleapis.com/messageBuses.publish`. - # @!attribute [rw] excluded_permissions - # @return [::Array<::String>] - # Optional. Specifies the permissions that this rule excludes from the set - # of affected permissions given by `permissions`. If a permission appears - # in `permissions` _and_ in `excluded_permissions` then it will _not_ be - # subject to the policy effect. - # - # The excluded permissions can be specified using the same syntax as - # `permissions`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Type::Expr] - class ConditionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An effect to describe the access relationship. - module Effect - # The effect is unspecified. - EFFECT_UNSPECIFIED = 0 - - # The policy will deny access if it evaluates to true. - DENY = 1 - - # The policy will grant access if it evaluates to true. - ALLOW = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.rb deleted file mode 100644 index 42ec222a1f98..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/operation_metadata.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! - - -module Google - module Iam - module V3 - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb deleted file mode 100644 index 129656c0a2bd..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_binding_resources.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3::PolicyBinding::Target] - # Required. Immutable. The full resource name of the resource to which the - # policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are workspace, workforce pool, workload pool, - # service account, and agent identity. Allowed string must be one of: - # - # - `iam.googleapis.com/WorkspaceIdentity` - # - `iam.googleapis.com/WorkforcePoolIdentity` - # - `iam.googleapis.com/WorkloadPoolIdentity` - # - `iam.googleapis.com/ServiceAccount` - # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. The full resource name that's used for principal access - # boundary policy bindings. The principal set must be directly parented - # by the policy binding's parent or same as the parent if the target is a - # project, folder, or organization. - # - # Examples: - # - # * For bindings parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For bindings parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For bindings parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - # - # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # Immutable. The full resource name that's used for access policy - # bindings. - # - # Examples: - # - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # - # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Target - 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 - - # The different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - - # Access policy kind. - ACCESS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb deleted file mode 100644 index 57bd8a00aca7..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/policy_bindings_service.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3 - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.rb deleted file mode 100644 index bd02495524b4..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policies_service.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 Iam - module V3 - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.rb deleted file mode 100644 index 40b6170b1a17..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/iam/v3/principal_access_boundary_policy_resources.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 Iam - module V3 - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v3/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3/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-iam-v3/snippets/Gemfile b/owl-bot-staging/google-iam-v3/snippets/Gemfile deleted file mode 100644 index 1ae54b711716..000000000000 --- a/owl-bot-staging/google-iam-v3/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-v3", path: "../" -else - gem "google-iam-v3" -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-v3/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb deleted file mode 100644 index ccba13dceefe..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the create_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreateAccessPolicyRequest.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb deleted file mode 100644 index 57f7195106d1..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the delete_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb deleted file mode 100644 index 8337285156bd..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the get_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Iam::V3::AccessPolicy. - p result -end -# [END iam_v3_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb deleted file mode 100644 index a0b969343be2..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] -require "google/iam/v3" - -## -# Snippet for the list_access_policies call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::AccessPolicy. - p item - end -end -# [END iam_v3_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb deleted file mode 100644 index 7ae560724f08..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/search_access_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_access_policy_bindings call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#search_access_policy_bindings. -# -def search_access_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchAccessPolicyBindingsRequest.new - - # Call the search_access_policy_bindings method. - result = client.search_access_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb deleted file mode 100644 index 983d990c3afd..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/access_policies/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the update_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::AccessPolicies::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index df4ee7219d1d..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 55f3efffd3e3..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 94c0c21f6316..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3::PolicyBinding. - p result -end -# [END iam_v3_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 2dbb442b3771..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index 46f121f588f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 10cbd400a9ef..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index b4700ad72f99..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 85f48ef8c04a..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index ac50d60e307f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index b3c624c9b24f..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index 7a39b0874454..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3::PolicyBinding. - p item - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 0b6bc521c7f0..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json b/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json deleted file mode 100644 index 8bdcc14e1760..000000000000 --- a/owl-bot-staging/google-iam-v3/snippets/snippet_metadata_google.iam.v3.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3", - "version": "v3" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3_generated_AccessPolicies_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#create_access_policy.", - "file": "access_policies/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.CreateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#get_access_policy.", - "file": "access_policies/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::AccessPolicy", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.GetAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#update_access_policy.", - "file": "access_policies/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.UpdateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#delete_access_policy.", - "file": "access_policies/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.iam.v3.AccessPolicies.DeleteAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#list_access_policies.", - "file": "access_policies/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.iam.v3.AccessPolicies.ListAccessPolicies", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_AccessPolicies_SearchAccessPolicyBindings_sync", - "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings.", - "file": "access_policies/search_access_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_access_policy_bindings", - "full_name": "::Google::Iam::V3::AccessPolicies::Client#search_access_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchAccessPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchAccessPolicyBindingsResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3::AccessPolicies::Client" - }, - "method": { - "short_name": "SearchAccessPolicyBindings", - "full_name": "google.iam.v3.AccessPolicies.SearchAccessPolicyBindings", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3/test/google/iam/v3/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_operations_test.rb deleted file mode 100644 index 838351043997..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_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/iam/v3/access_policies_service_pb" -require "google/iam/v3/access_policies_service_services_pb" -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb deleted file mode 100644 index 3d3d9f4eab12..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::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_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" - assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" - assert_equal "folders/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" - assert_equal "projects/value0/locations/value1/accessPolicies/value2", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb deleted file mode 100644 index b216679e69d9..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3/access_policies_service_pb" -require "google/iam/v3/access_policies/rest" - - -class ::Google::Iam::V3::AccessPolicies::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_access_policy - # Create test objects. - 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" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Iam::V3::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_policies - # Create test objects. - client_result = ::Google::Iam::V3::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_search_access_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.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" - - search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3::AccessPolicies::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::V3::AccessPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb deleted file mode 100644 index 38eee57ac950..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/access_policies_test.rb +++ /dev/null @@ -1,513 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/access_policies_service_pb" -require "google/iam/v3/access_policies" - -class ::Google::Iam::V3::AccessPolicies::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_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Iam::V3::CreateAccessPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["access_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Iam::V3::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Iam::V3::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Iam::V3::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Iam::V3::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_search_access_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchAccessPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_access_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::AccessPolicies::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::V3::AccessPolicies::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::V3::AccessPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::AccessPolicies::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::Iam::V3::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::AccessPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_operations_test.rb deleted file mode 100644 index e943464fa885..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_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/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings_service_services_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb deleted file mode 100644 index e21017f180db..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb deleted file mode 100644 index b5dc95e769d7..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_rest_test.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings/rest" - - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create test objects. - 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" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::ListPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::V3::PolicyBindings::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::V3::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb deleted file mode 100644 index 4b213c2a9bdc..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/policy_bindings_test.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/policy_bindings_service_pb" -require "google/iam/v3/policy_bindings" - -class ::Google::Iam::V3::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3::ListPolicyBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PolicyBindings::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::V3::PolicyBindings::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::V3::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PolicyBindings::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::Iam::V3::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index 0a55e6e6e754..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index 28fb979db795..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_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/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index 49521b2824c3..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb deleted file mode 100644 index 414ee9e0e6e3..000000000000 --- a/owl-bot-staging/google-iam-v3/test/google/iam/v3/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3/principal_access_boundary_policies_service_pb" -require "google/iam/v3/principal_access_boundary_policies" - -class ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::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::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::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::Iam::V3::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3/test/helper.rb b/owl-bot-staging/google-iam-v3/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v3/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-v3beta/.gitignore b/owl-bot-staging/google-iam-v3beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json b/owl-bot-staging/google-iam-v3beta/.repo-metadata.json deleted file mode 100644 index ef94dec23f48..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest", - "distribution_name": "google-iam-v3beta", - "is_cloud": true, - "language": "ruby", - "name": "iam", - "name_pretty": "Identity and Access Management (IAM) V3BETA API", - "product_documentation": "https://cloud.google.com/iam/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-v3beta/.rubocop.yml b/owl-bot-staging/google-iam-v3beta/.rubocop.yml deleted file mode 100644 index b142b763dfa7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-v3beta.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-v3beta.rb" diff --git a/owl-bot-staging/google-iam-v3beta/.toys.rb b/owl-bot-staging/google-iam-v3beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.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-v3beta/.yardopts b/owl-bot-staging/google-iam-v3beta/.yardopts deleted file mode 100644 index 10df2b7003ed..000000000000 --- a/owl-bot-staging/google-iam-v3beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Identity and Access Management (IAM) V3BETA 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-v3beta/AUTHENTICATION.md b/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md deleted file mode 100644 index c0ff8a06e810..000000000000 --- a/owl-bot-staging/google-iam-v3beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-v3beta 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-v3beta 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/v3beta" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/v3beta" - -::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta -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/v3beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::V3beta::AccessPolicies::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-v3beta/CHANGELOG.md b/owl-bot-staging/google-iam-v3beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-v3beta/Gemfile b/owl-bot-staging/google-iam-v3beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-v3beta/LICENSE.md b/owl-bot-staging/google-iam-v3beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/README.md b/owl-bot-staging/google-iam-v3beta/README.md deleted file mode 100644 index 704ed8c7a1e5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Identity and Access Management (IAM) V3BETA API - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Identity and Access Management (IAM) V3BETA API. Most users should consider using -the main client gem, -[google-iam](https://rubygems.org/gems/google-iam). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-v3beta -``` - -## 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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/v3beta" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new -request = ::Google::Iam::V3beta::CreateAccessPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_access_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/iam/v3beta" -require "logger" - -client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-v3beta`. -_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-v3beta`. - -### 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-v3beta/Rakefile b/owl-bot-staging/google-iam-v3beta/Rakefile deleted file mode 100644 index 14994400cce6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta 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/v3beta/access_policies/credentials" - ::Google::Iam::V3beta::AccessPolicies::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-v3beta 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-v3beta 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-v3beta 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-v3beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-v3beta" - header "google-iam-v3beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-v3beta yard", "*" - Rake::Task[:yard].invoke - header "google-iam-v3beta 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-v3beta 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-v3beta 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-v3beta/gapic_metadata.json b/owl-bot-staging/google-iam-v3beta/gapic_metadata.json deleted file mode 100644 index 13391b62f322..000000000000 --- a/owl-bot-staging/google-iam-v3beta/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.iam.v3beta", - "libraryPackage": "::Google::Iam::V3beta", - "services": { - "AccessPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::AccessPolicies::Client", - "rpcs": { - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "SearchAccessPolicyBindings": { - "methods": [ - "search_access_policy_bindings" - ] - } - } - } - } - }, - "PolicyBindings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PolicyBindings::Client", - "rpcs": { - "CreatePolicyBinding": { - "methods": [ - "create_policy_binding" - ] - }, - "GetPolicyBinding": { - "methods": [ - "get_policy_binding" - ] - }, - "UpdatePolicyBinding": { - "methods": [ - "update_policy_binding" - ] - }, - "DeletePolicyBinding": { - "methods": [ - "delete_policy_binding" - ] - }, - "ListPolicyBindings": { - "methods": [ - "list_policy_bindings" - ] - }, - "SearchTargetPolicyBindings": { - "methods": [ - "search_target_policy_bindings" - ] - } - } - } - } - }, - "PrincipalAccessBoundaryPolicies": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client", - "rpcs": { - "CreatePrincipalAccessBoundaryPolicy": { - "methods": [ - "create_principal_access_boundary_policy" - ] - }, - "GetPrincipalAccessBoundaryPolicy": { - "methods": [ - "get_principal_access_boundary_policy" - ] - }, - "UpdatePrincipalAccessBoundaryPolicy": { - "methods": [ - "update_principal_access_boundary_policy" - ] - }, - "DeletePrincipalAccessBoundaryPolicy": { - "methods": [ - "delete_principal_access_boundary_policy" - ] - }, - "ListPrincipalAccessBoundaryPolicies": { - "methods": [ - "list_principal_access_boundary_policies" - ] - }, - "SearchPrincipalAccessBoundaryPolicyBindings": { - "methods": [ - "search_principal_access_boundary_policy_bindings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec b/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec deleted file mode 100644 index 8665c0d463a7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/google-iam-v3beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/v3beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-v3beta" - gem.version = Google::Iam::V3beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details." - gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.rb deleted file mode 100644 index 462c76ed1789..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google-iam-v3beta.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/v3beta" diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.rb deleted file mode 100644 index 890afcf2e734..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta.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/v3beta/access_policies" -require "google/iam/v3beta/policy_bindings" -require "google/iam/v3beta/principal_access_boundary_policies" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v3beta" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module V3beta - end - end -end - -helper_path = ::File.join __dir__, "v3beta", "_helpers.rb" -require "google/iam/v3beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb deleted file mode 100644 index 20869cea6d21..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/version" - -require "google/iam/v3beta/access_policies/credentials" -require "google/iam/v3beta/access_policies/paths" -require "google/iam/v3beta/access_policies/operations" -require "google/iam/v3beta/access_policies/client" -require "google/iam/v3beta/access_policies/rest" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) access policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/access_policies" - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/access_policies/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module AccessPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "access_policies", "helpers.rb" -require "google/iam/v3beta/access_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb deleted file mode 100644 index 31f774afb06b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/client.rb +++ /dev/null @@ -1,1113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/access_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module AccessPolicies - ## - # Client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3beta::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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/v3beta/access_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::AccessPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3beta::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_policy&.name - header_params["access_policy.name"] = request.access_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_access_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.call_rpc :search_access_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, request, response, 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 AccessPolicies API. - # - # This class represents the configuration for AccessPolicies, - # providing control 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::V3beta::AccessPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::AccessPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.rb deleted file mode 100644 index c1cd49c60577..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module AccessPolicies - # Credentials for the AccessPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/operations.rb deleted file mode 100644 index 975565993773..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/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 Iam - module V3beta - module AccessPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb deleted file mode 100644 index 84aeb6908123..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module AccessPolicies - # Path helper methods for the AccessPolicies API. - module Paths - ## - # Create a fully-qualified AccessPolicy resource string. - # - # @overload access_policy_path(organization:, location:, access_policy:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/accessPolicies/{access_policy}` - # - # @param organization [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(folder:, location:, access_policy:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/accessPolicies/{access_policy}` - # - # @param folder [String] - # @param location [String] - # @param access_policy [String] - # - # @overload access_policy_path(project:, location:, access_policy:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accessPolicies/{access_policy}` - # - # @param project [String] - # @param location [String] - # @param access_policy [String] - # - # @return [::String] - def access_policy_path **args - resources = { - "access_policy:location:organization" => (proc do |organization:, location:, access_policy:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:folder:location" => (proc do |folder:, location:, access_policy:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/accessPolicies/#{access_policy}" - end), - "access_policy:location:project" => (proc do |project:, location:, access_policy:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accessPolicies/#{access_policy}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb deleted file mode 100644 index 38167d9c3b28..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/iam/v3beta/version" - -require "google/iam/v3beta/access_policies/credentials" -require "google/iam/v3beta/access_policies/paths" -require "google/iam/v3beta/access_policies/rest/operations" -require "google/iam/v3beta/access_policies/rest/client" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) access policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/access_policies/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module AccessPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/access_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb deleted file mode 100644 index d1cad6e25fbd..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/client.rb +++ /dev/null @@ -1,1028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module AccessPolicies - module Rest - ## - # REST client for the AccessPolicies service. - # - # Manages Identity and Access Management (IAM) access policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_policies_stub - - ## - # Configure the AccessPolicies Client class. - # - # See {::Google::Iam::V3beta::AccessPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessPolicies clients - # ::Google::Iam::V3beta::AccessPolicies::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_access_policy.timeout = 30.0 - - default_config.rpcs.get_access_policy.timeout = 60.0 - default_config.rpcs.get_access_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_access_policy.timeout = 30.0 - - default_config.rpcs.delete_access_policy.timeout = 30.0 - - default_config.rpcs.list_access_policies.timeout = 60.0 - default_config.rpcs.list_access_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_access_policy_bindings.timeout = 60.0 - default_config.rpcs.search_access_policy_bindings.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 AccessPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::AccessPolicies::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 - @access_policies_stub.universe_domain - end - - ## - # Create a new AccessPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessPolicies 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::Iam::V3beta::AccessPolicies::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 - - @access_policies_stub = ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_policies_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 = @access_policies_stub.endpoint - config.universe_domain = @access_policies_stub.universe_domain - config.logger = @access_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::AccessPolicies::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 - @access_policies_stub.logger - end - - # Service calls - - ## - # Creates an access policy, and returns a long running operation. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(parent: nil, access_policy_id: nil, access_policy: nil, validate_only: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param access_policy_id [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreateAccessPolicyRequest - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an access policy. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Iam::V3beta::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an access policy. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(access_policy: nil, validate_only: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_policy [::Google::Iam::V3beta::AccessPolicy, ::Hash] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an access policy. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @param etag [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 access policies. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_access_policy_bindings(request, options = nil) - # Pass arguments to `search_access_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_access_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - # - # # Call the search_access_policy_bindings method. - # result = client.search_access_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_access_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest - - # Converts hash and nil to an 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_access_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_access_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_policies_stub.search_access_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_policies_stub, :search_access_policy_bindings, "policy_bindings", request, result, 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 AccessPolicies REST API. - # - # This class represents the configuration for AccessPolicies 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::V3beta::AccessPolicies::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_access_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::AccessPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_access_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `search_access_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_access_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - search_access_policy_bindings_config = parent_rpcs.search_access_policy_bindings if parent_rpcs.respond_to? :search_access_policy_bindings - @search_access_policy_bindings = ::Gapic::Config::Method.new search_access_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb deleted file mode 100644 index 32bb3c79773a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module AccessPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessPolicies 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 AccessPolicies 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb deleted file mode 100644 index 932dd88668d4..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/access_policies_service_pb" - -module Google - module Iam - module V3beta - module AccessPolicies - module Rest - ## - # REST service stub for the AccessPolicies 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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::AccessPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.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_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchAccessPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_access_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_access_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreateAccessPolicyRequest] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/accessPolicies", - body: "access_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{access_policy.name}", - body: "access_policy", - matches: [ - ["access_policy.name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/accessPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_access_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest] - # 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_access_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb deleted file mode 100644 index f20f2856a2e5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/access_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/access_policy_resources_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n/google/iam/v3beta/access_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/iam/v3beta/access_policy_resources.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xcc\x01\n\x19\x43reateAccessPolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\x12\x1d\n\x10\x61\x63\x63\x65ss_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\raccess_policy\x18\x03 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x16GetAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\"t\n\x19UpdateAccessPolicyRequest\x12;\n\raccess_policy\x18\x01 \x01(\x0b\x32\x1f.google.iam.v3beta.AccessPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x19\x44\x65leteAccessPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x85\x01\n\x19ListAccessPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fiam.googleapis.com/AccessPolicy\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\"t\n\x1aListAccessPoliciesResponse\x12\x38\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x1f.google.iam.v3beta.AccessPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!SearchAccessPolicyBindingsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fiam.googleapis.com/AccessPolicy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchAccessPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xbe\x11\n\x0e\x41\x63\x63\x65ssPolicies\x12\x94\x03\n\x12\x43reateAccessPolicy\x12,.google.iam.v3beta.CreateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\xda\x41%parent,access_policy,access_policy_id\x82\xd3\xe4\x93\x02\xdd\x01\"6/v3beta/{parent=projects/*/locations/*}/accessPolicies:\raccess_policyZF\"5/v3beta/{parent=folders/*/locations/*}/accessPolicies:\raccess_policyZL\";/v3beta/{parent=organizations/*/locations/*}/accessPolicies:\raccess_policy\x12\x9e\x02\n\x0fGetAccessPolicy\x12).google.iam.v3beta.GetAccessPolicyRequest\x1a\x1f.google.iam.v3beta.AccessPolicy\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\x96\x03\n\x12UpdateAccessPolicy\x12,.google.iam.v3beta.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x02\xca\x41!\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x87\x02\x32\x44/v3beta/{access_policy.name=projects/*/locations/*/accessPolicies/*}:\raccess_policyZT2C/v3beta/{access_policy.name=folders/*/locations/*/accessPolicies/*}:\raccess_policyZZ2I/v3beta/{access_policy.name=organizations/*/locations/*/accessPolicies/*}:\raccess_policy\x12\xcf\x02\n\x12\x44\x65leteAccessPolicy\x12,.google.iam.v3beta.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/accessPolicies/*}Z7*5/v3beta/{name=folders/*/locations/*/accessPolicies/*}Z=*;/v3beta/{name=organizations/*/locations/*/accessPolicies/*}\x12\xb4\x02\n\x12ListAccessPolicies\x12,.google.iam.v3beta.ListAccessPoliciesRequest\x1a-.google.iam.v3beta.ListAccessPoliciesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/accessPoliciesZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/accessPoliciesZ=\x12;/v3beta/{parent=organizations/*/locations/*}/accessPolicies\x12\x89\x03\n\x1aSearchAccessPolicyBindings\x12\x34.google.iam.v3beta.SearchAccessPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchAccessPolicyBindingsResponse\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v3beta/{name=organizations/*/locations/*/accessPolicies/*}:searchPolicyBindingsZL\x12J/v3beta/{name=folders/*/locations/*/accessPolicies/*}:searchPolicyBindingsZM\x12K/v3beta/{name=projects/*/locations/*/accessPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x01\n\x15\x63om.google.iam.v3betaB\x13\x41\x63\x63\x65ssPoliciesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreateAccessPolicyRequest").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeleteAccessPolicyRequest").msgclass - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListAccessPoliciesResponse").msgclass - SearchAccessPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsRequest").msgclass - SearchAccessPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchAccessPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb deleted file mode 100644 index fb03418341a3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policies_service_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/access_policies_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/access_policies_service_pb' - -module Google - module Iam - module V3beta - module AccessPolicies - # Manages Identity and Access Management (IAM) access policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.AccessPolicies' - - # Creates an access policy, and returns a long running operation. - rpc :CreateAccessPolicy, ::Google::Iam::V3beta::CreateAccessPolicyRequest, ::Google::Longrunning::Operation - # Gets an access policy. - rpc :GetAccessPolicy, ::Google::Iam::V3beta::GetAccessPolicyRequest, ::Google::Iam::V3beta::AccessPolicy - # Updates an access policy. - rpc :UpdateAccessPolicy, ::Google::Iam::V3beta::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an access policy. - rpc :DeleteAccessPolicy, ::Google::Iam::V3beta::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists access policies. - rpc :ListAccessPolicies, ::Google::Iam::V3beta::ListAccessPoliciesRequest, ::Google::Iam::V3beta::ListAccessPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchAccessPolicyBindings, ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb deleted file mode 100644 index 43366a70afff..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/access_policy_resources_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/access_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n/google/iam/v3beta/access_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xb9\x05\n\x0c\x41\x63\x63\x65ssPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12J\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x30.google.iam.v3beta.AccessPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32&.google.iam.v3beta.AccessPolicyDetailsB\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:\xa3\x02\xea\x41\x9f\x02\n\x1fiam.googleapis.com/AccessPolicy\x12Porganizations/{organization}/locations/{location}/accessPolicies/{access_policy}\x12\x44\x66olders/{folder}/locations/{location}/accessPolicies/{access_policy}\x12\x46projects/{project}/locations/{location}/accessPolicies/{access_policy}*\x0e\x61\x63\x63\x65ssPolicies2\x0c\x61\x63\x63\x65ssPolicy\"N\n\x13\x41\x63\x63\x65ssPolicyDetails\x12\x37\n\x05rules\x18\x01 \x03(\x0b\x32#.google.iam.v3beta.AccessPolicyRuleB\x03\xe0\x41\x02\"\xa9\x04\n\x10\x41\x63\x63\x65ssPolicyRule\x12\x1d\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x06\x65\x66\x66\x65\x63t\x18\x02 \x01(\x0e\x32*.google.iam.v3beta.AccessPolicyRule.EffectB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x17\n\nprincipals\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13\x65xcluded_principals\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x45\n\toperation\x18\n \x01(\x0b\x32-.google.iam.v3beta.AccessPolicyRule.OperationB\x03\xe0\x41\x02\x12L\n\nconditions\x18\t \x03(\x0b\x32\x33.google.iam.v3beta.AccessPolicyRule.ConditionsEntryB\x03\xe0\x41\x01\x1aH\n\tOperation\x12\x18\n\x0bpermissions\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14\x65xcluded_permissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x44\n\x0f\x43onditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.google.type.Expr:\x02\x38\x01\"5\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\x42\x0e\n\x0c_descriptionB\t\n\x07_effectB\x98\x01\n\x15\x63om.google.iam.v3betaB\x1a\x41\x63\x63\x65ssPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicy").msgclass - AccessPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyDetails").msgclass - AccessPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule").msgclass - AccessPolicyRule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Operation").msgclass - AccessPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.AccessPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb deleted file mode 100644 index 84f3e0210548..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/operation_metadata_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/operation_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/iam/v3beta/operation_metadata.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\x94\x01\n\x15\x63om.google.iam.v3betaB\x16OperationMetadataProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.OperationMetadata").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb deleted file mode 100644 index ec1093319476..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_binding_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_binding_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n0google/iam/v3beta/policy_binding_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x87\x08\n\rPolicyBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x31.google.iam.v3beta.PolicyBinding.AnnotationsEntryB\x03\xe0\x41\x01\x12?\n\x06target\x18\x06 \x01(\x0b\x32\'.google.iam.v3beta.PolicyBinding.TargetB\x06\xe0\x41\x05\xe0\x41\x02\x12\x45\n\x0bpolicy_kind\x18\x0b \x01(\x0e\x32+.google.iam.v3beta.PolicyBinding.PolicyKindB\x03\xe0\x41\x05\x12\x16\n\x06policy\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x17\n\npolicy_uid\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12)\n\tcondition\x18\x08 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aI\n\x06Target\x12\x1c\n\rprincipal_set\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06target\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\nPolicyKind\x12\x1b\n\x17POLICY_KIND_UNSPECIFIED\x10\x00\x12\x1d\n\x19PRINCIPAL_ACCESS_BOUNDARY\x10\x01\x12\n\n\x06\x41\x43\x43\x45SS\x10\x02:\xa8\x02\xea\x41\xa4\x02\n iam.googleapis.com/PolicyBinding\x12Qorganizations/{organization}/locations/{location}/policyBindings/{policy_binding}\x12\x45\x66olders/{folder}/locations/{location}/policyBindings/{policy_binding}\x12Gprojects/{project}/locations/{location}/policyBindings/{policy_binding}*\x0epolicyBindings2\rpolicyBindingB\x99\x01\n\x15\x63om.google.iam.v3betaB\x1bPolicyBindingResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding").msgclass - PolicyBinding::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.Target").msgclass - PolicyBinding::PolicyKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PolicyBinding.PolicyKind").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.rb deleted file mode 100644 index 8c10eab801a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings.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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/operations" -require "google/iam/v3beta/policy_bindings/client" -require "google/iam/v3beta/policy_bindings/rest" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/policy_bindings" - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - end - end - end -end - -helper_path = ::File.join __dir__, "policy_bindings", "helpers.rb" -require "google/iam/v3beta/policy_bindings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb deleted file mode 100644 index efd04847fb73..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/client.rb +++ /dev/null @@ -1,1157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/policy_bindings_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PolicyBindings - ## - # Client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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/v3beta/policy_bindings_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @policy_bindings_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PolicyBindings::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :create_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :get_policy_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy_binding&.name - header_params["policy_binding.name"] = request.policy_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :update_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :delete_policy_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :list_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.call_rpc :search_target_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, request, response, 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 PolicyBindings API. - # - # This class represents the configuration for PolicyBindings, - # providing control 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::V3beta::PolicyBindings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::V3beta::PolicyBindings::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.rb deleted file mode 100644 index 8544d9e0da3c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PolicyBindings - # Credentials for the PolicyBindings 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/operations.rb deleted file mode 100644 index 197b5f7d66e3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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 Iam - module V3beta - module PolicyBindings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb deleted file mode 100644 index b4c61be97d31..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/paths.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module PolicyBindings - # Path helper methods for the PolicyBindings API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PolicyBinding resource string. - # - # @overload policy_binding_path(organization:, location:, policy_binding:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/policyBindings/{policy_binding}` - # - # @param organization [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(folder:, location:, policy_binding:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/policyBindings/{policy_binding}` - # - # @param folder [String] - # @param location [String] - # @param policy_binding [String] - # - # @overload policy_binding_path(project:, location:, policy_binding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/policyBindings/{policy_binding}` - # - # @param project [String] - # @param location [String] - # @param policy_binding [String] - # - # @return [::String] - def policy_binding_path **args - resources = { - "location:organization:policy_binding" => (proc do |organization:, location:, policy_binding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "folder:location:policy_binding" => (proc do |folder:, location:, policy_binding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/policyBindings/#{policy_binding}" - end), - "location:policy_binding:project" => (proc do |project:, location:, policy_binding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/policyBindings/#{policy_binding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest.rb deleted file mode 100644 index 8d9da90d458b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/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/iam/v3beta/version" - -require "google/iam/v3beta/policy_bindings/credentials" -require "google/iam/v3beta/policy_bindings/paths" -require "google/iam/v3beta/policy_bindings/rest/operations" -require "google/iam/v3beta/policy_bindings/rest/client" - -module Google - module Iam - module V3beta - ## - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/policy_bindings/rest" - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - module PolicyBindings - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/policy_bindings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb deleted file mode 100644 index a05a7bfd27eb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/client.rb +++ /dev/null @@ -1,1072 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST client for the PolicyBindings service. - # - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :policy_bindings_stub - - ## - # Configure the PolicyBindings Client class. - # - # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PolicyBindings clients - # ::Google::Iam::V3beta::PolicyBindings::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_policy_binding.timeout = 30.0 - - default_config.rpcs.get_policy_binding.timeout = 60.0 - default_config.rpcs.get_policy_binding.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_policy_binding.timeout = 30.0 - - default_config.rpcs.delete_policy_binding.timeout = 30.0 - - default_config.rpcs.list_policy_bindings.timeout = 60.0 - default_config.rpcs.list_policy_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_target_policy_bindings.timeout = 60.0 - default_config.rpcs.search_target_policy_bindings.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 PolicyBindings Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PolicyBindings::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 - @policy_bindings_stub.universe_domain - end - - ## - # Create a new PolicyBindings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PolicyBindings 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::Iam::V3beta::PolicyBindings::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 - - @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @policy_bindings_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 = @policy_bindings_stub.endpoint - config.universe_domain = @policy_bindings_stub.universe_domain - config.logger = @policy_bindings_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PolicyBindings::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 - @policy_bindings_stub.logger - end - - # Service calls - - ## - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - # - # @overload create_policy_binding(request, options = nil) - # Pass arguments to `create_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil) - # Pass arguments to `create_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param policy_binding_id [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - # - # # Call the create_policy_binding method. - # result = client.create_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest - - # Converts hash and nil to an 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_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.create_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding. - # - # @overload get_policy_binding(request, options = nil) - # Pass arguments to `get_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy_binding(name: nil) - # Pass arguments to `get_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPolicyBindingRequest.new - # - # # Call the get_policy_binding method. - # result = client.get_policy_binding request - # - # # The returned object is of type Google::Iam::V3beta::PolicyBinding. - # p result - # - def get_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.get_policy_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - # - # @overload update_policy_binding(request, options = nil) - # Pass arguments to `update_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - # - # # Call the update_policy_binding method. - # result = client.update_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.update_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - # - # @overload delete_policy_binding(request, options = nil) - # Pass arguments to `delete_policy_binding` via a request object, either of type - # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @param etag [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - # - # # Call the delete_policy_binding method. - # result = client.delete_policy_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_policy_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_policy_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.delete_policy_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 policy bindings. - # - # @overload list_policy_bindings(request, options = nil) - # Pass arguments to `list_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - # - # # Call the list_policy_bindings method. - # result = client.list_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def list_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.list_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - # - # @overload search_target_policy_bindings(request, options = nil) - # Pass arguments to `search_target_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil, filter: nil) - # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param target [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @param parent [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param filter [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - # - # # Call the search_target_policy_bindings method. - # result = client.search_target_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_target_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest - - # Converts hash and nil to an 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_target_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_target_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, 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 PolicyBindings REST API. - # - # This class represents the configuration for PolicyBindings 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::V3beta::PolicyBindings::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_policy_binding to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_policy_binding.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PolicyBindings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_policy_binding - ## - # RPC-specific configuration for `get_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy_binding - ## - # RPC-specific configuration for `update_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy_binding - ## - # RPC-specific configuration for `delete_policy_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_policy_binding - ## - # RPC-specific configuration for `list_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_policy_bindings - ## - # RPC-specific configuration for `search_target_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_target_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding - @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config - get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding - @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config - update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding - @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config - delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding - @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config - list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings - @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config - search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings - @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb deleted file mode 100644 index 256b9190eee3..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PolicyBindings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PolicyBindings 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 PolicyBindings 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb deleted file mode 100644 index ce126e354617..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/v3beta/policy_bindings_service_pb" - -module Google - module Iam - module V3beta - module PolicyBindings - module Rest - ## - # REST service stub for the PolicyBindings 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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PolicyBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PolicyBinding] - # A result object deserialized from the server's reply - def get_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PolicyBinding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_policy_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_policy_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPolicyBindingsResponse] - # A result object deserialized from the server's reply - def list_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.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_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchTargetPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_target_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_target_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_target_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.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_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePolicyBindingRequest] - # 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_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/policyBindings", - body: "policy_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{policy_binding.name}", - body: "policy_binding", - matches: [ - ["policy_binding.name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_policy_binding REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePolicyBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_policy_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/policyBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_target_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest] - # 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_target_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/policyBindings:searchTargetPolicyBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb deleted file mode 100644 index 6c9513bee8e7..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/policy_bindings_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n/google/iam/v3beta/policy_bindings_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd1\x01\n\x1a\x43reatePolicyBindingRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x1e\n\x11policy_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0epolicy_binding\x18\x03 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Q\n\x17GetPolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\"\xad\x01\n\x1aUpdatePolicyBindingRequest\x12=\n\x0epolicy_binding\x18\x01 \x01(\x0b\x32 .google.iam.v3beta.PolicyBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x83\x01\n\x1a\x44\x65letePolicyBindingRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n iam.googleapis.com/PolicyBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x19ListPolicyBindingsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x1aListPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb8\x01\n!SearchTargetPolicyBindingsRequest\x12\x13\n\x06target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x05 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 iam.googleapis.com/PolicyBinding\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"}\n\"SearchTargetPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\x8c\x12\n\x0ePolicyBindings\x12\x9c\x03\n\x13\x43reatePolicyBinding\x12-.google.iam.v3beta.CreatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\'parent,policy_binding,policy_binding_id\x82\xd3\xe4\x93\x02\xe0\x01\"6/v3beta/{parent=projects/*/locations/*}/policyBindings:\x0epolicy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/policyBindings:\x0epolicy_bindingZM\";/v3beta/{parent=organizations/*/locations/*}/policyBindings:\x0epolicy_binding\x12\xa1\x02\n\x10GetPolicyBinding\x12*.google.iam.v3beta.GetPolicyBindingRequest\x1a .google.iam.v3beta.PolicyBinding\"\xbe\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7\x12\x35/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=\x12;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xbc\x03\n\x13UpdatePolicyBinding\x12-.google.iam.v3beta.UpdatePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd6\x02\xca\x41\"\n\rPolicyBinding\x12\x11OperationMetadata\xda\x41\x1apolicy_binding,update_mask\x82\xd3\xe4\x93\x02\x8d\x02\x32\x45/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}:\x0epolicy_bindingZV2D/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}:\x0epolicy_bindingZ\\2J/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}:\x0epolicy_binding\x12\xd1\x02\n\x13\x44\x65letePolicyBinding\x12-.google.iam.v3beta.DeletePolicyBindingRequest\x1a\x1d.google.longrunning.Operation\"\xeb\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\xb0\x01*6/v3beta/{name=projects/*/locations/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\x12\xb4\x02\n\x12ListPolicyBindings\x12,.google.iam.v3beta.ListPolicyBindingsRequest\x1a-.google.iam.v3beta.ListPolicyBindingsResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12\x36/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\x12\x35/v3beta/{parent=folders/*/locations/*}/policyBindingsZ=\x12;/v3beta/{parent=organizations/*/locations/*}/policyBindings\x12\xa4\x03\n\x1aSearchTargetPolicyBindings\x12\x34.google.iam.v3beta.SearchTargetPolicyBindingsRequest\x1a\x35.google.iam.v3beta.SearchTargetPolicyBindingsResponse\"\x98\x02\xda\x41\rparent,target\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\x12P/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\x12V/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x02\n\x15\x63om.google.iam.v3betaB\x1aPolicyBindingsServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3beta\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePolicyBindingRequest").msgclass - GetPolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPolicyBindingRequest").msgclass - UpdatePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePolicyBindingRequest").msgclass - DeletePolicyBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePolicyBindingRequest").msgclass - ListPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsRequest").msgclass - ListPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPolicyBindingsResponse").msgclass - SearchTargetPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsRequest").msgclass - SearchTargetPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchTargetPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb deleted file mode 100644 index 3261714f198e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/policy_bindings_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/policy_bindings_service_pb' - -module Google - module Iam - module V3beta - module PolicyBindings - # An interface for managing Identity and Access Management (IAM) policy - # bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PolicyBindings' - - # Creates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is created, the policy is applied to the target. - rpc :CreatePolicyBinding, ::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Google::Longrunning::Operation - # Gets a policy binding. - rpc :GetPolicyBinding, ::Google::Iam::V3beta::GetPolicyBindingRequest, ::Google::Iam::V3beta::PolicyBinding - # Updates a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on the policy and target in the - # binding to update. Target and policy are immutable and cannot be updated. - rpc :UpdatePolicyBinding, ::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Google::Longrunning::Operation - # Deletes a policy binding and returns a long-running operation. - # Callers will need the IAM permissions on both the policy and target. - # After the binding is deleted, the policy no longer applies to the target. - rpc :DeletePolicyBinding, ::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Google::Longrunning::Operation - # Lists policy bindings. - rpc :ListPolicyBindings, ::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Google::Iam::V3beta::ListPolicyBindingsResponse - # Search policy bindings by target. Returns all policy binding objects bound - # directly to target. - rpc :SearchTargetPolicyBindings, ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.rb deleted file mode 100644 index 131df2f35581..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies.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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/operations" -require "google/iam/v3beta/principal_access_boundary_policies/client" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v3beta/principal_access_boundary_policies" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - end - end - end -end - -helper_path = ::File.join __dir__, "principal_access_boundary_policies", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb deleted file mode 100644 index 5097171067eb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +++ /dev/null @@ -1,1102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/cloud/location" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - ## - # Client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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/v3beta/principal_access_boundary_policies_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @principal_access_boundary_policies_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :create_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :get_principal_access_boundary_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.principal_access_boundary_policy&.name - header_params["principal_access_boundary_policy.name"] = request.principal_access_boundary_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :update_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :delete_principal_access_boundary_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :list_principal_access_boundary_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - 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::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.call_rpc :search_principal_access_boundary_policy_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, request, response, 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 PrincipalAccessBoundaryPolicies API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies, - # providing control 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::V3beta::PrincipalAccessBoundaryPolicies::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb deleted file mode 100644 index faa2a134d021..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.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 "googleauth" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Credentials for the PrincipalAccessBoundaryPolicies 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 diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb deleted file mode 100644 index b253552560cb..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Iam::V3beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb deleted file mode 100644 index 5c221ecd1178..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Path helper methods for the PrincipalAccessBoundaryPolicies API. - module Paths - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified PrincipalAccessBoundaryPolicy resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}` - # - # @param organization [String] - # @param location [String] - # @param principal_access_boundary_policy [String] - # - # @return [::String] - def principal_access_boundary_policy_path organization:, location:, principal_access_boundary_policy: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/principalAccessBoundaryPolicies/#{principal_access_boundary_policy}" - end - - extend self - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb deleted file mode 100644 index a46c2f64c9d5..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/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/iam/v3beta/version" - -require "google/iam/v3beta/principal_access_boundary_policies/credentials" -require "google/iam/v3beta/principal_access_boundary_policies/paths" -require "google/iam/v3beta/principal_access_boundary_policies/rest/operations" -require "google/iam/v3beta/principal_access_boundary_policies/rest/client" - -module Google - module Iam - module V3beta - ## - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v3beta/principal_access_boundary_policies/rest" - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - module PrincipalAccessBoundaryPolicies - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb deleted file mode 100644 index 8e08e9ccc17f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +++ /dev/null @@ -1,1017 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST client for the PrincipalAccessBoundaryPolicies service. - # - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :principal_access_boundary_policies_stub - - ## - # Configure the PrincipalAccessBoundaryPolicies Client class. - # - # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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", "V3beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0 - default_config.rpcs.get_principal_access_boundary_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0 - - default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0 - default_config.rpcs.list_principal_access_boundary_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0 - default_config.rpcs.search_principal_access_boundary_policy_bindings.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 PrincipalAccessBoundaryPolicies Client instance. - # - # The configuration is set to the derived mode, meaning that 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::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.universe_domain - end - - ## - # Create a new PrincipalAccessBoundaryPolicies REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - - @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint - config.universe_domain = @principal_access_boundary_policies_stub.universe_domain - config.logger = @principal_access_boundary_policies_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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 - @principal_access_boundary_policies_stub.logger - end - - # Service calls - - ## - # Creates a principal access boundary policy, and returns a long running - # operation. - # - # @overload create_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) - # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param principal_access_boundary_policy_id [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the create_principal_access_boundary_policy method. - # result = client.create_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload get_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_principal_access_boundary_policy(name: nil) - # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - # - # # Call the get_principal_access_boundary_policy method. - # result = client.get_principal_access_boundary_policy request - # - # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p result - # - def get_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a principal access boundary policy. - # - # @overload update_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the update_principal_access_boundary_policy method. - # result = client.update_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policy. - # - # @overload delete_principal_access_boundary_policy(request, options = nil) - # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type - # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) - # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param etag [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @param force [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - # - # # Call the delete_principal_access_boundary_policy method. - # result = client.delete_principal_access_boundary_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_principal_access_boundary_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 principal access boundary policies. - # - # @overload list_principal_access_boundary_policies(request, options = nil) - # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type - # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - # - # # Call the list_principal_access_boundary_policies method. - # result = client.list_principal_access_boundary_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - # p item - # end - # - def list_principal_access_boundary_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - # - # @overload search_principal_access_boundary_policy_bindings(request, options = nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type - # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @param page_size [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v3beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - # - # # Call the search_principal_access_boundary_policy_bindings method. - # result = client.search_principal_access_boundary_policy_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - # p item - # end - # - def search_principal_access_boundary_policy_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest - - # Converts hash and nil to an 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_principal_access_boundary_policy_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_principal_access_boundary_policy_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, 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 PrincipalAccessBoundaryPolicies REST API. - # - # This class represents the configuration for PrincipalAccessBoundaryPolicies 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::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::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 PrincipalAccessBoundaryPolicies API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_principal_access_boundary_policy - ## - # RPC-specific configuration for `get_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_principal_access_boundary_policy - ## - # RPC-specific configuration for `update_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_principal_access_boundary_policy - ## - # RPC-specific configuration for `delete_principal_access_boundary_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_principal_access_boundary_policy - ## - # RPC-specific configuration for `list_principal_access_boundary_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_principal_access_boundary_policies - ## - # RPC-specific configuration for `search_principal_access_boundary_policy_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :search_principal_access_boundary_policy_bindings - - # @private - def initialize parent_rpcs = nil - create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy - @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config - get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy - @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config - update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy - @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config - delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy - @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config - list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies - @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config - search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings - @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb deleted file mode 100644 index 22c3e05a5278..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +++ /dev/null @@ -1,939 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PrincipalAccessBoundaryPolicies 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 PrincipalAccessBoundaryPolicies 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Iam::V3beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb deleted file mode 100644 index e36e1d4e8f56..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v3beta/principal_access_boundary_policies_service_pb" - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - module Rest - ## - # REST service stub for the PrincipalAccessBoundaryPolicies 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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::PrincipalAccessBoundaryPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # A result object deserialized from the server's reply - def get_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_principal_access_boundary_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_principal_access_boundary_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_principal_access_boundary_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse] - # A result object deserialized from the server's reply - def list_principal_access_boundary_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_principal_access_boundary_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_principal_access_boundary_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.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_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse] - # A result object deserialized from the server's reply - def search_principal_access_boundary_policy_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_principal_access_boundary_policy_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_principal_access_boundary_policy_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest] - # 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_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - body: "principal_access_boundary_policy", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3beta/{principal_access_boundary_policy.name}", - body: "principal_access_boundary_policy", - matches: [ - ["principal_access_boundary_policy.name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_principal_access_boundary_policy REST call - # - # @param request_pb [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_principal_access_boundary_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_principal_access_boundary_policies REST call - # - # @param request_pb [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_principal_access_boundary_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{parent}/principalAccessBoundaryPolicies", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_principal_access_boundary_policy_bindings REST call - # - # @param request_pb [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest] - # 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_principal_access_boundary_policy_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3beta/{name}:searchPolicyBindings", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/principalAccessBoundaryPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb deleted file mode 100644 index ee829930af81..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policies_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v3beta/operation_metadata_pb' -require 'google/iam/v3beta/policy_binding_resources_pb' -require 'google/iam/v3beta/principal_access_boundary_policy_resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policies_service.proto\x12\x11google.iam.v3beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/iam/v3beta/operation_metadata.proto\x1a\x30google/iam/v3beta/policy_binding_resources.proto\x1a\x42google/iam/v3beta/principal_access_boundary_policy_resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa5\x02\n*CreatePrincipalAccessBoundaryPolicyRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x30\n#principal_access_boundary_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n principal_access_boundary_policy\x18\x03 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\'GetPrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\"\xdf\x01\n*UpdatePrincipalAccessBoundaryPolicyRequest\x12_\n principal_access_boundary_policy\x18\x01 \x01(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb7\x01\n*DeletePrincipalAccessBoundaryPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa7\x01\n*ListPrincipalAccessBoundaryPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30iam.googleapis.com/PrincipalAccessBoundaryPolicy\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\"\xa9\x01\n+ListPrincipalAccessBoundaryPoliciesResponse\x12\\\n\"principal_access_boundary_policies\x18\x01 \x03(\x0b\x32\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n2SearchPrincipalAccessBoundaryPolicyBindingsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n3SearchPrincipalAccessBoundaryPolicyBindingsResponse\x12\x39\n\x0fpolicy_bindings\x18\x01 \x03(\x0b\x32 .google.iam.v3beta.PolicyBinding\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xa8\x0f\n\x1fPrincipalAccessBoundaryPolicies\x12\xff\x02\n#CreatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41Kparent,principal_access_boundary_policy,principal_access_boundary_policy_id\x82\xd3\xe4\x93\x02p\"L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies: principal_access_boundary_policy\x12\xed\x01\n GetPrincipalAccessBoundaryPolicy\x12:.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest\x1a\x30.google.iam.v3beta.PrincipalAccessBoundaryPolicy\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x82\x03\n#UpdatePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xfc\x01\xca\x41\x32\n\x1dPrincipalAccessBoundaryPolicy\x12\x11OperationMetadata\xda\x41,principal_access_boundary_policy,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32m/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}: principal_access_boundary_policy\x12\x8e\x02\n#DeletePrincipalAccessBoundaryPolicy\x12=.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}\x12\x83\x02\n#ListPrincipalAccessBoundaryPolicies\x12=.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest\x1a>.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies\x12\xae\x02\n+SearchPrincipalAccessBoundaryPolicyBindings\x12\x45.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest\x1a\x46.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings\x1a\x46\xca\x41\x12iam.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPoliciesServiceProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - CreatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest").msgclass - GetPrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest").msgclass - UpdatePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest").msgclass - DeletePrincipalAccessBoundaryPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest").msgclass - ListPrincipalAccessBoundaryPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest").msgclass - ListPrincipalAccessBoundaryPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest").msgclass - SearchPrincipalAccessBoundaryPolicyBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse").msgclass - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb deleted file mode 100644 index 3789b868b8e2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/v3beta/principal_access_boundary_policies_service.proto for package 'google.iam.v3beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/iam/v3beta/principal_access_boundary_policies_service_pb' - -module Google - module Iam - module V3beta - module PrincipalAccessBoundaryPolicies - # Manages Identity and Access Management (IAM) principal access boundary - # policies. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.v3beta.PrincipalAccessBoundaryPolicies' - - # Creates a principal access boundary policy, and returns a long running - # operation. - rpc :CreatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Gets a principal access boundary policy. - rpc :GetPrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy - # Updates a principal access boundary policy. - rpc :UpdatePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Deletes a principal access boundary policy. - rpc :DeletePrincipalAccessBoundaryPolicy, ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Google::Longrunning::Operation - # Lists principal access boundary policies. - rpc :ListPrincipalAccessBoundaryPolicies, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse - # Returns all policy bindings that bind a specific policy if a user has - # searchPolicyBindings permission on that policy. - rpc :SearchPrincipalAccessBoundaryPolicyBindings, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb deleted file mode 100644 index aeddd8701494..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/v3beta/principal_access_boundary_policy_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\x12\x11google.iam.v3beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x05\n\x1dPrincipalAccessBoundaryPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x07\x64\x65tails\x18\x08 \x01(\x0b\x32\x37.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\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:\xec\x01\xea\x41\xe8\x01\n0iam.googleapis.com/PrincipalAccessBoundaryPolicy\x12torganizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}*\x1fprincipalAccessBoundaryPolicies2\x1dprincipalAccessBoundaryPolicy\"\x92\x01\n$PrincipalAccessBoundaryPolicyDetails\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x34.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\x03\xe0\x41\x02\x12 \n\x13\x65nforcement_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd4\x01\n!PrincipalAccessBoundaryPolicyRule\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tresources\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12P\n\x06\x65\x66\x66\x65\x63t\x18\x03 \x01(\x0e\x32;.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\x03\xe0\x41\x02\"+\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\x12\x45\x46\x46\x45\x43T_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x42\xa9\x01\n\x15\x63om.google.iam.v3betaB+PrincipalAccessBoundaryPolicyResourcesProtoP\x01Z-cloud.google.com/go/iam/apiv3beta/iampb;iampb\xaa\x02\x17Google.Cloud.Iam.V3Beta\xca\x02\x17Google\\Cloud\\Iam\\V3betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Iam - module V3beta - PrincipalAccessBoundaryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicy").msgclass - PrincipalAccessBoundaryPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails").msgclass - PrincipalAccessBoundaryPolicyRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule").msgclass - PrincipalAccessBoundaryPolicyRule::Effect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect").enummodule - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/rest.rb deleted file mode 100644 index 99f3c20b6549..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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/v3beta/access_policies/rest" -require "google/iam/v3beta/policy_bindings/rest" -require "google/iam/v3beta/principal_access_boundary_policies/rest" -require "google/iam/v3beta/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v3beta/rest" - # client = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new - # - module V3beta - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb b/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/version.rb deleted file mode 100644 index 738981bb3f21..000000000000 --- a/owl-bot-staging/google-iam-v3beta/lib/google/iam/v3beta/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 V3beta - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md b/owl-bot-staging/google-iam-v3beta/proto_docs/README.md deleted file mode 100644 index 536b687b8e98..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Identity and Access Management (IAM) V3BETA 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-v3beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb deleted file mode 100644 index a8350bf45f46..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policies_service.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # Request message for CreateAccessPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this access policy will be created. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] access_policy_id - # @return [::String] - # Required. The ID to use for the access policy, which - # will become the final component of the access policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # - # This value must be unique among all access policies with the same parent. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3beta::AccessPolicy] - # Required. The access policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to retrieve. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateAccessPolicy method. - # @!attribute [rw] access_policy - # @return [::Google::Iam::V3beta::AccessPolicy] - # Required. The access policy to update. - # - # The access policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteAccessPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy to delete. - # - # Format: - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the access policy. If this is provided, it must match - # the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the Policy - # even if the Policy references PolicyBindings. - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListAccessPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of access policy - # resources. - # - # Format: - # `projects/{project_id}/locations/{location}` - # `projects/{project_number}/locations/{location}` - # `folders/{folder_id}/locations/{location}` - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access policies to return. The - # service may return fewer than this value. - # - # If unspecified, at most 50 access policies will be returned. Valid value - # ranges from 1 to 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessPolicies` must match the call that provided the - # page token. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListAccessPolicies method. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Iam::V3beta::AccessPolicy>] - # The access policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the access policy. - # Format: - # `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` - # `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchAccessPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchAccessPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchAccessPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchAccessPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchAccessPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb deleted file mode 100644 index cb77bb996aa9..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/access_policy_resources.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # An IAM access policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the access policy. - # - # The following formats are supported: - # - # * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}` - # * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}` - # * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}` - # * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the access policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the access policy. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the access policy. Must be less than - # or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the access policy was most recently - # updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3beta::AccessPolicyDetails] - # Optional. The details for the access policy. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Access policy details. - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3beta::AccessPolicyRule>] - # Required. A list of access policy rules. - class AccessPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Access Policy Rule that determines the behavior of the policy. - # @!attribute [rw] description - # @return [::String] - # Optional. Customer specified description of the rule. Must be less than or - # equal to 256 characters. - # @!attribute [rw] effect - # @return [::Google::Iam::V3beta::AccessPolicyRule::Effect] - # Required. The effect of the rule. - # @!attribute [rw] principals - # @return [::Array<::String>] - # Required. The identities for which this rule's effect governs using one or - # more permissions on Google Cloud resources. This field can contain the - # following values: - # - # * `principal://goog/subject/{email_id}`: A specific Google Account. - # Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - # example, `principal://goog/subject/alice@example.com`. - # - # * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - # A Google Cloud service account. For example, - # `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - # - # * `principalSet://goog/group/{group_id}`: A Google group. For example, - # `principalSet://goog/group/admins@example.com`. - # - # * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - # principals associated with the specified Google Workspace or Cloud - # Identity customer ID. For example, - # `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - # - # - # If an identifier that was previously set on a policy is soft deleted, then - # calls to read that policy will return the identifier with a deleted - # prefix. Users cannot set identifiers with this syntax. - # - # * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - # Google Account that was deleted recently. For example, - # `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - # the Google Account is recovered, this identifier reverts to the standard - # identifier for a Google Account. - # - # * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - # that was deleted recently. For example, - # `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. - # If the Google group is restored, this identifier reverts to the standard - # identifier for a Google group. - # - # * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - # A Google Cloud service account that was deleted recently. For example, - # `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - # If the service account is undeleted, this identifier reverts to the - # standard identifier for a service account. - # @!attribute [rw] excluded_principals - # @return [::Array<::String>] - # Optional. The identities that are excluded from the access policy rule, - # even if they are listed in the `principals`. For example, you could add a - # Google group to the `principals`, then exclude specific users who belong to - # that group. - # @!attribute [rw] operation - # @return [::Google::Iam::V3beta::AccessPolicyRule::Operation] - # Required. Attributes that are used to determine whether this rule applies - # to a request. - # @!attribute [rw] conditions - # @return [::Google::Protobuf::Map{::String => ::Google::Type::Expr}] - # Optional. The conditions that determine whether this rule applies to a - # request. Conditions are identified by their key, which is the FQDN of the - # service that they are relevant to. For example: - # - # ``` - # "conditions": { - # "iam.googleapis.com": { - # "expression": - # } - # } - # ``` - # - # Each rule is evaluated independently. If this rule does not apply - # to a request, other rules might still apply. - # Currently supported keys are as follows: - # - # - # * `eventarc.googleapis.com`: Can use `CEL` functions that evaluate - # resource fields. - # - # * `iam.googleapis.com`: Can use `CEL` functions that evaluate - # [resource - # tags](https://cloud.google.com/iam/help/conditions/resource-tags) and - # combine them using boolean and logical operators. Other functions and - # operators are not supported. - class AccessPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Attributes that are used to determine whether this rule applies to a - # request. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # Optional. The permissions that are explicitly affected by this rule. Each - # permission uses the format `{service_fqdn}/{resource}.{verb}`, where - # `{service_fqdn}` is the fully qualified domain name for the service. - # Currently supported permissions are as follows: - # - # * `eventarc.googleapis.com/messageBuses.publish`. - # @!attribute [rw] excluded_permissions - # @return [::Array<::String>] - # Optional. Specifies the permissions that this rule excludes from the set - # of affected permissions given by `permissions`. If a permission appears - # in `permissions` _and_ in `excluded_permissions` then it will _not_ be - # subject to the policy effect. - # - # The excluded permissions can be specified using the same syntax as - # `permissions`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Type::Expr] - class ConditionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An effect to describe the access relationship. - module Effect - # The effect is unspecified. - EFFECT_UNSPECIFIED = 0 - - # The policy will deny access if it evaluates to true. - DENY = 1 - - # The policy will grant access if it evaluates to true. - ALLOW = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.rb deleted file mode 100644 index 4e4463d9171f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/operation_metadata.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! - - -module Google - module Iam - module V3beta - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb deleted file mode 100644 index c46446dc0080..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_binding_resources.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # IAM policy binding resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the policy binding, in the format - # `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. - # The binding parent is the closest Resource Manager resource (project, - # folder, or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the policy binding. Assigned when - # the policy binding is created. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the policy binding. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the policy binding. Must be less than or equal - # to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [rw] target - # @return [::Google::Iam::V3beta::PolicyBinding::Target] - # Required. Immutable. The full resource name of the resource to which the - # policy will be bound. Immutable once set. - # @!attribute [rw] policy_kind - # @return [::Google::Iam::V3beta::PolicyBinding::PolicyKind] - # Immutable. The kind of the policy to attach in this binding. This field - # must be one of the following: - # - # - Left empty (will be automatically set to the policy kind) - # - The input policy kind - # @!attribute [rw] policy - # @return [::String] - # Required. Immutable. The resource name of the policy to be bound. The - # binding parent and policy must belong to the same organization. - # @!attribute [r] policy_uid - # @return [::String] - # Output only. The globally unique ID of the policy to be bound. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. The condition to apply to the policy binding. When set, the - # `expression` field in the `Expr` must include from 1 to 10 subexpressions, - # joined by the - # "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and - # cannot contain more than 250 characters. - # - # The condition is currently only supported when bound to policies of kind - # principal access boundary. - # - # When the bound policy is a principal access boundary policy, the only - # supported attributes in any subexpression are `principal.type` and - # `principal.subject`. An example expression is: "principal.type == - # 'iam.googleapis.com/ServiceAccount'" or "principal.subject == - # 'bob@example.com'". - # - # Allowed operations for `principal.subject`: - # - # - `principal.subject == ` - # - `principal.subject != ` - # - `principal.subject in []` - # - `principal.subject.startsWith()` - # - `principal.subject.endsWith()` - # - # Allowed operations for `principal.type`: - # - # - `principal.type == ` - # - `principal.type != ` - # - `principal.type in []` - # - # Supported principal types are workspace, workforce pool, workload pool, - # service account, and Agent Identity. Allowed string must be one of: - # - # - `iam.googleapis.com/WorkspaceIdentity` - # - `iam.googleapis.com/WorkforcePoolIdentity` - # - `iam.googleapis.com/WorkloadPoolIdentity` - # - `iam.googleapis.com/ServiceAccount` - # - `iam.googleapis.com/AgentPoolIdentity` (available in Preview) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy binding was most recently updated. - class PolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The full resource name of the resource to which the policy will - # be bound. Immutable once set. - # @!attribute [rw] principal_set - # @return [::String] - # Immutable. The full resource name that's used for principal access - # boundary policy bindings. The principal set must be directly parented - # by the policy binding's parent or same as the parent if the target is a - # project, folder, or organization. - # - # Examples: - # - # * For bindings parented by an organization: - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Workforce Identity: - # `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` - # * Workspace Identity: - # `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * For bindings parented by a folder: - # * Folder: - # `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * For bindings parented by a project: - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # * Workload Identity Pool: - # `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` - # - # Note: The following fields are mutually exclusive: `principal_set`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # Immutable. The full resource name that's used for access policy - # bindings. - # - # Examples: - # - # * Organization: - # `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` - # * Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` - # * Project: - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` - # * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` - # - # Note: The following fields are mutually exclusive: `resource`, `principal_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Target - 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 - - # The different policy kinds supported in this binding. - module PolicyKind - # Unspecified policy kind; Not a valid state - POLICY_KIND_UNSPECIFIED = 0 - - # Principal access boundary policy kind - PRINCIPAL_ACCESS_BOUNDARY = 1 - - # Access policy kind. - ACCESS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb deleted file mode 100644 index 4ff232b4471d..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/policy_bindings_service.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V3beta - # Request message for CreatePolicyBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this policy binding will be created. - # The binding parent is the closest Resource Manager resource (project, - # folder or organization) to the binding target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] policy_binding_id - # @return [::String] - # Required. The ID to use for the policy binding, which will become the final - # component of the policy binding's resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to retrieve. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - class GetPolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePolicyBinding method. - # @!attribute [rw] policy_binding - # @return [::Google::Iam::V3beta::PolicyBinding] - # Required. The policy binding to update. - # - # The policy binding's `name` field is used to identify the policy binding to - # update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePolicyBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy binding to delete. - # - # Format: - # - # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` - # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` - # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the policy binding. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - class DeletePolicyBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPolicyBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of policy - # bindings. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPolicyBindings` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPolicyBindings` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. Some eligible fields for filtering are the - # following: - # - # + `target` - # + `policy` - # - # Some examples of filter queries: - # - # * `target:ex*`: The binding target's name starts with "ex". - # * `target:example`: The binding target's name is `example`. - # * `policy:example`: The binding policy's name is `example`. - class ListPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchTargetPolicyBindings method. - # @!attribute [rw] target - # @return [::String] - # Required. The target resource, which is bound to the policy in the binding. - # - # Format: - # - # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` - # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` - # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` - # * `//cloudresourcemanager.googleapis.com/projects/{project_number}` - # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` - # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # The default value is 50. The maximum value is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchTargetPolicyBindingsRequest` must match the call that provided the - # page token. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this search will be performed. This - # should be the nearest Resource Manager resource (project, folder, or - # organization) to the target. - # - # Format: - # - # * `projects/{project_id}/locations/{location}` - # * `projects/{project_number}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering currently only supports the kind of policies to return, - # and must be in the format "policy_kind=\\{policy_kind}". - # - # If String is empty, bindings bound to all kinds of policies would be - # returned. - # - # The only supported values are the following: - # - # * "policy_kind=PRINCIPAL_ACCESS_BOUNDARY", - # * "policy_kind=ACCESS" - class SearchTargetPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchTargetPolicyBindings method. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings bound to the specified target. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchTargetPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb deleted file mode 100644 index 565de307d98b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.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 Iam - module V3beta - # Request message for CreatePrincipalAccessBoundaryPolicyRequest method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this principal access boundary policy - # will be created. Only organizations are supported. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] principal_access_boundary_policy_id - # @return [::String] - # Required. The ID to use for the principal access boundary policy, which - # will become the final component of the principal access boundary policy's - # resource name. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, hyphens, or dots. Pattern, - # /[a-z][a-z0-9-\.]\\{2,62}/. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the creation, but do not - # actually post it. - class CreatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetPrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to retrieve. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - class GetPrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdatePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] principal_access_boundary_policy - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy] - # Required. The principal access boundary policy to update. - # - # The principal access boundary policy's `name` field is used to identify the - # policy to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the update, but do not - # actually post it. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdatePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeletePrincipalAccessBoundaryPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy to delete. - # - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the principal access boundary policy. - # If this is provided, it must match the server's etag. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the deletion, but do not - # actually post it. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, the request will force the deletion of the policy - # even if the policy is referenced in policy bindings. - class DeletePrincipalAccessBoundaryPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource, which owns the collection of principal - # access boundary policies. - # - # Format: - # `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of principal access boundary policies to - # return. The service may return fewer than this value. - # - # If unspecified, at most 50 principal access boundary policies will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the - # page token. - class ListPrincipalAccessBoundaryPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListPrincipalAccessBoundaryPolicies method. - # @!attribute [rw] principal_access_boundary_policies - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>] - # The principal access boundary policies from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListPrincipalAccessBoundaryPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the principal access boundary policy. - # Format: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policy bindings to return. The service may - # return fewer than this value. - # - # If unspecified, at most 50 policy bindings will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call - # that provided the page token. - class SearchPrincipalAccessBoundaryPolicyBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. - # @!attribute [rw] policy_bindings - # @return [::Array<::Google::Iam::V3beta::PolicyBinding>] - # The policy bindings that reference the specified policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class SearchPrincipalAccessBoundaryPolicyBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb deleted file mode 100644 index a01db22285ba..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.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 Iam - module V3beta - # An IAM principal access boundary policy resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the principal access boundary policy. - # - # The following format is supported: - # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` - # @!attribute [r] uid - # @return [::String] - # Output only. The globally unique ID of the principal access boundary - # policy. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the principal access boundary. - # If this is provided on update, it must match the server's etag. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The description of the principal access boundary policy. Must be - # less than or equal to 63 characters. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the principal access boundary policy was most - # recently updated. - # @!attribute [rw] details - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyDetails] - # Optional. The details for the principal access boundary policy. - class PrincipalAccessBoundaryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Principal access boundary policy details - # @!attribute [rw] rules - # @return [::Array<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule>] - # Required. A list of principal access boundary policy rules. The number of - # rules in a policy is limited to 500. - # @!attribute [rw] enforcement_version - # @return [::String] - # Optional. - # The version number (for example, `1` or `latest`) that indicates which - # permissions are able to be blocked by the policy. If empty, the PAB policy - # version will be set to the most recent version number at the time of the - # policy's creation. - class PrincipalAccessBoundaryPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Principal access boundary policy rule that defines the resource boundary. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the principal access boundary policy rule. - # Must be less than or equal to 256 characters. - # @!attribute [rw] resources - # @return [::Array<::String>] - # Required. A list of Resource Manager resources. If a resource is listed in - # the rule, then the rule applies for that resource and its descendants. The - # number of resources in a policy is limited to 500 across all rules in the - # policy. - # - # The following resource types are supported: - # - # * Organizations, such as - # `//cloudresourcemanager.googleapis.com/organizations/123`. - # * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. - # * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` - # or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. - # @!attribute [rw] effect - # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicyRule::Effect] - # Required. The access relationship of principals to the resources in this - # rule. - class PrincipalAccessBoundaryPolicyRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An effect to describe the access relationship. - module Effect - # Effect unspecified. - EFFECT_UNSPECIFIED = 0 - - # Allows access to the resources in this rule. - ALLOW = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-iam-v3beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-iam-v3beta/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-iam-v3beta/snippets/Gemfile b/owl-bot-staging/google-iam-v3beta/snippets/Gemfile deleted file mode 100644 index c2385cbb7f70..000000000000 --- a/owl-bot-staging/google-iam-v3beta/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-v3beta", path: "../" -else - gem "google-iam-v3beta" -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-v3beta/snippets/access_policies/create_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb deleted file mode 100644 index 97be59c7632e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreateAccessPolicyRequest.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb deleted file mode 100644 index 39044451fe13..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb deleted file mode 100644 index dd29cbf9cc54..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Iam::V3beta::AccessPolicy. - p result -end -# [END iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb deleted file mode 100644 index 6ba1518a5a0f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_access_policies call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::AccessPolicy. - p item - end -end -# [END iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb deleted file mode 100644 index 4e6b43897d7b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/search_access_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_access_policy_bindings call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#search_access_policy_bindings. -# -def search_access_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new - - # Call the search_access_policy_bindings method. - result = client.search_access_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb deleted file mode 100644 index 72e82547181e..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/access_policies/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_access_policy call in the AccessPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::AccessPolicies::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::AccessPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb deleted file mode 100644 index 71d915589110..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/create_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#create_policy_binding. -# -def create_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePolicyBindingRequest.new - - # Call the create_policy_binding method. - result = client.create_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb deleted file mode 100644 index 71f4b669183c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/delete_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#delete_policy_binding. -# -def delete_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePolicyBindingRequest.new - - # Call the delete_policy_binding method. - result = client.delete_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb deleted file mode 100644 index 95a37b3bd52d..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/get_policy_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#get_policy_binding. -# -def get_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPolicyBindingRequest.new - - # Call the get_policy_binding method. - result = client.get_policy_binding request - - # The returned object is of type Google::Iam::V3beta::PolicyBinding. - p result -end -# [END iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb deleted file mode 100644 index 0f7e29a87412..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/list_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#list_policy_bindings. -# -def list_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPolicyBindingsRequest.new - - # Call the list_policy_bindings method. - result = client.list_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb deleted file mode 100644 index f27b0677d25b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/search_target_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_target_policy_bindings call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#search_target_policy_bindings. -# -def search_target_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new - - # Call the search_target_policy_bindings method. - result = client.search_target_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb b/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb deleted file mode 100644 index 135862214560..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/policy_bindings/update_policy_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_policy_binding call in the PolicyBindings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PolicyBindings::Client#update_policy_binding. -# -def update_policy_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PolicyBindings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new - - # Call the update_policy_binding method. - result = client.update_policy_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb deleted file mode 100644 index 5adbcf4dcc27..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/create_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy. -# -def create_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new - - # Call the create_principal_access_boundary_policy method. - result = client.create_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb deleted file mode 100644 index 80a3f6830daa..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/delete_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy. -# -def delete_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new - - # Call the delete_principal_access_boundary_policy method. - result = client.delete_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb deleted file mode 100644 index a6c6b2d32724..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/get_principal_access_boundary_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy. -# -def get_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new - - # Call the get_principal_access_boundary_policy method. - result = client.get_principal_access_boundary_policy request - - # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p result -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb deleted file mode 100644 index 6d15a7805873..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/list_principal_access_boundary_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] -require "google/iam/v3beta" - -## -# Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies. -# -def list_principal_access_boundary_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new - - # Call the list_principal_access_boundary_policies method. - result = client.list_principal_access_boundary_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb deleted file mode 100644 index f55151327579..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] -require "google/iam/v3beta" - -## -# Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings. -# -def search_principal_access_boundary_policy_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new - - # Call the search_principal_access_boundary_policy_bindings method. - result = client.search_principal_access_boundary_policy_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Iam::V3beta::PolicyBinding. - p item - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb b/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb deleted file mode 100644 index 821e090ddea2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] -require "google/iam/v3beta" - -## -# Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy. -# -def update_principal_access_boundary_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new - - # Call the update_principal_access_boundary_policy method. - result = client.update_principal_access_boundary_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync] diff --git a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json b/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json deleted file mode 100644 index dbc2fd32da19..000000000000 --- a/owl-bot-staging/google-iam-v3beta/snippets/snippet_metadata_google.iam.v3beta.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-iam-v3beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v3beta", - "version": "v3beta" - } - ] - }, - "snippets": [ - { - "region_tag": "iam_v3beta_generated_AccessPolicies_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#create_access_policy.", - "file": "access_policies/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.CreateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#get_access_policy.", - "file": "access_policies/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::AccessPolicy", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.GetAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#update_access_policy.", - "file": "access_policies/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.UpdateAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy.", - "file": "access_policies/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.iam.v3beta.AccessPolicies.DeleteAccessPolicy", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#list_access_policies.", - "file": "access_policies/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies.ListAccessPolicies", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_AccessPolicies_SearchAccessPolicyBindings_sync", - "title": "Snippet for the search_access_policy_bindings call in the AccessPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings.", - "file": "access_policies/search_access_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_access_policy_bindings", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client#search_access_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse", - "client": { - "short_name": "AccessPolicies::Client", - "full_name": "::Google::Iam::V3beta::AccessPolicies::Client" - }, - "method": { - "short_name": "SearchAccessPolicyBindings", - "full_name": "google.iam.v3beta.AccessPolicies.SearchAccessPolicyBindings", - "service": { - "short_name": "AccessPolicies", - "full_name": "google.iam.v3beta.AccessPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_CreatePolicyBinding_sync", - "title": "Snippet for the create_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding.", - "file": "policy_bindings/create_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#create_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "CreatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.CreatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_GetPolicyBinding_sync", - "title": "Snippet for the get_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding.", - "file": "policy_bindings/get_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#get_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PolicyBinding", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "GetPolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.GetPolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_UpdatePolicyBinding_sync", - "title": "Snippet for the update_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding.", - "file": "policy_bindings/update_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#update_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "UpdatePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.UpdatePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_DeletePolicyBinding_sync", - "title": "Snippet for the delete_policy_binding call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding.", - "file": "policy_bindings/delete_policy_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_policy_binding", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#delete_policy_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePolicyBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "DeletePolicyBinding", - "full_name": "google.iam.v3beta.PolicyBindings.DeletePolicyBinding", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_ListPolicyBindings_sync", - "title": "Snippet for the list_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings.", - "file": "policy_bindings/list_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#list_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "ListPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.ListPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PolicyBindings_SearchTargetPolicyBindings_sync", - "title": "Snippet for the search_target_policy_bindings call in the PolicyBindings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings.", - "file": "policy_bindings/search_target_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_target_policy_bindings", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client#search_target_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse", - "client": { - "short_name": "PolicyBindings::Client", - "full_name": "::Google::Iam::V3beta::PolicyBindings::Client" - }, - "method": { - "short_name": "SearchTargetPolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings.SearchTargetPolicyBindings", - "service": { - "short_name": "PolicyBindings", - "full_name": "google.iam.v3beta.PolicyBindings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_CreatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the create_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/create_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#create_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "CreatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.CreatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_GetPrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the get_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/get_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#get_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "GetPrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.GetPrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_UpdatePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the update_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/update_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#update_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "UpdatePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.UpdatePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_DeletePrincipalAccessBoundaryPolicy_sync", - "title": "Snippet for the delete_principal_access_boundary_policy call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy.", - "file": "principal_access_boundary_policies/delete_principal_access_boundary_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_principal_access_boundary_policy", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#delete_principal_access_boundary_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "DeletePrincipalAccessBoundaryPolicy", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.DeletePrincipalAccessBoundaryPolicy", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_ListPrincipalAccessBoundaryPolicies_sync", - "title": "Snippet for the list_principal_access_boundary_policies call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies.", - "file": "principal_access_boundary_policies/list_principal_access_boundary_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_principal_access_boundary_policies", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#list_principal_access_boundary_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "ListPrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.ListPrincipalAccessBoundaryPolicies", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "iam_v3beta_generated_PrincipalAccessBoundaryPolicies_SearchPrincipalAccessBoundaryPolicyBindings_sync", - "title": "Snippet for the search_principal_access_boundary_policy_bindings call in the PrincipalAccessBoundaryPolicies service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings.", - "file": "principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_principal_access_boundary_policy_bindings", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client#search_principal_access_boundary_policy_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse", - "client": { - "short_name": "PrincipalAccessBoundaryPolicies::Client", - "full_name": "::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client" - }, - "method": { - "short_name": "SearchPrincipalAccessBoundaryPolicyBindings", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies.SearchPrincipalAccessBoundaryPolicyBindings", - "service": { - "short_name": "PrincipalAccessBoundaryPolicies", - "full_name": "google.iam.v3beta.PrincipalAccessBoundaryPolicies" - } - } - }, - "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-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_operations_test.rb deleted file mode 100644 index da6a695d3c98..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_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/iam/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies_service_services_pb" -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb deleted file mode 100644 index 2e29e3248257..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path organization: "value0", location: "value1", access_policy: "value2" - assert_equal "organizations/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path folder: "value0", location: "value1", access_policy: "value2" - assert_equal "folders/value0/locations/value1/accessPolicies/value2", path - - path = client.access_policy_path project: "value0", location: "value1", access_policy: "value2" - assert_equal "projects/value0/locations/value1/accessPolicies/value2", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb deleted file mode 100644 index fb4d469ef29f..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies/rest" - - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy - # Create test objects. - 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" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Iam::V3beta::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_policies - # Create test objects. - client_result = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_search_access_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.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" - - search_access_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::AccessPolicies::Rest::ServiceStub.stub :transcode_search_access_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb deleted file mode 100644 index fdcebb4a7083..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/access_policies_test.rb +++ /dev/null @@ -1,513 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/access_policies_service_pb" -require "google/iam/v3beta/access_policies" - -class ::Google::Iam::V3beta::AccessPolicies::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_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_policy_id = "hello world" - access_policy = {} - validate_only = true - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Iam::V3beta::CreateAccessPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["access_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Iam::V3beta::CreateAccessPolicyRequest.new(parent: parent, access_policy_id: access_policy_id, access_policy: access_policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Iam::V3beta::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Iam::V3beta::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_policy = {} - validate_only = true - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Iam::V3beta::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::AccessPolicy), request["access_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy access_policy: access_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ access_policy: access_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Iam::V3beta::UpdateAccessPolicyRequest.new(access_policy: access_policy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Iam::V3beta::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Iam::V3beta::DeleteAccessPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Iam::V3beta::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Iam::V3beta::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Iam::V3beta::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_search_access_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchAccessPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_access_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_access_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest, 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, search_access_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_access_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_access_policy_bindings ::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_access_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_access_policy_bindings(::Google::Iam::V3beta::SearchAccessPolicyBindingsRequest.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, search_access_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::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::V3beta::AccessPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::AccessPolicies::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::Iam::V3beta::AccessPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::AccessPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_operations_test.rb deleted file mode 100644 index 83ecbb1d59e0..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_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/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings_service_services_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb deleted file mode 100644 index 25795739b50c..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_policy_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_binding_path organization: "value0", location: "value1", policy_binding: "value2" - assert_equal "organizations/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path folder: "value0", location: "value1", policy_binding: "value2" - assert_equal "folders/value0/locations/value1/policyBindings/value2", path - - path = client.policy_binding_path project: "value0", location: "value1", policy_binding: "value2" - assert_equal "projects/value0/locations/value1/policyBindings/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb deleted file mode 100644 index eb4938bac615..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_rest_test.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings/rest" - - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create test objects. - 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" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_create_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_policy_binding_client_stub.call_count - end - end - end - - def test_get_policy_binding - # Create test objects. - client_result = ::Google::Iam::V3beta::PolicyBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_get_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_count - end - end - end - - def test_update_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_update_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_count - end - end - end - - def test_delete_policy_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_delete_policy_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_count - end - end - end - - def test_list_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_list_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_count - end - end - end - - def test_search_target_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PolicyBindings::Rest::ServiceStub.stub :transcode_search_target_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb deleted file mode 100644 index b9c3eb2c9954..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/policy_bindings_test.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/policy_bindings_service_pb" -require "google/iam/v3beta/policy_bindings" - -class ::Google::Iam::V3beta::PolicyBindings::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_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - policy_binding_id = "hello world" - policy_binding = {} - validate_only = true - - create_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::CreatePolicyBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["policy_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_policy_binding parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_policy_binding ::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_policy_binding({ parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_policy_binding(::Google::Iam::V3beta::CreatePolicyBindingRequest.new(parent: parent, policy_binding_id: policy_binding_id, policy_binding: policy_binding, 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_policy_binding_client_stub.call_rpc_count - end - end - - def test_get_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PolicyBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::GetPolicyBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy_binding ::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy_binding(::Google::Iam::V3beta::GetPolicyBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_binding_client_stub.call_rpc_count - end - end - - def test_update_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy_binding = {} - validate_only = true - update_mask = {} - - update_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::UpdatePolicyBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PolicyBinding), request["policy_binding"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy_binding policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy_binding ::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy_binding({ policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy_binding(::Google::Iam::V3beta::UpdatePolicyBindingRequest.new(policy_binding: policy_binding, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_binding_client_stub.call_rpc_count - end - end - - def test_delete_policy_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_policy_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_policy_binding, name - assert_kind_of ::Google::Iam::V3beta::DeletePolicyBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_policy_binding_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_policy_binding name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_policy_binding ::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_policy_binding({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_policy_binding(::Google::Iam::V3beta::DeletePolicyBindingRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_policy_binding_client_stub.call_rpc_count - end - end - - def test_list_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::ListPolicyBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_policy_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_policy_bindings ::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_policy_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_policy_bindings(::Google::Iam::V3beta::ListPolicyBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_policy_bindings_client_stub.call_rpc_count - end - end - - def test_search_target_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchTargetPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - target = "hello world" - page_size = 42 - page_token = "hello world" - parent = "hello world" - filter = "hello world" - - search_target_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_target_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, request - assert_equal "hello world", request["target"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_target_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_target_policy_bindings target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_target_policy_bindings ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_target_policy_bindings({ target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_target_policy_bindings(::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new(target: target, page_size: page_size, page_token: page_token, parent: parent, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_target_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::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::V3beta::PolicyBindings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::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::Iam::V3beta::PolicyBindings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PolicyBindings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_operations_test.rb deleted file mode 100644 index 6e46e310ad0b..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies_service_services_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_paths_test.rb deleted file mode 100644 index e7a89396ed57..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_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/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_principal_access_boundary_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.principal_access_boundary_policy_path organization: "value0", location: "value1", principal_access_boundary_policy: "value2" - assert_equal "organizations/value0/locations/value1/principalAccessBoundaryPolicies/value2", path - end - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb deleted file mode 100644 index 3eab77f7e378..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_rest_test.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies/rest" - - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create test objects. - 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" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_create_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_get_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_get_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_update_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_update_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_delete_principal_access_boundary_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_delete_principal_access_boundary_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_principal_access_boundary_policy_client_stub.call_count - end - end - end - - def test_list_principal_access_boundary_policies - # Create test objects. - client_result = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - http_response = OpenStruct.new 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_principal_access_boundary_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_list_principal_access_boundary_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_count - end - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create test objects. - client_result = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::V3beta::PrincipalAccessBoundaryPolicies::Rest::ServiceStub.stub :transcode_search_principal_access_boundary_policy_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb b/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb deleted file mode 100644 index a1ff3c50bada..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/google/iam/v3beta/principal_access_boundary_policies_test.rb +++ /dev/null @@ -1,515 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/v3beta/principal_access_boundary_policies_service_pb" -require "google/iam/v3beta/principal_access_boundary_policies" - -class ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - principal_access_boundary_policy_id = "hello world" - principal_access_boundary_policy = {} - validate_only = true - - create_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["principal_access_boundary_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_principal_access_boundary_policy parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_principal_access_boundary_policy ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_principal_access_boundary_policy({ parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_principal_access_boundary_policy(::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new(parent: parent, principal_access_boundary_policy_id: principal_access_boundary_policy_id, principal_access_boundary_policy: principal_access_boundary_policy, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_get_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_principal_access_boundary_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_principal_access_boundary_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_principal_access_boundary_policy ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_principal_access_boundary_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_principal_access_boundary_policy(::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_update_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - principal_access_boundary_policy = {} - validate_only = true - update_mask = {} - - update_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy), request["principal_access_boundary_policy"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_principal_access_boundary_policy principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_principal_access_boundary_policy ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_principal_access_boundary_policy({ principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_principal_access_boundary_policy(::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new(principal_access_boundary_policy: principal_access_boundary_policy, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_delete_principal_access_boundary_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - force = true - - delete_principal_access_boundary_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_principal_access_boundary_policy, name - assert_kind_of ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_principal_access_boundary_policy_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_principal_access_boundary_policy name: name, etag: etag, validate_only: validate_only, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_principal_access_boundary_policy ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_principal_access_boundary_policy({ name: name, etag: etag, validate_only: validate_only, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_principal_access_boundary_policy(::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new(name: name, etag: etag, validate_only: validate_only, 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_principal_access_boundary_policy_client_stub.call_rpc_count - end - end - - def test_list_principal_access_boundary_policies - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_principal_access_boundary_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_principal_access_boundary_policies, name - assert_kind_of ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, 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_principal_access_boundary_policies_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_principal_access_boundary_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_principal_access_boundary_policies ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_principal_access_boundary_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_principal_access_boundary_policies(::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.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_principal_access_boundary_policies_client_stub.call_rpc_count - end - end - - def test_search_principal_access_boundary_policy_bindings - # Create GRPC objects. - grpc_response = ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - search_principal_access_boundary_policy_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_principal_access_boundary_policy_bindings, name - assert_kind_of ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, 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, search_principal_access_boundary_policy_bindings_client_stub do - # Create client - c = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_principal_access_boundary_policy_bindings name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_principal_access_boundary_policy_bindings ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_principal_access_boundary_policy_bindings({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_principal_access_boundary_policy_bindings(::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.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, search_principal_access_boundary_policy_bindings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::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::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-iam-v3beta/test/helper.rb b/owl-bot-staging/google-iam-v3beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-iam-v3beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore b/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json deleted file mode 100644 index b5b3f48e3f37..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "accesscontextmanager.googleapis.com", - "api_shortname": "accesscontextmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest", - "distribution_name": "google-identity-access_context_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "accesscontextmanager", - "name_pretty": "Access Context Manager V1 API", - "product_documentation": "https://cloud.google.com/access-context-manager/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/access-context-manager/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml b/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml deleted file mode 100644 index 15b11069b7b8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-identity-access_context_manager-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-identity-access_context_manager-v1.rb" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb b/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts b/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts deleted file mode 100644 index bba046b41e67..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Access Context Manager V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 3537ff875c7f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-identity-access_context_manager-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-identity-access_context_manager-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/identity/access_context_manager/v1" - -::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/identity/access_context_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1/CHANGELOG.md b/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md b/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/README.md deleted file mode 100644 index 4aebfb1f2f0d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Access Context Manager V1 API - -An API for setting attribute based access control to requests to GCP services. - -Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Access Context Manager V1 API. Most users should consider using -the main client gem, -[google-identity-access_context_manager](https://rubygems.org/gems/google-identity-access_context_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-identity-access_context_manager-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/identity/access_context_manager/v1" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new -request = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_access_policies request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/access-context-manager/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/identity/access_context_manager/v1" -require "logger" - -client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-identity-access_context_manager`, -and lower-level _versioned_ client libraries with names such as -`google-identity-access_context_manager-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-identity-access_context_manager`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-identity-access_context_manager-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile b/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile deleted file mode 100644 index 4d845f513939..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-identity-access_context_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/identity/access_context_manager/v1/access_context_manager/credentials" - ::Google::Identity::AccessContextManager::V1::AccessContextManager::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-identity-access_context_manager-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-identity-access_context_manager-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-identity-access_context_manager-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-identity-access_context_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-identity-access_context_manager-v1" - header "google-identity-access_context_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-identity-access_context_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-identity-access_context_manager-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-identity-access_context_manager-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-identity-access_context_manager-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json b/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json deleted file mode 100644 index a47b974d0dbf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.identity.accesscontextmanager.v1", - "libraryPackage": "::Google::Identity::AccessContextManager::V1", - "services": { - "AccessContextManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client", - "rpcs": { - "ListAccessPolicies": { - "methods": [ - "list_access_policies" - ] - }, - "GetAccessPolicy": { - "methods": [ - "get_access_policy" - ] - }, - "CreateAccessPolicy": { - "methods": [ - "create_access_policy" - ] - }, - "UpdateAccessPolicy": { - "methods": [ - "update_access_policy" - ] - }, - "DeleteAccessPolicy": { - "methods": [ - "delete_access_policy" - ] - }, - "ListAccessLevels": { - "methods": [ - "list_access_levels" - ] - }, - "GetAccessLevel": { - "methods": [ - "get_access_level" - ] - }, - "CreateAccessLevel": { - "methods": [ - "create_access_level" - ] - }, - "UpdateAccessLevel": { - "methods": [ - "update_access_level" - ] - }, - "DeleteAccessLevel": { - "methods": [ - "delete_access_level" - ] - }, - "ReplaceAccessLevels": { - "methods": [ - "replace_access_levels" - ] - }, - "ListServicePerimeters": { - "methods": [ - "list_service_perimeters" - ] - }, - "GetServicePerimeter": { - "methods": [ - "get_service_perimeter" - ] - }, - "CreateServicePerimeter": { - "methods": [ - "create_service_perimeter" - ] - }, - "UpdateServicePerimeter": { - "methods": [ - "update_service_perimeter" - ] - }, - "DeleteServicePerimeter": { - "methods": [ - "delete_service_perimeter" - ] - }, - "ReplaceServicePerimeters": { - "methods": [ - "replace_service_perimeters" - ] - }, - "CommitServicePerimeters": { - "methods": [ - "commit_service_perimeters" - ] - }, - "ListGcpUserAccessBindings": { - "methods": [ - "list_gcp_user_access_bindings" - ] - }, - "GetGcpUserAccessBinding": { - "methods": [ - "get_gcp_user_access_binding" - ] - }, - "CreateGcpUserAccessBinding": { - "methods": [ - "create_gcp_user_access_binding" - ] - }, - "UpdateGcpUserAccessBinding": { - "methods": [ - "update_gcp_user_access_binding" - ] - }, - "DeleteGcpUserAccessBinding": { - "methods": [ - "delete_gcp_user_access_binding" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec b/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec deleted file mode 100644 index 159a0d47cef6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/google-identity-access_context_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/identity/access_context_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-identity-access_context_manager-v1" - gem.version = Google::Identity::AccessContextManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Access Context Manager allows enterprises to configure access levels which map to a policy defined on request attributes. Note that google-identity-access_context_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-identity-access_context_manager instead. See the readme for more details." - gem.summary = "An API for setting attribute based access control to requests to GCP services." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb deleted file mode 100644 index 5d4eaa9b5df6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google-identity-access_context_manager-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/identity/access_context_manager/v1" diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb deleted file mode 100644 index c51f7bf61440..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/identity/access_context_manager/v1/access_context_manager" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/identity/access_context_manager/v1" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/identity/access_context_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb deleted file mode 100644 index 557344644e3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/operations" -require "google/identity/access_context_manager/v1/access_context_manager/client" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # @example Load this service and instantiate a gRPC client - # - # require "google/identity/access_context_manager/v1/access_context_manager" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "access_context_manager", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb deleted file mode 100644 index 3a8c8320a0f6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/client.rb +++ /dev/null @@ -1,3299 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - ## - # Client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Identity", "AccessContextManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccessContextManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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/identity/accesscontextmanager/v1/access_context_manager_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @access_context_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @access_context_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_access_levels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_access_level, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.access_level&.name - header_params["access_level.name"] = request.access_level.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_access_level, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_access_levels, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_service_perimeter, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_perimeter&.name - header_params["service_perimeter.name"] = request.service_perimeter.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_service_perimeter, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :replace_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :commit_service_perimeters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :list_gcp_user_access_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_gcp_user_access_binding, request, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :create_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.gcp_user_access_binding&.name - header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :update_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :delete_gcp_user_access_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager API. - # - # This class represents the configuration for AccessContextManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Identity::AccessContextManager::V1::AccessContextManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb deleted file mode 100644 index 776e70b9d2b2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Credentials for the AccessContextManager 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-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb deleted file mode 100644 index 1fdaf89aae95..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Identity::AccessContextManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb deleted file mode 100644 index 11645e15c66f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/paths.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # Path helper methods for the AccessContextManager API. - module Paths - ## - # Create a fully-qualified AccessLevel resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/accessLevels/{access_level}` - # - # @param access_policy [String] - # @param access_level [String] - # - # @return [::String] - def access_level_path access_policy:, access_level: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/accessLevels/#{access_level}" - end - - ## - # Create a fully-qualified AccessPolicy resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}` - # - # @param access_policy [String] - # - # @return [::String] - def access_policy_path access_policy: - "accessPolicies/#{access_policy}" - end - - ## - # Create a fully-qualified GcpUserAccessBinding resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}` - # - # @param organization [String] - # @param gcp_user_access_binding [String] - # - # @return [::String] - def gcp_user_access_binding_path organization:, gcp_user_access_binding: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/gcpUserAccessBindings/#{gcp_user_access_binding}" - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified ServicePerimeter resource string. - # - # The resource will be in the following format: - # - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # - # @param access_policy [String] - # @param service_perimeter [String] - # - # @return [::String] - def service_perimeter_path access_policy:, service_perimeter: - raise ::ArgumentError, "access_policy cannot contain /" if access_policy.to_s.include? "/" - - "accessPolicies/#{access_policy}/servicePerimeters/#{service_perimeter}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb deleted file mode 100644 index db852d4c1c3e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/identity/access_context_manager/v1/version" - -require "google/identity/access_context_manager/v1/access_context_manager/credentials" -require "google/identity/access_context_manager/v1/access_context_manager/paths" -require "google/identity/access_context_manager/v1/access_context_manager/rest/operations" -require "google/identity/access_context_manager/v1/access_context_manager/rest/client" - -module Google - module Identity - module AccessContextManager - module V1 - ## - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - # To load this service and instantiate a REST client: - # - # require "google/identity/access_context_manager/v1/access_context_manager/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module AccessContextManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb deleted file mode 100644 index 3f2ec497d8d9..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/client.rb +++ /dev/null @@ -1,3090 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest/service_stub" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST client for the AccessContextManager service. - # - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :access_context_manager_stub - - ## - # Configure the AccessContextManager Client class. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccessContextManager clients - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::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", "Identity", "AccessContextManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccessContextManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Identity::AccessContextManager::V1::AccessContextManager::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 - @access_context_manager_stub.universe_domain - end - - ## - # Create a new AccessContextManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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 - - @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @access_context_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @access_context_manager_stub.logger - end - - # Service calls - - ## - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - # - # @overload list_access_policies(request, options = nil) - # Pass arguments to `list_access_policies` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_access_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @param page_size [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - # - # # Call the list_access_policies method. - # result = client.list_access_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - # p item - # end - # - def list_access_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_policies, "access_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - # - # @overload get_access_policy(request, options = nil) - # Pass arguments to `get_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_policy(name: nil) - # Pass arguments to `get_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - # - # # Call the get_access_policy method. - # result = client.get_access_policy request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - # p result - # - def get_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - # - # @overload create_access_policy(request, options = nil) - # Pass arguments to `create_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::AccessPolicy} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_policy(name: nil, parent: nil, title: nil, scopes: nil, create_time: nil, update_time: nil, etag: nil) - # Pass arguments to `create_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @param parent [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @param title [::String] - # Required. Human readable title. Does not affect behavior. - # @param scopes [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @param create_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was created in UTC. - # @param update_time [::Google::Protobuf::Timestamp, ::Hash] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @param etag [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - # - # # Call the create_access_policy method. - # result = client.create_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy - - # Converts hash and nil to an 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_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - # - # @overload update_access_policy(request, options = nil) - # Pass arguments to `update_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash] - # Required. The updated AccessPolicy. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - # - # # Call the update_access_policy method. - # result = client.update_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - # - # @overload delete_access_policy(request, options = nil) - # Pass arguments to `delete_access_policy` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_policy(name: nil) - # Pass arguments to `delete_access_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - # - # # Call the delete_access_policy method. - # result = client.delete_access_policy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - # - # @overload list_access_levels(request, options = nil) - # Pass arguments to `list_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) - # Pass arguments to `list_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - # - # # Call the list_access_levels method. - # result = client.list_access_levels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - # p item - # end - # - def list_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_access_levels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_access_levels, "access_levels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - # - # @overload get_access_level(request, options = nil) - # Pass arguments to `get_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_access_level(name: nil, access_level_format: nil) - # Pass arguments to `get_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @param access_level_format [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - # - # # Call the get_access_level method. - # result = client.get_access_level request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - # p result - # - def get_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_access_level request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload create_access_level(request, options = nil) - # Pass arguments to `create_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_access_level(parent: nil, access_level: nil) - # Pass arguments to `create_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - # - # # Call the create_access_level method. - # result = client.create_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest - - # Converts hash and nil to an 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_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - # - # @overload update_access_level(request, options = nil) - # Pass arguments to `update_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_access_level(access_level: nil, update_mask: nil) - # Pass arguments to `update_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param access_level [::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - # - # # Call the update_access_level method. - # result = client.update_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - # - # @overload delete_access_level(request, options = nil) - # Pass arguments to `delete_access_level` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_access_level(name: nil) - # Pass arguments to `delete_access_level` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - # - # # Call the delete_access_level method. - # result = client.delete_access_level request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_access_level request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_access_level.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_access_level.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_access_level.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_access_level request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - # - # @overload replace_access_levels(request, options = nil) - # Pass arguments to `replace_access_levels` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_access_levels(parent: nil, access_levels: nil, etag: nil) - # Pass arguments to `replace_access_levels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @param access_levels [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - # - # # Call the replace_access_levels method. - # result = client.replace_access_levels request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_access_levels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_access_levels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_access_levels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_access_levels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_access_levels request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - # - # @overload list_service_perimeters(request, options = nil) - # Pass arguments to `list_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_perimeters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @param page_size [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @param page_token [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - # - # # Call the list_service_perimeters method. - # result = client.list_service_perimeters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p item - # end - # - def list_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_service_perimeters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_service_perimeters, "service_perimeters", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - # - # @overload get_service_perimeter(request, options = nil) - # Pass arguments to `get_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_perimeter(name: nil) - # Pass arguments to `get_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - # - # # Call the get_service_perimeter method. - # result = client.get_service_perimeter request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - # p result - # - def get_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_service_perimeter request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload create_service_perimeter(request, options = nil) - # Pass arguments to `create_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_perimeter(parent: nil, service_perimeter: nil) - # Pass arguments to `create_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - # - # # Call the create_service_perimeter method. - # result = client.create_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - # - # @overload update_service_perimeter(request, options = nil) - # Pass arguments to `update_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service_perimeter(service_perimeter: nil, update_mask: nil) - # Pass arguments to `update_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_perimeter [::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask to control which fields get updated. Must be non-empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - # - # # Call the update_service_perimeter method. - # result = client.update_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - # - # @overload delete_service_perimeter(request, options = nil) - # Pass arguments to `delete_service_perimeter` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service_perimeter(name: nil) - # Pass arguments to `delete_service_perimeter` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - # - # # Call the delete_service_perimeter method. - # result = client.delete_service_perimeter request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_perimeter request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service_perimeter.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service_perimeter.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_perimeter.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_service_perimeter request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - # - # @overload replace_service_perimeters(request, options = nil) - # Pass arguments to `replace_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) - # Pass arguments to `replace_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @param service_perimeters [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - # - # # Call the replace_service_perimeters method. - # result = client.replace_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def replace_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.replace_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - # - # @overload commit_service_perimeters(request, options = nil) - # Pass arguments to `commit_service_perimeters` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload commit_service_perimeters(parent: nil, etag: nil) - # Pass arguments to `commit_service_perimeters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @param etag [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - # - # # Call the commit_service_perimeters method. - # result = client.commit_service_perimeters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def commit_service_perimeters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.commit_service_perimeters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.commit_service_perimeters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.commit_service_perimeters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.commit_service_perimeters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - # - # @overload list_gcp_user_access_bindings(request, options = nil) - # Pass arguments to `list_gcp_user_access_bindings` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gcp_user_access_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param page_size [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @param page_token [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - # - # # Call the list_gcp_user_access_bindings method. - # result = client.list_gcp_user_access_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p item - # end - # - def list_gcp_user_access_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gcp_user_access_bindings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_gcp_user_access_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gcp_user_access_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.list_gcp_user_access_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @access_context_manager_stub, :list_gcp_user_access_bindings, "gcp_user_access_bindings", request, result, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - # - # @overload get_gcp_user_access_binding(request, options = nil) - # Pass arguments to `get_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_gcp_user_access_binding(name: nil) - # Pass arguments to `get_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - # - # # Call the get_gcp_user_access_binding method. - # result = client.get_gcp_user_access_binding request - # - # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - # p result - # - def get_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_gcp_user_access_binding request, 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - # - # @overload create_gcp_user_access_binding(request, options = nil) - # Pass arguments to `create_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) - # Pass arguments to `create_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Example: "organizations/256" - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - # - # # Call the create_gcp_user_access_binding method. - # result = client.create_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest - - # Converts hash and nil to an 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_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.create_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - # - # @overload update_gcp_user_access_binding(request, options = nil) - # Pass arguments to `update_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) - # Pass arguments to `update_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcp_user_access_binding [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - # - # # Call the update_gcp_user_access_binding method. - # result = client.update_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.update_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - # - # @overload delete_gcp_user_access_binding(request, options = nil) - # Pass arguments to `delete_gcp_user_access_binding` via a request object, either of type - # {::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_gcp_user_access_binding(name: nil) - # Pass arguments to `delete_gcp_user_access_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - # - # # Call the delete_gcp_user_access_binding method. - # result = client.delete_gcp_user_access_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_gcp_user_access_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_gcp_user_access_binding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_gcp_user_access_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_gcp_user_access_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.delete_gcp_user_access_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for the specified Access Context Manager - # {::Google::Identity::AccessContextManager::V1::AccessPolicy access policy}. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # {::Google::Identity::AccessContextManager::V1::AccessPolicy AccessPolicy}, - # {::Google::Identity::AccessContextManager::V1::AccessLevel AccessLevel}, or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/identity/access_context_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @access_context_manager_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccessContextManager REST API. - # - # This class represents the configuration for AccessContextManager 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::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_access_policies.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::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 AccessContextManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_access_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_policies - ## - # RPC-specific configuration for `get_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_policy - ## - # RPC-specific configuration for `create_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_policy - ## - # RPC-specific configuration for `update_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_policy - ## - # RPC-specific configuration for `delete_access_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_policy - ## - # RPC-specific configuration for `list_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_levels - ## - # RPC-specific configuration for `get_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :get_access_level - ## - # RPC-specific configuration for `create_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :create_access_level - ## - # RPC-specific configuration for `update_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :update_access_level - ## - # RPC-specific configuration for `delete_access_level` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_access_level - ## - # RPC-specific configuration for `replace_access_levels` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_access_levels - ## - # RPC-specific configuration for `list_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_perimeters - ## - # RPC-specific configuration for `get_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_perimeter - ## - # RPC-specific configuration for `create_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_perimeter - ## - # RPC-specific configuration for `update_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_perimeter - ## - # RPC-specific configuration for `delete_service_perimeter` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_perimeter - ## - # RPC-specific configuration for `replace_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_service_perimeters - ## - # RPC-specific configuration for `commit_service_perimeters` - # @return [::Gapic::Config::Method] - # - attr_reader :commit_service_perimeters - ## - # RPC-specific configuration for `list_gcp_user_access_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gcp_user_access_bindings - ## - # RPC-specific configuration for `get_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gcp_user_access_binding - ## - # RPC-specific configuration for `create_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gcp_user_access_binding - ## - # RPC-specific configuration for `update_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gcp_user_access_binding - ## - # RPC-specific configuration for `delete_gcp_user_access_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gcp_user_access_binding - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_access_policies_config = parent_rpcs.list_access_policies if parent_rpcs.respond_to? :list_access_policies - @list_access_policies = ::Gapic::Config::Method.new list_access_policies_config - get_access_policy_config = parent_rpcs.get_access_policy if parent_rpcs.respond_to? :get_access_policy - @get_access_policy = ::Gapic::Config::Method.new get_access_policy_config - create_access_policy_config = parent_rpcs.create_access_policy if parent_rpcs.respond_to? :create_access_policy - @create_access_policy = ::Gapic::Config::Method.new create_access_policy_config - update_access_policy_config = parent_rpcs.update_access_policy if parent_rpcs.respond_to? :update_access_policy - @update_access_policy = ::Gapic::Config::Method.new update_access_policy_config - delete_access_policy_config = parent_rpcs.delete_access_policy if parent_rpcs.respond_to? :delete_access_policy - @delete_access_policy = ::Gapic::Config::Method.new delete_access_policy_config - list_access_levels_config = parent_rpcs.list_access_levels if parent_rpcs.respond_to? :list_access_levels - @list_access_levels = ::Gapic::Config::Method.new list_access_levels_config - get_access_level_config = parent_rpcs.get_access_level if parent_rpcs.respond_to? :get_access_level - @get_access_level = ::Gapic::Config::Method.new get_access_level_config - create_access_level_config = parent_rpcs.create_access_level if parent_rpcs.respond_to? :create_access_level - @create_access_level = ::Gapic::Config::Method.new create_access_level_config - update_access_level_config = parent_rpcs.update_access_level if parent_rpcs.respond_to? :update_access_level - @update_access_level = ::Gapic::Config::Method.new update_access_level_config - delete_access_level_config = parent_rpcs.delete_access_level if parent_rpcs.respond_to? :delete_access_level - @delete_access_level = ::Gapic::Config::Method.new delete_access_level_config - replace_access_levels_config = parent_rpcs.replace_access_levels if parent_rpcs.respond_to? :replace_access_levels - @replace_access_levels = ::Gapic::Config::Method.new replace_access_levels_config - list_service_perimeters_config = parent_rpcs.list_service_perimeters if parent_rpcs.respond_to? :list_service_perimeters - @list_service_perimeters = ::Gapic::Config::Method.new list_service_perimeters_config - get_service_perimeter_config = parent_rpcs.get_service_perimeter if parent_rpcs.respond_to? :get_service_perimeter - @get_service_perimeter = ::Gapic::Config::Method.new get_service_perimeter_config - create_service_perimeter_config = parent_rpcs.create_service_perimeter if parent_rpcs.respond_to? :create_service_perimeter - @create_service_perimeter = ::Gapic::Config::Method.new create_service_perimeter_config - update_service_perimeter_config = parent_rpcs.update_service_perimeter if parent_rpcs.respond_to? :update_service_perimeter - @update_service_perimeter = ::Gapic::Config::Method.new update_service_perimeter_config - delete_service_perimeter_config = parent_rpcs.delete_service_perimeter if parent_rpcs.respond_to? :delete_service_perimeter - @delete_service_perimeter = ::Gapic::Config::Method.new delete_service_perimeter_config - replace_service_perimeters_config = parent_rpcs.replace_service_perimeters if parent_rpcs.respond_to? :replace_service_perimeters - @replace_service_perimeters = ::Gapic::Config::Method.new replace_service_perimeters_config - commit_service_perimeters_config = parent_rpcs.commit_service_perimeters if parent_rpcs.respond_to? :commit_service_perimeters - @commit_service_perimeters = ::Gapic::Config::Method.new commit_service_perimeters_config - list_gcp_user_access_bindings_config = parent_rpcs.list_gcp_user_access_bindings if parent_rpcs.respond_to? :list_gcp_user_access_bindings - @list_gcp_user_access_bindings = ::Gapic::Config::Method.new list_gcp_user_access_bindings_config - get_gcp_user_access_binding_config = parent_rpcs.get_gcp_user_access_binding if parent_rpcs.respond_to? :get_gcp_user_access_binding - @get_gcp_user_access_binding = ::Gapic::Config::Method.new get_gcp_user_access_binding_config - create_gcp_user_access_binding_config = parent_rpcs.create_gcp_user_access_binding if parent_rpcs.respond_to? :create_gcp_user_access_binding - @create_gcp_user_access_binding = ::Gapic::Config::Method.new create_gcp_user_access_binding_config - update_gcp_user_access_binding_config = parent_rpcs.update_gcp_user_access_binding if parent_rpcs.respond_to? :update_gcp_user_access_binding - @update_gcp_user_access_binding = ::Gapic::Config::Method.new update_gcp_user_access_binding_config - delete_gcp_user_access_binding_config = parent_rpcs.delete_gcp_user_access_binding if parent_rpcs.respond_to? :delete_gcp_user_access_binding - @delete_gcp_user_access_binding = ::Gapic::Config::Method.new delete_gcp_user_access_binding_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb deleted file mode 100644 index 484cf2ada2d9..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AccessContextManager 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 AccessContextManager 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Identity::AccessContextManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb deleted file mode 100644 index 2eba8ab83681..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/access_context_manager/rest/service_stub.rb +++ /dev/null @@ -1,1693 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - module Rest - ## - # REST service stub for the AccessContextManager 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_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse] - # A result object deserialized from the server's reply - def list_access_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A result object deserialized from the server's reply - def get_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.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_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse] - # A result object deserialized from the server's reply - def list_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::AccessLevel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # A result object deserialized from the server's reply - def get_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::AccessLevel.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_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_access_level request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_level_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_access_level", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_access_levels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_access_levels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_access_levels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse] - # A result object deserialized from the server's reply - def list_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # A result object deserialized from the server's reply - def get_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service_perimeter request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_perimeter_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service_perimeter", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def replace_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def commit_service_perimeters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_commit_service_perimeters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "commit_service_perimeters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse] - # A result object deserialized from the server's reply - def list_gcp_user_access_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gcp_user_access_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gcp_user_access_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # A result object deserialized from the server's reply - def get_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.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_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_gcp_user_access_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_gcp_user_access_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_gcp_user_access_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_policies REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/accessPolicies", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # 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_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/accessPolicies", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_policy REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/accessLevels", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest] - # 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_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels", - body: "access_level", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{access_level.name}", - body: "access_level", - matches: [ - ["access_level.name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_access_level REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_access_level_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_access_levels REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_access_levels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accessLevels:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/servicePerimeters", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters", - body: "service_perimeter", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_perimeter.name}", - body: "service_perimeter", - matches: [ - ["service_perimeter.name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_perimeter REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_perimeter_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:replaceAll", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the commit_service_perimeters REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_commit_service_perimeters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/servicePerimeters:commit", - body: "*", - matches: [ - ["parent", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gcp_user_access_bindings REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gcp_user_access_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest] - # 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_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gcpUserAccessBindings", - body: "gcp_user_access_binding", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{gcp_user_access_binding.name}", - body: "gcp_user_access_binding", - matches: [ - ["gcp_user_access_binding.name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_gcp_user_access_binding REST call - # - # @param request_pb [::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_gcp_user_access_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/gcpUserAccessBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/accessLevels/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^accessPolicies/[^/]+/servicePerimeters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/rest.rb deleted file mode 100644 index b85e8d3b9a1c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/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/identity/access_context_manager/v1/access_context_manager/rest" -require "google/identity/access_context_manager/v1/version" - -module Google - module Identity - module AccessContextManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/identity/access_context_manager/v1/rest" - # client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb deleted file mode 100644 index d2c2604fbcd6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/access_context_manager/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb deleted file mode 100644 index 5b241ff87987..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/type/device_resources_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/type/device_resources.proto - -require 'google/protobuf' - - -descriptor_data = "\n@google/identity/accesscontextmanager/type/device_resources.proto\x12)google.identity.accesscontextmanager.type*p\n\x16\x44\x65viceEncryptionStatus\x12\x1a\n\x16\x45NCRYPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45NCRYPTION_UNSUPPORTED\x10\x01\x12\x0f\n\x0bUNENCRYPTED\x10\x02\x12\r\n\tENCRYPTED\x10\x03*\x82\x01\n\x06OsType\x12\x12\n\x0eOS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45SKTOP_MAC\x10\x01\x12\x13\n\x0f\x44\x45SKTOP_WINDOWS\x10\x02\x12\x11\n\rDESKTOP_LINUX\x10\x03\x12\x15\n\x11\x44\x45SKTOP_CHROME_OS\x10\x06\x12\x0b\n\x07\x41NDROID\x10\x04\x12\x07\n\x03IOS\x10\x05*V\n\x15\x44\x65viceManagementLevel\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\x42\x8d\x02\n-com.google.identity.accesscontextmanager.typeB\tTypeProtoP\x01ZHgoogle.golang.org/genproto/googleapis/identity/accesscontextmanager/type\xaa\x02)Google.Identity.AccessContextManager.Type\xca\x02)Google\\Identity\\AccessContextManager\\Type\xea\x02,Google::Identity::AccessContextManager::Typeb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module Type - DeviceEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceEncryptionStatus").enummodule - OsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.OsType").enummodule - DeviceManagementLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.type.DeviceManagementLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb deleted file mode 100644 index 73ed14280699..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/identity/accesscontextmanager/v1/access_level_pb' -require 'google/identity/accesscontextmanager/v1/access_policy_pb' -require 'google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb' -require 'google/identity/accesscontextmanager/v1/service_perimeter_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/identity/accesscontextmanager/v1/access_context_manager.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a\x45google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x8c\x01\n\x19ListAccessPoliciesRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1aListAccessPoliciesResponse\x12N\n\x0f\x61\x63\x63\x65ss_policies\x18\x01 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x16GetAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\x9d\x01\n\x19UpdateAccessPolicyRequest\x12J\n\x06policy\x18\x01 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"c\n\x19\x44\x65leteAccessPolicyRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0accesscontextmanager.googleapis.com/AccessPolicy\"\xdc\x01\n\x17ListAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x04 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\x80\x01\n\x18ListAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x15GetAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\x12Q\n\x13\x61\x63\x63\x65ss_level_format\x18\x02 \x01(\x0e\x32\x34.google.identity.accesscontextmanager.v1.LevelFormat\"\xb4\x01\n\x18\x43reateAccessLevelRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x02 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\"\xa1\x01\n\x18UpdateAccessLevelRequest\x12O\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"a\n\x18\x44\x65leteAccessLevelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel\"\xc5\x01\n\x1aReplaceAccessLevelsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/accesscontextmanager.googleapis.com/AccessLevel\x12P\n\raccess_levels\x18\x02 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"j\n\x1bReplaceAccessLevelsResponse\x12K\n\raccess_levels\x18\x01 \x03(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevel\"\x93\x01\n\x1cListServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1dListServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1aGetServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xc8\x01\n\x1d\x43reateServicePerimeterRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Y\n\x11service_perimeter\x18\x02 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateServicePerimeterRequest\x12Y\n\x11service_perimeter\x18\x01 \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n\x1d\x44\x65leteServicePerimeterRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4accesscontextmanager.googleapis.com/ServicePerimeter\"\xd9\x01\n\x1fReplaceServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12Z\n\x12service_perimeters\x18\x02 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterB\x03\xe0\x41\x02\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"y\n ReplaceServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"|\n\x1e\x43ommitServicePerimetersRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x61\x63\x63\x65sscontextmanager.googleapis.com/ServicePerimeter\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"x\n\x1f\x43ommitServicePerimetersResponse\x12U\n\x12service_perimeters\x18\x01 \x03(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\"\x9d\x01\n ListGcpUserAccessBindingsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\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\"\x9d\x01\n!ListGcpUserAccessBindingsResponse\x12_\n\x18gcp_user_access_bindings\x18\x01 \x03(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x1eGetGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\xd2\x01\n!CreateGcpUserAccessBindingRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x63\n\x17gcp_user_access_binding\x18\x02 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\"\xbe\x01\n!UpdateGcpUserAccessBindingRequest\x12\x63\n\x17gcp_user_access_binding\x18\x01 \x01(\x0b\x32=.google.identity.accesscontextmanager.v1.GcpUserAccessBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"s\n!DeleteGcpUserAccessBindingRequest\x12N\n\x04name\x18\x01 \x01(\tB@\xe0\x41\x02\xfa\x41:\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\"\'\n%GcpUserAccessBindingOperationMetadata\"\'\n%AccessContextManagerOperationMetadata*D\n\x0bLevelFormat\x12\x1c\n\x18LEVEL_FORMAT_UNSPECIFIED\x10\x00\x12\x0e\n\nAS_DEFINED\x10\x01\x12\x07\n\x03\x43\x45L\x10\x02\x32\xf1\x32\n\x14\x41\x63\x63\x65ssContextManager\x12\xb9\x01\n\x12ListAccessPolicies\x12\x42.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest\x1a\x43.google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/accessPolicies\x12\xb5\x01\n\x0fGetAccessPolicy\x12?.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest\x1a\x35.google.identity.accesscontextmanager.v1.AccessPolicy\"*\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{name=accessPolicies/*}\x12\xc1\x01\n\x12\x43reateAccessPolicy\x12\x35.google.identity.accesscontextmanager.v1.AccessPolicy\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02\x17\"\x12/v1/accessPolicies:\x01*\x12\xf8\x01\n\x12UpdateAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x35\n\x0c\x41\x63\x63\x65ssPolicy\x12%AccessContextManagerOperationMetadata\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02,2\"/v1/{policy.name=accessPolicies/*}:\x06policy\x12\xe4\x01\n\x12\x44\x65leteAccessPolicy\x12\x42.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/{name=accessPolicies/*}\x12\xd4\x01\n\x10ListAccessLevels\x12@.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest\x1a\x41.google.identity.accesscontextmanager.v1.ListAccessLevelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=accessPolicies/*}/accessLevels\x12\xc1\x01\n\x0eGetAccessLevel\x12>.google.identity.accesscontextmanager.v1.GetAccessLevelRequest\x1a\x34.google.identity.accesscontextmanager.v1.AccessLevel\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=accessPolicies/*/accessLevels/*}\x12\x85\x02\n\x11\x43reateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x13parent,access_level\x82\xd3\xe4\x93\x02:\"*/v1/{parent=accessPolicies/*}/accessLevels:\x0c\x61\x63\x63\x65ss_level\x12\x97\x02\n\x11UpdateAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x34\n\x0b\x41\x63\x63\x65ssLevel\x12%AccessContextManagerOperationMetadata\xda\x41\x18\x61\x63\x63\x65ss_level,update_mask\x82\xd3\xe4\x93\x02G27/v1/{access_level.name=accessPolicies/*/accessLevels/*}:\x0c\x61\x63\x63\x65ss_level\x12\xf1\x01\n\x11\x44\x65leteAccessLevel\x12\x41.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=accessPolicies/*/accessLevels/*}\x12\x83\x02\n\x13ReplaceAccessLevels\x12\x43.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x44\n\x1bReplaceAccessLevelsResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{parent=accessPolicies/*}/accessLevels:replaceAll:\x01*\x12\xe8\x01\n\x15ListServicePerimeters\x12\x45.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest\x1a\x46.google.identity.accesscontextmanager.v1.ListServicePerimetersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=accessPolicies/*}/servicePerimeters\x12\xd5\x01\n\x13GetServicePerimeter\x12\x43.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest\x1a\x39.google.identity.accesscontextmanager.v1.ServicePerimeter\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\xa3\x02\n\x16\x43reateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x18parent,service_perimeter\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accessPolicies/*}/servicePerimeters:\x11service_perimeter\x12\xba\x02\n\x16UpdateServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\x39\n\x10ServicePerimeter\x12%AccessContextManagerOperationMetadata\xda\x41\x1dservice_perimeter,update_mask\x82\xd3\xe4\x93\x02V2A/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}:\x11service_perimeter\x12\x80\x02\n\x16\x44\x65leteServicePerimeter\x12\x46.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41>\n\x15google.protobuf.Empty\x12%AccessContextManagerOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=accessPolicies/*/servicePerimeters/*}\x12\x97\x02\n\x18ReplaceServicePerimeters\x12H.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41I\n ReplaceServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll:\x01*\x12\x90\x02\n\x17\x43ommitServicePerimeters\x12G.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41H\n\x1f\x43ommitServicePerimetersResponse\x12%AccessContextManagerOperationMetadata\x82\xd3\xe4\x93\x02;\"6/v1/{parent=accessPolicies/*}/servicePerimeters:commit:\x01*\x12\xf7\x01\n\x19ListGcpUserAccessBindings\x12I.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest\x1aJ.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*}/gcpUserAccessBindings\x12\xe4\x01\n\x17GetGcpUserAccessBinding\x12G.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest\x1a=.google.identity.accesscontextmanager.v1.GcpUserAccessBinding\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\xbe\x02\n\x1a\x43reateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x1eparent,gcp_user_access_binding\x82\xd3\xe4\x93\x02M\"2/v1/{parent=organizations/*}/gcpUserAccessBindings:\x17gcp_user_access_binding\x12\xdb\x02\n\x1aUpdateGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41=\n\x14GcpUserAccessBinding\x12%GcpUserAccessBindingOperationMetadata\xda\x41#gcp_user_access_binding,update_mask\x82\xd3\xe4\x93\x02\x65\x32J/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}:\x17gcp_user_access_binding\x12\x8c\x02\n\x1a\x44\x65leteGcpUserAccessBinding\x12J.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41>\n\x15google.protobuf.Empty\x12%GcpUserAccessBindingOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/gcpUserAccessBindings/*}\x12\x82\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:setIamPolicy:\x01*\x12\x82\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{resource=accessPolicies/*}:getIamPolicy:\x01*\x12\xbf\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd3\x01\x82\xd3\xe4\x93\x02\xcc\x01\"2/v1/{resource=accessPolicies/*}:testIamPermissions:\x01*ZF\"A/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions:\x01*ZK\"F/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions:\x01*\x1aW\xca\x41#accesscontextmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19\x41\x63\x63\x65ssContextManagerProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ListAccessPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest").msgclass - ListAccessPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessPoliciesResponse").msgclass - GetAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessPolicyRequest").msgclass - UpdateAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest").msgclass - DeleteAccessPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest").msgclass - ListAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsRequest").msgclass - ListAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListAccessLevelsResponse").msgclass - GetAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetAccessLevelRequest").msgclass - CreateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateAccessLevelRequest").msgclass - UpdateAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest").msgclass - DeleteAccessLevelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest").msgclass - ReplaceAccessLevelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest").msgclass - ReplaceAccessLevelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceAccessLevelsResponse").msgclass - ListServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersRequest").msgclass - ListServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListServicePerimetersResponse").msgclass - GetServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetServicePerimeterRequest").msgclass - CreateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest").msgclass - UpdateServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest").msgclass - DeleteServicePerimeterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest").msgclass - ReplaceServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest").msgclass - ReplaceServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ReplaceServicePerimetersResponse").msgclass - CommitServicePerimetersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest").msgclass - CommitServicePerimetersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CommitServicePerimetersResponse").msgclass - ListGcpUserAccessBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest").msgclass - ListGcpUserAccessBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse").msgclass - GetGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest").msgclass - CreateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest").msgclass - UpdateGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest").msgclass - DeleteGcpUserAccessBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest").msgclass - GcpUserAccessBindingOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBindingOperationMetadata").msgclass - AccessContextManagerOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessContextManagerOperationMetadata").msgclass - LevelFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.LevelFormat").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb deleted file mode 100644 index 5d40fe4c565a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_context_manager_services_pb.rb +++ /dev/null @@ -1,240 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/identity/accesscontextmanager/v1/access_context_manager.proto for package 'Google.Identity.AccessContextManager.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/identity/accesscontextmanager/v1/access_context_manager_pb' - -module Google - module Identity - module AccessContextManager - module V1 - module AccessContextManager - # API for setting [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] and [service - # perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] - # for Google Cloud projects. Each organization has one [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the - # [access levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # and [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. This - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is - # applicable to all resources in the organization. - # AccessPolicies - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.identity.accesscontextmanager.v1.AccessContextManager' - - # Lists all [access policies] - # [google.identity.accesscontextmanager.v1.AccessPolicy] in an - # organization. - rpc :ListAccessPolicies, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse - # Returns an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name. - rpc :GetAccessPolicy, ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::Google::Identity::AccessContextManager::V1::AccessPolicy - # Creates an access policy. This method fails if the organization already has - # an access policy. The long-running operation has a successful status - # after the access policy propagates to long-lasting storage. - # Syntactic and basic semantic errors are returned in `metadata` as a - # BadRequest proto. - rpc :CreateAccessPolicy, ::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Google::Longrunning::Operation - # Updates an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. The - # long-running operation from this RPC has a successful status after the - # changes to the [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] propagate - # to long-lasting storage. - rpc :UpdateAccessPolicy, ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::Google::Longrunning::Operation - # Deletes an [access policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] based on the - # resource name. The long-running operation has a successful status after the - # [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] - # is removed from long-lasting storage. - rpc :DeleteAccessPolicy, ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::Google::Longrunning::Operation - # Lists all [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] for an access - # policy. - rpc :ListAccessLevels, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse - # Gets an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. - rpc :GetAccessLevel, ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::Google::Identity::AccessContextManager::V1::AccessLevel - # Creates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the [access - # level] [google.identity.accesscontextmanager.v1.AccessLevel] - # propagates to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :CreateAccessLevel, ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::Google::Longrunning::Operation - # Updates an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running - # operation from this RPC has a successful status after the changes to - # the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] propagate - # to long-lasting storage. If [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contain - # errors, an error response is returned for the first error encountered. - rpc :UpdateAccessLevel, ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::Google::Longrunning::Operation - # Deletes an [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource - # name. The long-running operation from this RPC has a successful status - # after the [access level] - # [google.identity.accesscontextmanager.v1.AccessLevel] has been removed - # from long-lasting storage. - rpc :DeleteAccessLevel, ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::Google::Longrunning::Operation - # Replaces all existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with - # the [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting - # storage. If the replacement contains errors, an error response is returned - # for the first error encountered. Upon error, the replacement is cancelled, - # and existing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are not - # affected. The Operation.response field contains - # ReplaceAccessLevelsResponse. Removing [access levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an - # error. - rpc :ReplaceAccessLevels, ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::Google::Longrunning::Operation - # Lists all [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] for an - # access policy. - rpc :ListServicePerimeters, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse - # Gets a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. - rpc :GetServicePerimeter, ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::Google::Identity::AccessContextManager::V1::ServicePerimeter - # Creates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :CreateServicePerimeter, ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::Google::Longrunning::Operation - # Updates a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. The - # long-running operation from this RPC has a successful status after the - # [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] - # propagates to long-lasting storage. If a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] contains - # errors, an error response is returned for the first error encountered. - rpc :UpdateServicePerimeter, ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::Google::Longrunning::Operation - # Deletes a [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the - # resource name. The long-running operation from this RPC has a successful - # status after the [service perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from - # long-lasting storage. - rpc :DeleteServicePerimeter, ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::Google::Longrunning::Operation - # Replace all existing [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access - # policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This - # is done atomically. The long-running operation from this RPC has a - # successful status after all replacements propagate to long-lasting storage. - # Replacements containing errors result in an error response for the first - # error encountered. Upon an error, replacement are cancelled and existing - # [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] are not - # affected. The Operation.response field contains - # ReplaceServicePerimetersResponse. - rpc :ReplaceServicePerimeters, ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::Google::Longrunning::Operation - # Commits the dry-run specification for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in an - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # A commit operation on a service perimeter involves copying its `spec` field - # to the `status` field of the service perimeter. Only [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] with - # `use_explicit_dry_run_spec` field set to true are affected by a commit - # operation. The long-running operation from this RPC has a successful - # status after the dry-run specifications for all the [service perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] have been - # committed. If a commit fails, it causes the long-running operation to - # return an error response and the entire commit operation is cancelled. - # When successful, the Operation.response field contains - # CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are - # cleared after a successful commit operation. - rpc :CommitServicePerimeters, ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::Google::Longrunning::Operation - # Lists all [GcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a - # Google Cloud organization. - rpc :ListGcpUserAccessBindings, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse - # Gets the [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with - # the given name. - rpc :GetGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding - # Creates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the - # client specifies a [name] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], - # the server ignores it. Fails if a resource already exists with the same - # [group_key] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. - # Completion of this long-running operation does not necessarily signify that - # the new binding is deployed onto all affected users, which may take more - # time. - rpc :CreateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Updates a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the changed binding is deployed onto all affected users, which may take - # more time. - rpc :UpdateGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Deletes a [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. - # Completion of this long-running operation does not necessarily signify that - # the binding deletion is deployed onto all affected users, which may take - # more time. - rpc :DeleteGcpUserAccessBinding, ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::Google::Longrunning::Operation - # Sets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - # This method replaces the existing IAM policy on the access policy. The IAM - # policy controls the set of users who can perform specific operations on the - # Access Context Manager [access - # policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for the specified Access Context Manager - # [access policy][google.identity.accesscontextmanager.v1.AccessPolicy]. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the IAM permissions that the caller has on the specified Access - # Context Manager resource. The resource can be an - # [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy], - # [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or - # [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter - # ]. This method does not support other resources. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb deleted file mode 100644 index ead78b22f47d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_level_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_level.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/identity/accesscontextmanager/type/device_resources_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n:google/identity/accesscontextmanager/v1/access_level.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a@google/identity/accesscontextmanager/type/device_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xaa\x03\n\x0b\x41\x63\x63\x65ssLevel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x33.google.identity.accesscontextmanager.v1.BasicLevelH\x00\x12\x46\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.CustomLevelH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:p\xea\x41m\n/accesscontextmanager.googleapis.com/AccessLevel\x12:accessPolicies/{access_policy}/accessLevels/{access_level}B\x07\n\x05level\"\xef\x01\n\nBasicLevel\x12\x46\n\nconditions\x18\x01 \x03(\x0b\x32\x32.google.identity.accesscontextmanager.v1.Condition\x12j\n\x12\x63ombining_function\x18\x02 \x01(\x0e\x32N.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction\"-\n\x1a\x43onditionCombiningFunction\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x01\n\tCondition\x12\x16\n\x0eip_subnetworks\x18\x01 \x03(\t\x12L\n\rdevice_policy\x18\x02 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.DevicePolicy\x12\x1e\n\x16required_access_levels\x18\x03 \x03(\t\x12\x0e\n\x06negate\x18\x05 \x01(\x08\x12\x0f\n\x07members\x18\x06 \x03(\t\x12\x0f\n\x07regions\x18\x07 \x03(\t\".\n\x0b\x43ustomLevel\x12\x1f\n\x04\x65xpr\x18\x01 \x01(\x0b\x32\x11.google.type.Expr\"\x89\x03\n\x0c\x44\x65vicePolicy\x12\x1a\n\x12require_screenlock\x18\x01 \x01(\x08\x12\x66\n\x1b\x61llowed_encryption_statuses\x18\x02 \x03(\x0e\x32\x41.google.identity.accesscontextmanager.type.DeviceEncryptionStatus\x12M\n\x0eos_constraints\x18\x03 \x03(\x0b\x32\x35.google.identity.accesscontextmanager.v1.OsConstraint\x12j\n allowed_device_management_levels\x18\x06 \x03(\x0e\x32@.google.identity.accesscontextmanager.type.DeviceManagementLevel\x12\x1e\n\x16require_admin_approval\x18\x07 \x01(\x08\x12\x1a\n\x12require_corp_owned\x18\x08 \x01(\x08\"\x8f\x01\n\x0cOsConstraint\x12\x42\n\x07os_type\x18\x01 \x01(\x0e\x32\x31.google.identity.accesscontextmanager.type.OsType\x12\x17\n\x0fminimum_version\x18\x02 \x01(\t\x12\"\n\x1arequire_verified_chrome_os\x18\x03 \x01(\x08\x42\xa7\x02\n+com.google.identity.accesscontextmanager.v1B\x10\x41\x63\x63\x65ssLevelProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessLevel").msgclass - BasicLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel").msgclass - BasicLevel::ConditionCombiningFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction").enummodule - Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.Condition").msgclass - CustomLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.CustomLevel").msgclass - DevicePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.DevicePolicy").msgclass - OsConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.OsConstraint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb deleted file mode 100644 index 3a8fc38766be..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/access_policy_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/access_policy.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n;google/identity/accesscontextmanager/v1/access_policy.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\x0c\x41\x63\x63\x65ssPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x0e\n\x06scopes\x18\x07 \x03(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:U\xea\x41R\n0accesscontextmanager.googleapis.com/AccessPolicy\x12\x1e\x61\x63\x63\x65ssPolicies/{access_policy}B\xa2\x02\n+com.google.identity.accesscontextmanager.v1B\x0bPolicyProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - AccessPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.AccessPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb deleted file mode 100644 index ea5da3c0c0e1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/gcp_user_access_binding_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\x14GcpUserAccessBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\tgroup_key\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12N\n\raccess_levels\x18\x03 \x03(\tB7\xe0\x41\x02\xfa\x41\x31\n/accesscontextmanager.googleapis.com/AccessLevel:\x8c\x01\xea\x41\x88\x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorganizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAccessBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - GcpUserAccessBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.GcpUserAccessBinding").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb b/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb deleted file mode 100644 index e57cf251b2a2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/lib/google/identity/accesscontextmanager/v1/service_perimeter_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/identity/accesscontextmanager/v1/service_perimeter.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/identity/accesscontextmanager/v1/service_perimeter.proto\x12\'google.identity.accesscontextmanager.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x05\n\x10ServicePerimeter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12_\n\x0eperimeter_type\x18\x06 \x01(\x0e\x32G.google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType\x12O\n\x06status\x18\x07 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12M\n\x04spec\x18\x08 \x01(\x0b\x32?.google.identity.accesscontextmanager.v1.ServicePerimeterConfig\x12!\n\x19use_explicit_dry_run_spec\x18\t \x01(\x08\"F\n\rPerimeterType\x12\x1a\n\x16PERIMETER_TYPE_REGULAR\x10\x00\x12\x19\n\x15PERIMETER_TYPE_BRIDGE\x10\x01:\x7f\xea\x41|\n4accesscontextmanager.googleapis.com/ServicePerimeter\x12\x44\x61\x63\x63\x65ssPolicies/{access_policy}/servicePerimeters/{service_perimeter}\"\xb5\x0f\n\x16ServicePerimeterConfig\x12\x11\n\tresources\x18\x01 \x03(\t\x12\x15\n\raccess_levels\x18\x02 \x03(\t\x12\x1b\n\x13restricted_services\x18\x04 \x03(\t\x12v\n\x17vpc_accessible_services\x18\n \x01(\x0b\x32U.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices\x12g\n\x10ingress_policies\x18\x08 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy\x12\x65\n\x0f\x65gress_policies\x18\t \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\x1aM\n\x15VpcAccessibleServices\x12\x1a\n\x12\x65nable_restriction\x18\x01 \x01(\x08\x12\x18\n\x10\x61llowed_services\x18\x02 \x03(\t\x1a@\n\x0eMethodSelector\x12\x10\n\x06method\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x8e\x01\n\x0c\x41piOperation\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12h\n\x10method_selectors\x18\x02 \x03(\x0b\x32N.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector\x1a\x45\n\rIngressSource\x12\x16\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\tH\x00\x12\x12\n\x08resource\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a\xe6\x01\n\x0bIngressFrom\x12^\n\x07sources\x18\x01 \x03(\x0b\x32M.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource\x12\x12\n\nidentities\x18\x02 \x03(\t\x12\x63\n\ridentity_type\x18\x03 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x80\x01\n\tIngressTo\x12`\n\noperations\x18\x01 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x11\n\tresources\x18\x02 \x03(\t\x1a\xd1\x01\n\rIngressPolicy\x12\x61\n\x0cingress_from\x18\x01 \x01(\x0b\x32K.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom\x12]\n\ningress_to\x18\x02 \x01(\x0b\x32I.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo\x1a\x85\x01\n\nEgressFrom\x12\x12\n\nidentities\x18\x01 \x03(\t\x12\x63\n\ridentity_type\x18\x02 \x01(\x0e\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType\x1a\x9b\x01\n\x08\x45gressTo\x12\x11\n\tresources\x18\x01 \x03(\t\x12`\n\noperations\x18\x02 \x03(\x0b\x32L.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\x12\x1a\n\x12\x65xternal_resources\x18\x03 \x03(\t\x1a\xcc\x01\n\x0c\x45gressPolicy\x12_\n\x0b\x65gress_from\x18\x01 \x01(\x0b\x32J.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom\x12[\n\tegress_to\x18\x02 \x01(\x0b\x32H.google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo\"n\n\x0cIdentityType\x12\x1d\n\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41NY_IDENTITY\x10\x01\x12\x14\n\x10\x41NY_USER_ACCOUNT\x10\x02\x12\x17\n\x13\x41NY_SERVICE_ACCOUNT\x10\x03\x42\xac\x02\n+com.google.identity.accesscontextmanager.v1B\x15ServicePerimeterProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02\'Google.Identity.AccessContextManager.V1\xca\x02\'Google\\Identity\\AccessContextManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Identity - module AccessContextManager - module V1 - ServicePerimeter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter").msgclass - ServicePerimeter::PerimeterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeter.PerimeterType").enummodule - ServicePerimeterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig").msgclass - ServicePerimeterConfig::VpcAccessibleServices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.VpcAccessibleServices").msgclass - ServicePerimeterConfig::MethodSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector").msgclass - ServicePerimeterConfig::ApiOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation").msgclass - ServicePerimeterConfig::IngressSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource").msgclass - ServicePerimeterConfig::IngressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom").msgclass - ServicePerimeterConfig::IngressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo").msgclass - ServicePerimeterConfig::IngressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy").msgclass - ServicePerimeterConfig::EgressFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom").msgclass - ServicePerimeterConfig::EgressTo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo").msgclass - ServicePerimeterConfig::EgressPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy").msgclass - ServicePerimeterConfig::IdentityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IdentityType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md deleted file mode 100644 index 6f796a729053..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Access Context Manager V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb deleted file mode 100644 index 98103f9a8eb2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module Type - # The encryption state of the device. - module DeviceEncryptionStatus - # The encryption status of the device is not specified or not known. - ENCRYPTION_UNSPECIFIED = 0 - - # The device does not support encryption. - ENCRYPTION_UNSUPPORTED = 1 - - # The device supports encryption, but is currently unencrypted. - UNENCRYPTED = 2 - - # The device is encrypted. - ENCRYPTED = 3 - end - - # The operating system type of the device. - # Next id: 7 - module OsType - # The operating system of the device is not specified or not known. - OS_UNSPECIFIED = 0 - - # A desktop Mac operating system. - DESKTOP_MAC = 1 - - # A desktop Windows operating system. - DESKTOP_WINDOWS = 2 - - # A desktop Linux operating system. - DESKTOP_LINUX = 3 - - # A desktop ChromeOS operating system. - DESKTOP_CHROME_OS = 6 - - # An Android operating system. - ANDROID = 4 - - # An iOS operating system. - IOS = 5 - end - - # The degree to which the device is managed by the Cloud organization. - module DeviceManagementLevel - # The device's management level is not specified or not known. - MANAGEMENT_UNSPECIFIED = 0 - - # The device is not managed. - NONE = 1 - - # Basic management is enabled, which is generally limited to monitoring and - # wiping the corporate account. - BASIC = 2 - - # Complete device management. This includes more thorough monitoring and the - # ability to directly manage the device (such as remote wiping). This can be - # enabled through the Android Enterprise Platform. - COMPLETE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb deleted file mode 100644 index 0a4ef8552281..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_context_manager.rb +++ /dev/null @@ -1,539 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # A request to list all `AccessPolicies` for a container. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the container to list AccessPolicy instances - # from. - # - # Format: - # `organizations/{org_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of AccessPolicy instances to include in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of AccessPolicy instances. Defaults to - # the first page of results. - class ListAccessPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessPoliciesRequest`. - # @!attribute [rw] access_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessPolicy>] - # List of the AccessPolicy instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to get. - # - # Format `accessPolicies/{policy_id}` - class GetAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessPolicy`. - # @!attribute [rw] policy - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # Required. The updated AccessPolicy. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessPolicy`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the access policy to delete. - # - # Format `accessPolicies/{policy_id}` - class DeleteAccessPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `AccessLevels` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] to include in - # the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # Defaults to the first page of results. - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression language, as - # `CustomLevels`, rather than as `BasicLevels`. Defaults to returning - # `AccessLevels` in the format they were defined. - class ListAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListAccessLevelsRequest`. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - # @!attribute [rw] access_level_format - # @return [::Google::Identity::AccessContextManager::V1::LevelFormat] - # Whether to return `BasicLevels` in the Cloud Common Expression - # Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where - # [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] - # are returned as `BasicLevels` or `CustomLevels` based on how they were - # created. If set to CEL, all [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] are returned as - # `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent - # `CustomLevels`. - class GetAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create an `AccessLevel`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Access - # Level] [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] to create. - # Syntactic correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - class CreateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an `AccessLevel`. - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Required. The updated [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic - # correctness of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] is a - # precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an `AccessLevel`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: - # `accessPolicies/{policy_id}/accessLevels/{access_level_id}` - class DeleteAccessLevelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Access Levels in an Access Policy with - # the Access Levels provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # Required. The desired [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] that should - # replace all existing [Access Levels] - # [google.identity.accesscontextmanager.v1.AccessLevel] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceAccessLevelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceAccessLevelsRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] access_levels - # @return [::Array<::Google::Identity::AccessContextManager::V1::AccessLevel>] - # List of the [Access Level] - # [google.identity.accesscontextmanager.v1.AccessLevel] instances. - class ReplaceAccessLevelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list all `ServicePerimeters` in an `AccessPolicy`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy to list [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] from. - # - # Format: - # `accessPolicies/{policy_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to include - # in the list. Default 100. - # @!attribute [rw] page_token - # @return [::String] - # Next page token for the next batch of [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # Defaults to the first page of results. - class ListServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to `ListServicePerimetersRequest`. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of results. If the value is - # empty, no further results remain. - class ListServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a particular `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` - class GetServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a `ServicePerimeter`. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns this [Service - # Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. - # Syntactic correctness of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] is a - # precondition for creation. - class CreateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a `ServicePerimeter`. - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Required. The updated `ServicePerimeter`. Syntactic correctness of the - # `ServicePerimeter` is a precondition for creation. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask to control which fields get updated. Must be non-empty. - class UpdateServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a `ServicePerimeter`. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: - # `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` - class DeleteServicePerimeterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to replace all existing Service Perimeters in an Access Policy - # with the Service Perimeters provided. This is done atomically. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the access policy which owns these - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # Required. The desired [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that should - # replace all existing [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in the - # [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # replace operation is to be performed on. If, at the time of replace, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the replace operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class ReplaceServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to ReplaceServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. - class ReplaceServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to commit dry-run specs in all [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to - # an {::Google::Identity::AccessContextManager::V1::AccessPolicy Access Policy}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name for the parent [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all - # [Service Perimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for - # the commit operation. - # - # Format: `accessPolicies/{policy_id}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag for the version of the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy] that this - # commit operation is to be performed on. If, at the time of commit, the - # etag for the Access Policy stored in Access Context Manager is different - # from the specified etag, then the commit operation will not be performed - # and the call will fail. This field is not required. If etag is not - # provided, the operation will be performed as if a valid etag is provided. - class CommitServicePerimetersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to CommitServicePerimetersRequest. This will be put inside of - # Operation.response field. - # @!attribute [rw] service_perimeters - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter>] - # List of all the [Service Perimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in - # the [Access Policy] - # [google.identity.accesscontextmanager.v1.AccessPolicy]. - class CommitServicePerimetersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. The server may return fewer items. - # If left blank, the server may return any number of items. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If left blank, returns the first page. To enumerate all items, use the - # [next_page_token] - # [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] - # from your previous list operation. - class ListGcpUserAccessBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of [ListGcpUserAccessBindings] - # [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings]. - # @!attribute [rw] gcp_user_access_bindings - # @return [::Array<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>] - # [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] next_page_token - # @return [::String] - # Token to get the next page of items. If blank, there are no more items. - class ListGcpUserAccessBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [GetGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class GetGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [CreateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding]. - # @!attribute [rw] parent - # @return [::String] - # Required. Example: "organizations/256" - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - class CreateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [UpdateGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding]. - # @!attribute [rw] gcp_user_access_binding - # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding] - # Required. [GcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Only the fields specified in this mask are updated. Because name and - # group_key cannot be changed, update_mask is required and must always be: - # - # update_mask { - # paths: "access_levels" - # } - class UpdateGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of [DeleteGcpUserAccessBinding] - # [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding]. - # @!attribute [rw] name - # @return [::String] - # Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - class DeleteGcpUserAccessBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Currently, a completed operation means nothing. In the future, this metadata - # and a completed operation may indicate that the binding has taken effect and - # is affecting access decisions for all users. - class GcpUserAccessBindingOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of Access Context Manager's Long Running Operations. - class AccessContextManagerOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The format used in an `AccessLevel`. - module LevelFormat - # The format was not specified. - LEVEL_FORMAT_UNSPECIFIED = 0 - - # Uses the format the resource was defined in. BasicLevels are returned as - # BasicLevels, CustomLevels are returned as CustomLevels. - AS_DEFINED = 1 - - # Use Cloud Common Expression Language when returning the resource. Both - # BasicLevels and CustomLevels are returned as CustomLevels. - CEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb deleted file mode 100644 index 263cc28aa3d0..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # An `AccessLevel` is a label that can be applied to requests to Google Cloud - # services, along with a list of requirements necessary for the label to be - # applied. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the Access Level. The `short_name` component - # must begin with a letter and only include alphanumeric and '_'. Format: - # `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum - # length of the `access_level` component is 50 characters. - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `AccessLevel` and its use. Does not affect behavior. - # @!attribute [rw] basic - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel] - # A `BasicLevel` composed of `Conditions`. - # - # Note: The following fields are mutually exclusive: `basic`, `custom`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom - # @return [::Google::Identity::AccessContextManager::V1::CustomLevel] - # A `CustomLevel` written in the Common Expression Language. - # - # Note: The following fields are mutually exclusive: `custom`, `basic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessLevel` was updated in UTC. - class AccessLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BasicLevel` is an `AccessLevel` using a set of recommended features. - # @!attribute [rw] conditions - # @return [::Array<::Google::Identity::AccessContextManager::V1::Condition>] - # Required. A list of requirements for the `AccessLevel` to be granted. - # @!attribute [rw] combining_function - # @return [::Google::Identity::AccessContextManager::V1::BasicLevel::ConditionCombiningFunction] - # How the `conditions` list should be combined to determine if a request is - # granted this `AccessLevel`. If AND is used, each `Condition` in - # `conditions` must be satisfied for the `AccessLevel` to be applied. If OR - # is used, at least one `Condition` in `conditions` must be satisfied for the - # `AccessLevel` to be applied. Default behavior is AND. - class BasicLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for how the `conditions` list should be combined to determine if - # this `AccessLevel` is applied. Default is AND. - module ConditionCombiningFunction - # All `Conditions` must be true for the `BasicLevel` to be true. - AND = 0 - - # If at least one `Condition` is true, then the `BasicLevel` is true. - OR = 1 - end - end - - # A condition necessary for an `AccessLevel` to be granted. The Condition is an - # AND over its fields. So a Condition is true if: 1) the request IP is from one - # of the listed subnetworks AND 2) the originating device complies with the - # listed device policy AND 3) all listed access levels are granted AND 4) the - # request was sent at a time allowed by the DateTimeRestriction. - # @!attribute [rw] ip_subnetworks - # @return [::Array<::String>] - # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for - # a CIDR IP address block, the specified IP address portion must be properly - # truncated (i.e. all the host bits must be zero) or the input is considered - # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is - # not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas - # "2001:db8::1/32" is not. The originating IP of a request must be in one of - # the listed subnets in order for this Condition to be true. If empty, all IP - # addresses are allowed. - # @!attribute [rw] device_policy - # @return [::Google::Identity::AccessContextManager::V1::DevicePolicy] - # Device specific restrictions, all restrictions must hold for the - # Condition to be true. If not specified, all devices are allowed. - # @!attribute [rw] required_access_levels - # @return [::Array<::String>] - # A list of other access levels defined in the same `Policy`, referenced by - # resource name. Referencing an `AccessLevel` which does not exist is an - # error. All access levels listed must be granted for the Condition - # to be true. Example: - # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` - # @!attribute [rw] negate - # @return [::Boolean] - # Whether to negate the Condition. If true, the Condition becomes a NAND over - # its non-empty fields, each field must be false for the Condition overall to - # be satisfied. Defaults to false. - # @!attribute [rw] members - # @return [::Array<::String>] - # The request must be made by one of the provided user or service - # accounts. Groups are not supported. - # Syntax: - # `user:{emailid}` - # `serviceAccount:{emailid}` - # If not specified, a request may come from any user. - # @!attribute [rw] regions - # @return [::Array<::String>] - # The request must originate from one of the provided countries/regions. - # Must be valid ISO 3166-1 alpha-2 codes. - class Condition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language - # to represent the necessary conditions for the level to apply to a request. - # See CEL spec at: https://github.com/google/cel-spec - # @!attribute [rw] expr - # @return [::Google::Type::Expr] - # Required. A Cloud CEL expression evaluating to a boolean. - class CustomLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `DevicePolicy` specifies device specific restrictions necessary to acquire a - # given access level. A `DevicePolicy` specifies requirements for requests from - # devices to be granted access levels, it does not do any enforcement on the - # device. `DevicePolicy` acts as an AND over all specified fields, and each - # repeated field is an OR over its elements. Any unset fields are ignored. For - # example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : - # DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be - # true for requests originating from encrypted Linux desktops and encrypted - # Windows desktops. - # @!attribute [rw] require_screenlock - # @return [::Boolean] - # Whether or not screenlock is required for the DevicePolicy to be true. - # Defaults to `false`. - # @!attribute [rw] allowed_encryption_statuses - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>] - # Allowed encryptions statuses, an empty list allows all statuses. - # @!attribute [rw] os_constraints - # @return [::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>] - # Allowed OS versions, an empty list allows all types and all versions. - # @!attribute [rw] allowed_device_management_levels - # @return [::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>] - # Allowed device management levels, an empty list allows all management - # levels. - # @!attribute [rw] require_admin_approval - # @return [::Boolean] - # Whether the device needs to be approved by the customer admin. - # @!attribute [rw] require_corp_owned - # @return [::Boolean] - # Whether the device needs to be corp owned. - class DevicePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A restriction on the OS type and version of devices making requests. - # @!attribute [rw] os_type - # @return [::Google::Identity::AccessContextManager::Type::OsType] - # Required. The allowed OS type. - # @!attribute [rw] minimum_version - # @return [::String] - # The minimum allowed OS version. If not set, any version of this OS - # satisfies the constraint. Format: `"major.minor.patch"`. - # Examples: `"10.5.301"`, `"9.2.1"`. - # @!attribute [rw] require_verified_chrome_os - # @return [::Boolean] - # Only allows requests from devices with a verified Chrome OS. - # Verifications includes requirements that the device is enterprise-managed, - # conformant to domain policies, and the caller has permission to call - # the API targeted by the request. - class OsConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb deleted file mode 100644 index b034d49fe22d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `AccessPolicy` is a container for `AccessLevels` (which define the necessary - # attributes to use Google Cloud services) and `ServicePerimeters` (which - # define regions of services able to freely pass data within a perimeter). An - # access policy is globally visible within an organization, and the - # restrictions it specifies apply to all projects within an organization. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the `AccessPolicy`. Format: - # `accessPolicies/{access_policy}` - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this `AccessPolicy` in the Cloud Resource - # Hierarchy. Currently immutable once created. Format: - # `organizations/{organization_id}` - # @!attribute [rw] title - # @return [::String] - # Required. Human readable title. Does not affect behavior. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of a policy define which resources an ACM policy can restrict, - # and where ACM resources can be referenced. - # For example, a policy with scopes=["folders/123"] has the following - # behavior: - # - vpcsc perimeters can only restrict projects within folders/123 - # - access levels can only be referenced by resources within folders/123. - # If empty, there are no limitations on which resources can be restricted by - # an ACM policy, and there are no limitations on where ACM resources can be - # referenced. - # Only one policy can include a given scope (attempting to create a second - # policy which includes "folders/123" will result in an error). - # Currently, scopes cannot be modified after a policy is created. - # Currently, policies can only have a single scope. - # Format: list of `folders/{folder_number}` or `projects/{project_number}` - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `AccessPolicy` was updated in UTC. - # @!attribute [rw] etag - # @return [::String] - # Output only. An opaque identifier for the current version of the - # `AccessPolicy`. This will always be a strongly validated etag, meaning that - # two Access Polices will be identical if and only if their etags are - # identical. Clients should not expect this to be in any specific format. - class AccessPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.rb deleted file mode 100644 index bbd9b110d43b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/gcp_user_access_binding.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! - - -module Google - module Identity - module AccessContextManager - module V1 - # Restricts access to Cloud Console and Google Cloud APIs for a set of users - # using Context-Aware Access. - # @!attribute [rw] name - # @return [::String] - # Immutable. Assigned by the server during creation. The last segment has an arbitrary - # length and has only URI unreserved characters (as defined by - # [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). - # Should not be specified by the client during creation. - # Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" - # @!attribute [rw] group_key - # @return [::String] - # Required. Immutable. Google Group id whose members are subject to this binding's restrictions. - # See "id" in the [G Suite Directory API's Groups resource] - # (https://developers.google.com/admin-sdk/directory/v1/reference/groups#resource). - # If a group's email address/alias is changed, this resource will continue - # to point at the changed group. This field does not accept group email - # addresses or aliases. - # Example: "01d520gv4vjcrht" - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # Required. Access level that a user must have to be granted access. Only one access - # level is supported, not multiple. This repeated field must have exactly - # one element. - # Example: "accessPolicies/9522/accessLevels/device_trusted" - class GcpUserAccessBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb deleted file mode 100644 index be4e39e46ef2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +++ /dev/null @@ -1,500 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Identity - module AccessContextManager - module V1 - # `ServicePerimeter` describes a set of Google Cloud resources which can freely - # import and export data amongst themselves, but not export outside of the - # `ServicePerimeter`. If a request with a source within this `ServicePerimeter` - # has a target outside of the `ServicePerimeter`, the request will be blocked. - # Otherwise the request is allowed. There are two types of Service Perimeter - - # Regular and Bridge. Regular Service Perimeters cannot overlap, a single - # Google Cloud project can only belong to a single regular Service Perimeter. - # Service Perimeter Bridges can contain only Google Cloud projects as members, - # a single Google Cloud project may belong to multiple Service Perimeter - # Bridges. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the ServicePerimeter. The `short_name` - # component must begin with a letter and only include alphanumeric and '_'. - # Format: - # `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}` - # @!attribute [rw] title - # @return [::String] - # Human readable title. Must be unique within the Policy. - # @!attribute [rw] description - # @return [::String] - # Description of the `ServicePerimeter` and its use. Does not affect - # behavior. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was created in UTC. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the `ServicePerimeter` was updated in UTC. - # @!attribute [rw] perimeter_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter::PerimeterType] - # Perimeter type indicator. A single project is - # allowed to be a member of single regular perimeter, but multiple service - # perimeter bridges. A project cannot be a included in a perimeter bridge - # without being included in regular perimeter. For perimeter bridges, - # the restricted service list as well as access level lists must be - # empty. - # @!attribute [rw] status - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Current ServicePerimeter configuration. Specifies sets of resources, - # restricted services and access levels that determine perimeter - # content and boundaries. - # @!attribute [rw] spec - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig] - # Proposed (or dry run) ServicePerimeter configuration. This configuration - # allows to specify and test ServicePerimeter configuration without enforcing - # actual access restrictions. Only allowed to be set when the - # "use_explicit_dry_run_spec" flag is set. - # @!attribute [rw] use_explicit_dry_run_spec - # @return [::Boolean] - # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly - # exists for all Service Perimeters, and that spec is identical to the - # status for those Service Perimeters. When this flag is set, it inhibits the - # generation of the implicit spec, thereby allowing the user to explicitly - # provide a configuration ("spec") to use in a dry-run version of the Service - # Perimeter. This allows the user to test changes to the enforced config - # ("status") without actually enforcing them. This testing is done through - # analyzing the differences between currently enforced and suggested - # restrictions. use_explicit_dry_run_spec must bet set to True if any of the - # fields in the spec are set to non-default values. - class ServicePerimeter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the type of the Perimeter. There are two types: regular and - # bridge. Regular Service Perimeter contains resources, access levels, and - # restricted services. Every resource can be in at most ONE - # regular Service Perimeter. - # - # In addition to being in a regular service perimeter, a resource can also - # be in zero or more perimeter bridges. A perimeter bridge only contains - # resources. Cross project operations are permitted if all effected - # resources share some perimeter (whether bridge or regular). Perimeter - # Bridge does not contain access levels or services: those are governed - # entirely by the regular perimeter that resource is in. - # - # Perimeter Bridges are typically useful when building more complex toplogies - # with many independent perimeters that need to share some data with a common - # perimeter, but should not be able to share data among themselves. - module PerimeterType - # Regular Perimeter. - PERIMETER_TYPE_REGULAR = 0 - - # Perimeter Bridge. - PERIMETER_TYPE_BRIDGE = 1 - end - end - - # `ServicePerimeterConfig` specifies a set of Google Cloud resources that - # describe specific Service Perimeter configuration. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of Google Cloud resources that are inside of the service perimeter. - # Currently only projects are allowed. Format: `projects/{project_number}` - # @!attribute [rw] access_levels - # @return [::Array<::String>] - # A list of `AccessLevel` resource names that allow resources within the - # `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed - # must be in the same policy as this `ServicePerimeter`. Referencing a - # nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. - # For Service Perimeter Bridge, must be empty. - # @!attribute [rw] restricted_services - # @return [::Array<::String>] - # Google Cloud services that are subject to the Service Perimeter - # restrictions. For example, if `storage.googleapis.com` is specified, access - # to the storage buckets inside the perimeter must meet the perimeter's - # access restrictions. - # @!attribute [rw] vpc_accessible_services - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::VpcAccessibleServices] - # Configuration for APIs allowed within Perimeter. - # @!attribute [rw] ingress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressPolicy>] - # List of [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply to the perimeter. A perimeter may have multiple [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy], - # each of which is evaluated separately. Access is granted if any [Ingress - # Policy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # grants it. Must be empty for a perimeter bridge. - # @!attribute [rw] egress_policies - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressPolicy>] - # List of [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply to the perimeter. A perimeter may have multiple [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy], - # each of which is evaluated separately. Access is granted if any - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # grants it. Must be empty for a perimeter bridge. - class ServicePerimeterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how APIs are allowed to communicate within the Service - # Perimeter. - # @!attribute [rw] enable_restriction - # @return [::Boolean] - # Whether to restrict API calls within the Service Perimeter to the list of - # APIs specified in 'allowed_services'. - # @!attribute [rw] allowed_services - # @return [::Array<::String>] - # The list of APIs usable within the Service Perimeter. Must be empty - # unless 'enable_restriction' is True. You can specify a list of individual - # services, as well as include the 'RESTRICTED-SERVICES' value, which - # automatically includes all of the services protected by the perimeter. - class VpcAccessibleServices - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An allowed method or permission of a service specified in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # @!attribute [rw] method - # @return [::String] - # Value for `method` should be a valid method name for the corresponding - # `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # If `*` used as value for `method`, then ALL methods and permissions are - # allowed. - # - # Note: The following fields are mutually exclusive: `method`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permission - # @return [::String] - # Value for `permission` should be a valid Cloud IAM permission for the - # corresponding `service_name` in [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]. - # - # Note: The following fields are mutually exclusive: `permission`, `method`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MethodSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identification for an API Operation. - # @!attribute [rw] service_name - # @return [::String] - # The name of the API whose methods or permissions the [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # or [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # want to allow. A single [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # with `service_name` field set to `*` will allow all methods AND - # permissions for all services. - # @!attribute [rw] method_selectors - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::MethodSelector>] - # API methods or permissions to allow. Method or permission must belong to - # the service specified by `service_name` field. A single [MethodSelector] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.MethodSelector] - # entry with `*` specified for the `method` field will allow all methods - # AND permissions for the service specified in `service_name`. - class ApiOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The source that [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] access_level - # @return [::String] - # An [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] resource - # name that allow resources within the [ServicePerimeters] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to be - # accessed from the internet. [AccessLevels] - # [google.identity.accesscontextmanager.v1.AccessLevel] listed must - # be in the same policy as this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # Referencing a nonexistent [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] will cause - # an error. If no [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] names are - # listed, resources within the perimeter can only be accessed via Google - # Cloud calls with request origins within the perimeter. Example: - # `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is - # specified for `access_level`, then all [IngressSources] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressSource] - # will be allowed. - # - # Note: The following fields are mutually exclusive: `access_level`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # A Google Cloud resource that is allowed to ingress the perimeter. - # Requests from these resources will be allowed to access perimeter data. - # Currently only projects are allowed. - # Format: `projects/{project_number}` - # The project may be in any Google Cloud organization, not just the - # organization that the perimeter is defined in. `*` is not allowed, the - # case of allowing all Google Cloud resources only is not supported. - # - # Note: The following fields are mutually exclusive: `resource`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class IngressSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the source of - # the request. The request must satisfy what is defined in `sources` AND - # identity related fields in order to match. - # @!attribute [rw] sources - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressSource>] - # Sources that this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # authorizes access from. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this ingress - # policy. Should be in the format of email address. The email address - # should represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access from outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class IngressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the target resource of the request. The request - # must satisfy what is defined in `operations` AND `resources` in order to - # match. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # in this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, protected by this [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] that are - # allowed to be accessed by sources defined in the corresponding - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]. - # If a single `*` is specified, then access to all resources inside the - # perimeter are allowed. - class IngressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for ingress into [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter]. - # - # [IngressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # match requests based on `ingress_from` and `ingress_to` stanzas. For an - # ingress policy to match, both the `ingress_from` and `ingress_to` stanzas - # must be matched. If an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # matches a request, the request is allowed through the perimeter boundary - # from outside the perimeter. - # - # For example, access from the internet can be allowed either - # based on an [AccessLevel] - # [google.identity.accesscontextmanager.v1.AccessLevel] or, for traffic - # hosted on Google Cloud, the project of the source network. For access from - # private networks, using the project of the hosting network is required. - # - # Individual ingress policies can be limited by restricting which - # services and/or actions they match using the `ingress_to` field. - # @!attribute [rw] ingress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressFrom] - # Defines the conditions on the source of a request causing this - # [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - # @!attribute [rw] ingress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IngressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and request destination that cause this [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # to apply. - class IngressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions based on information about the source of the - # request. Note that if the destination of the request is also protected by a - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. - # @!attribute [rw] identities - # @return [::Array<::String>] - # A list of identities that are allowed access through this [EgressPolicy]. - # Should be in the format of email address. The email address should - # represent individual user or service account only. - # @!attribute [rw] identity_type - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::IdentityType] - # Specifies the type of identities that are allowed access to outside the - # perimeter. If left unspecified, then members of `identities` field will - # be allowed access. - class EgressFrom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the conditions under which an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request. Conditions are based on information about the - # [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # intended to be performed on the `resources` specified. Note that if the - # destination of the request is also protected by a [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter], then that - # [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] must have - # an [IngressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy] - # which allows access in order for this request to succeed. The request must - # match `operations` AND `resources` fields in order to be allowed egress out - # of the perimeter. - # @!attribute [rw] resources - # @return [::Array<::String>] - # A list of resources, currently only projects in the form - # `projects/`, that are allowed to be accessed by sources - # defined in the corresponding [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it contains a resource in this list. If `*` is - # specified for `resources`, then this [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo] - # rule will authorize access to all resources outside the perimeter. - # @!attribute [rw] operations - # @return [::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::ApiOperation>] - # A list of [ApiOperations] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # allowed to be performed by the sources specified in the corresponding - # [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom]. - # A request matches if it uses an operation/service in this list. - # @!attribute [rw] external_resources - # @return [::Array<::String>] - # A list of external resources that are allowed to be accessed. Only AWS - # and Azure resources are supported. For Amazon S3, the supported format is - # s3://BUCKET_NAME. For Azure Storage, the supported format is - # azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches - # if it contains an external resource in this list (Example: - # s3://bucket/path). Currently '*' is not allowed. - class EgressTo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy for egress from perimeter. - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # match requests based on `egress_from` and `egress_to` stanzas. For an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to match, both `egress_from` and `egress_to` stanzas must be matched. If an - # [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # matches a request, the request is allowed to span the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] boundary. - # For example, an [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # can be used to allow VMs on networks within the [ServicePerimeter] - # [google.identity.accesscontextmanager.v1.ServicePerimeter] to access a - # defined set of projects outside the perimeter in certain contexts (e.g. to - # read data from a Cloud Storage bucket or query against a BigQuery dataset). - # - # [EgressPolicies] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # are concerned with the *resources* that a request relates as well as the - # API services and API actions being used. They do not related to the - # direction of data movement. More detailed documentation for this concept - # can be found in the descriptions of [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # and [EgressTo] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressTo]. - # @!attribute [rw] egress_from - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressFrom] - # Defines conditions on the source of a request causing this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - # @!attribute [rw] egress_to - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeterConfig::EgressTo] - # Defines the conditions on the [ApiOperation] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation] - # and destination resources that cause this [EgressPolicy] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy] - # to apply. - class EgressPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the types of identities that are allowed access in either - # [IngressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom] - # or [EgressFrom] - # [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressFrom] - # rules. - module IdentityType - # No blanket identity group specified. - IDENTITY_TYPE_UNSPECIFIED = 0 - - # Authorize access from all identities outside the perimeter. - ANY_IDENTITY = 1 - - # Authorize access from all human users outside the perimeter. - ANY_USER_ACCOUNT = 2 - - # Authorize access from all service accounts outside the perimeter. - ANY_SERVICE_ACCOUNT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile deleted file mode 100644 index 7c4756c28a3a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-identity-access_context_manager-v1", path: "../" -else - gem "google-identity-access_context_manager-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb deleted file mode 100644 index 8df7e306a7f2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/commit_service_perimeters.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the commit_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters. -# -def commit_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new - - # Call the commit_service_perimeters method. - result = client.commit_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb deleted file mode 100644 index 7ad25cd17d4d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level. -# -def create_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new - - # Call the create_access_level method. - result = client.create_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb deleted file mode 100644 index a9f9d7289673..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy. -# -def create_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::AccessPolicy.new - - # Call the create_access_policy method. - result = client.create_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb deleted file mode 100644 index f1020626f742..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding. -# -def create_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new - - # Call the create_gcp_user_access_binding method. - result = client.create_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb deleted file mode 100644 index 412e217d7849..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/create_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the create_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter. -# -def create_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new - - # Call the create_service_perimeter method. - result = client.create_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb deleted file mode 100644 index 00c5232fc6d1..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level. -# -def delete_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new - - # Call the delete_access_level method. - result = client.delete_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb deleted file mode 100644 index eee4a031ae6e..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy. -# -def delete_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new - - # Call the delete_access_policy method. - result = client.delete_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb deleted file mode 100644 index dd965cf499c5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding. -# -def delete_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new - - # Call the delete_gcp_user_access_binding method. - result = client.delete_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb deleted file mode 100644 index 983eda52bacc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/delete_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the delete_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter. -# -def delete_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new - - # Call the delete_service_perimeter method. - result = client.delete_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb deleted file mode 100644 index 0597699fa439..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_level.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level. -# -def get_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new - - # Call the get_access_level method. - result = client.get_access_level request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb deleted file mode 100644 index 0531cf3580ad..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_access_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy. -# -def get_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new - - # Call the get_access_policy method. - result = client.get_access_policy request - - # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb deleted file mode 100644 index d732c416d5c8..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_gcp_user_access_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding. -# -def get_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new - - # Call the get_gcp_user_access_binding method. - result = client.get_gcp_user_access_binding request - - # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb deleted file mode 100644 index b134f682cf0c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb deleted file mode 100644 index fd5e1db7b14d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/get_service_perimeter.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the get_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter. -# -def get_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new - - # Call the get_service_perimeter method. - result = client.get_service_perimeter request - - # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb deleted file mode 100644 index a5bf8a3cae59..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_levels.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels. -# -def list_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new - - # Call the list_access_levels method. - result = client.list_access_levels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb deleted file mode 100644 index 8244d0f6948b..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_access_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_access_policies call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies. -# -def list_access_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new - - # Call the list_access_policies method. - result = client.list_access_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb deleted file mode 100644 index 933198ef288d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_gcp_user_access_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings. -# -def list_gcp_user_access_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new - - # Call the list_gcp_user_access_bindings method. - result = client.list_gcp_user_access_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb deleted file mode 100644 index 7e6aab1e29ef..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/list_service_perimeters.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the list_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters. -# -def list_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new - - # Call the list_service_perimeters method. - result = client.list_service_perimeters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. - p item - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb deleted file mode 100644 index 8c5a3d228fae..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_access_levels.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_access_levels call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels. -# -def replace_access_levels - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new - - # Call the replace_access_levels method. - result = client.replace_access_levels request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb deleted file mode 100644 index 0bb1d425f50d..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/replace_service_perimeters.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the replace_service_perimeters call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters. -# -def replace_service_perimeters - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new - - # Call the replace_service_perimeters method. - result = client.replace_service_perimeters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb deleted file mode 100644 index 47743b7f9b84..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the set_iam_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb deleted file mode 100644 index 780f1b93ba1a..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the test_iam_permissions call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb deleted file mode 100644 index 0c0f947da7b7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_level.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_level call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level. -# -def update_access_level - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new - - # Call the update_access_level method. - result = client.update_access_level request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb deleted file mode 100644 index a29a2622b29f..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_access_policy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_access_policy call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy. -# -def update_access_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new - - # Call the update_access_policy method. - result = client.update_access_policy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb deleted file mode 100644 index 48d03cc216bc..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_gcp_user_access_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_gcp_user_access_binding call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding. -# -def update_gcp_user_access_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new - - # Call the update_gcp_user_access_binding method. - result = client.update_gcp_user_access_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb deleted file mode 100644 index a751242211b5..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/access_context_manager/update_service_perimeter.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] -require "google/identity/access_context_manager/v1" - -## -# Snippet for the update_service_perimeter call in the AccessContextManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter. -# -def update_service_perimeter - # Create a client object. The client can be reused for multiple calls. - client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new - - # Call the update_service_perimeter method. - result = client.update_service_perimeter request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync] diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json b/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json deleted file mode 100644 index f5838dcb8ff7..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/snippets/snippet_metadata_google.identity.accesscontextmanager.v1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-identity-access_context_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.identity.accesscontextmanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessPolicies_sync", - "title": "Snippet for the list_access_policies call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies.", - "file": "access_context_manager/list_access_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_policies", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessPolicies", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessPolicies", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessPolicy_sync", - "title": "Snippet for the get_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy.", - "file": "access_context_manager/get_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessPolicy_sync", - "title": "Snippet for the create_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy.", - "file": "access_context_manager/create_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::AccessPolicy", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessPolicy_sync", - "title": "Snippet for the update_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy.", - "file": "access_context_manager/update_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessPolicy_sync", - "title": "Snippet for the delete_access_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy.", - "file": "access_context_manager/delete_access_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListAccessLevels_sync", - "title": "Snippet for the list_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels.", - "file": "access_context_manager/list_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetAccessLevel_sync", - "title": "Snippet for the get_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level.", - "file": "access_context_manager/get_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::AccessLevel", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateAccessLevel_sync", - "title": "Snippet for the create_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level.", - "file": "access_context_manager/create_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateAccessLevel_sync", - "title": "Snippet for the update_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level.", - "file": "access_context_manager/update_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteAccessLevel_sync", - "title": "Snippet for the delete_access_level call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level.", - "file": "access_context_manager/delete_access_level.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_access_level", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_access_level", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteAccessLevel", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteAccessLevel", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceAccessLevels_sync", - "title": "Snippet for the replace_access_levels call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels.", - "file": "access_context_manager/replace_access_levels.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_access_levels", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_access_levels", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceAccessLevels", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceAccessLevels", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListServicePerimeters_sync", - "title": "Snippet for the list_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters.", - "file": "access_context_manager/list_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetServicePerimeter_sync", - "title": "Snippet for the get_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter.", - "file": "access_context_manager/get_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ServicePerimeter", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateServicePerimeter_sync", - "title": "Snippet for the create_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter.", - "file": "access_context_manager/create_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateServicePerimeter_sync", - "title": "Snippet for the update_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter.", - "file": "access_context_manager/update_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteServicePerimeter_sync", - "title": "Snippet for the delete_service_perimeter call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter.", - "file": "access_context_manager/delete_service_perimeter.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_perimeter", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_service_perimeter", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteServicePerimeter", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteServicePerimeter", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ReplaceServicePerimeters_sync", - "title": "Snippet for the replace_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters.", - "file": "access_context_manager/replace_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#replace_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ReplaceServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ReplaceServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CommitServicePerimeters_sync", - "title": "Snippet for the commit_service_perimeters call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters.", - "file": "access_context_manager/commit_service_perimeters.rb", - "language": "RUBY", - "client_method": { - "short_name": "commit_service_perimeters", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#commit_service_perimeters", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CommitServicePerimeters", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CommitServicePerimeters", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_ListGcpUserAccessBindings_sync", - "title": "Snippet for the list_gcp_user_access_bindings call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings.", - "file": "access_context_manager/list_gcp_user_access_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gcp_user_access_bindings", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#list_gcp_user_access_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "ListGcpUserAccessBindings", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetGcpUserAccessBinding_sync", - "title": "Snippet for the get_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding.", - "file": "access_context_manager/get_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_CreateGcpUserAccessBinding_sync", - "title": "Snippet for the create_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding.", - "file": "access_context_manager/create_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#create_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "CreateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_UpdateGcpUserAccessBinding_sync", - "title": "Snippet for the update_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding.", - "file": "access_context_manager/update_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#update_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "UpdateGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_DeleteGcpUserAccessBinding_sync", - "title": "Snippet for the delete_gcp_user_access_binding call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding.", - "file": "access_context_manager/delete_gcp_user_access_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_gcp_user_access_binding", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#delete_gcp_user_access_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "DeleteGcpUserAccessBinding", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy.", - "file": "access_context_manager/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.SetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy.", - "file": "access_context_manager/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.GetIamPolicy", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AccessContextManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions.", - "file": "access_context_manager/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AccessContextManager::Client", - "full_name": "::Google::Identity::AccessContextManager::V1::AccessContextManager::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager.TestIamPermissions", - "service": { - "short_name": "AccessContextManager", - "full_name": "google.identity.accesscontextmanager.v1.AccessContextManager" - } - } - }, - "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-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb deleted file mode 100644 index 07584e8a3272..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/accesscontextmanager/v1/access_context_manager_services_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb deleted file mode 100644 index d60902c54e76..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_level_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_level_path access_policy: "value0", access_level: "value1" - assert_equal "accessPolicies/value0/accessLevels/value1", path - end - end - - def test_access_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.access_policy_path access_policy: "value0" - assert_equal "accessPolicies/value0", path - end - end - - def test_gcp_user_access_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gcp_user_access_binding_path organization: "value0", gcp_user_access_binding: "value1" - assert_equal "organizations/value0/gcpUserAccessBindings/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_service_perimeter_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_perimeter_path access_policy: "value0", service_perimeter: "value1" - assert_equal "accessPolicies/value0/servicePerimeters/value1", path - end - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb deleted file mode 100644 index f15c7327d6fe..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_rest_test.rb +++ /dev/null @@ -1,1535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager/rest" - - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - http_response = OpenStruct.new 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_access_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_policies_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_count - end - end - end - - def test_get_access_policy - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_count - end - end - end - - def test_create_access_policy - # Create test objects. - 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" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_policy_client_stub.call_count - end - end - end - - def test_update_access_policy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_policy({ policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_policy policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_policy({ policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_policy_client_stub.call_count - end - end - end - - def test_delete_access_policy - # Create test objects. - 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_access_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_policy_client_stub.call_count - end - end - end - - def test_list_access_levels - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_count - end - end - end - - def test_get_access_level - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_access_level({ name: name, access_level_format: access_level_format }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_access_level name: name, access_level_format: access_level_format do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_access_level({ name: name, access_level_format: access_level_format }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_count - end - end - end - - def test_create_access_level - # Create test objects. - 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" - access_level = {} - - create_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_access_level({ parent: parent, access_level: access_level }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_access_level parent: parent, access_level: access_level do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_access_level({ parent: parent, access_level: access_level }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_access_level_client_stub.call_count - end - end - end - - def test_update_access_level - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_access_level access_level: access_level, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_access_level({ access_level: access_level, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_access_level_client_stub.call_count - end - end - end - - def test_delete_access_level - # Create test objects. - 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_access_level_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_access_level_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_access_level({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_access_level name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_access_level({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_access_level_client_stub.call_count - end - end - end - - def test_replace_access_levels - # Create test objects. - 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" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_access_levels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_access_levels_client_stub.call_count - end - end - end - - def test_list_service_perimeters - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - http_response = OpenStruct.new 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_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_count - end - end - end - - def test_get_service_perimeter - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_count - end - end - end - - def test_create_service_perimeter - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_perimeter_client_stub.call_count - end - end - end - - def test_update_service_perimeter - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_perimeter_client_stub.call_count - end - end - end - - def test_delete_service_perimeter - # Create test objects. - 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_service_perimeter_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_service_perimeter_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_perimeter({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_perimeter name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_perimeter({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_perimeter_client_stub.call_count - end - end - end - - def test_replace_service_perimeters - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_replace_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_service_perimeters_client_stub.call_count - end - end - end - - def test_commit_service_perimeters - # Create test objects. - 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" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_commit_service_perimeters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, commit_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.commit_service_perimeters({ parent: parent, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.commit_service_perimeters parent: parent, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.commit_service_perimeters({ parent: parent, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, commit_service_perimeters_client_stub.call_count - end - end - end - - def test_list_gcp_user_access_bindings - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - http_response = OpenStruct.new 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_gcp_user_access_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_list_gcp_user_access_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gcp_user_access_bindings_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_count - end - end - end - - def test_get_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_create_gcp_user_access_binding - # Create test objects. - 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" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_create_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_update_gcp_user_access_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_update_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_delete_gcp_user_access_binding - # Create test objects. - 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_gcp_user_access_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_delete_gcp_user_access_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_gcp_user_access_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_gcp_user_access_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_gcp_user_access_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_gcp_user_access_binding_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb deleted file mode 100644 index ef2427c12a7c..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/google/identity/access_context_manager/v1/access_context_manager_test.rb +++ /dev/null @@ -1,1785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/identity/accesscontextmanager/v1/access_context_manager_pb" -require "google/identity/access_context_manager/v1/access_context_manager" - -class ::Google::Identity::AccessContextManager::V1::AccessContextManager::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_access_policies - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_access_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_policies, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, 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_access_policies_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_policies ::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_policies(::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.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_access_policies_client_stub.call_rpc_count - end - end - - def test_get_access_policy - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_policy ::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_policy(::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_policy_client_stub.call_rpc_count - end - end - - def test_create_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - title = "hello world" - scopes = ["hello world"] - create_time = {} - update_time = {} - etag = "hello world" - - create_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessPolicy, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["title"] - assert_equal ["hello world"], request["scopes"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["create_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["update_time"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_policy name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_policy ::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_policy({ name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_policy(::Google::Identity::AccessContextManager::V1::AccessPolicy.new(name: name, parent: parent, title: title, scopes: scopes, create_time: create_time, update_time: update_time, 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, create_access_policy_client_stub.call_rpc_count - end - end - - def test_update_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - update_mask = {} - - update_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessPolicy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_policy({ policy: policy, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_policy policy: policy, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_policy ::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_policy({ policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_policy(::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new(policy: policy, 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_access_policy_client_stub.call_rpc_count - end - end - - def test_delete_access_policy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_policy, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_policy({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_policy name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_policy ::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_policy({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_policy(::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.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_access_policy_client_stub.call_rpc_count - end - end - - def test_list_access_levels - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListAccessLevelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - list_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_access_levels parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_access_levels ::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_access_levels({ parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_access_levels(::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_access_levels_client_stub.call_rpc_count - end - end - - def test_get_access_level - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::AccessLevel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_level_format = :LEVEL_FORMAT_UNSPECIFIED - - get_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, request - assert_equal "hello world", request["name"] - assert_equal :LEVEL_FORMAT_UNSPECIFIED, request["access_level_format"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_access_level({ name: name, access_level_format: access_level_format }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_access_level name: name, access_level_format: access_level_format do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_access_level ::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_access_level({ name: name, access_level_format: access_level_format }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_access_level(::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new(name: name, access_level_format: access_level_format), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_access_level_client_stub.call_rpc_count - end - end - - def test_create_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_level = {} - - create_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_access_level({ parent: parent, access_level: access_level }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_access_level parent: parent, access_level: access_level do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_access_level ::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_access_level({ parent: parent, access_level: access_level }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_access_level(::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new(parent: parent, access_level: access_level), grpc_options) do |response, operation| - assert_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_access_level_client_stub.call_rpc_count - end - end - - def test_update_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - access_level = {} - update_mask = {} - - update_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::AccessLevel), request["access_level"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_access_level({ access_level: access_level, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_access_level access_level: access_level, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_access_level ::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_access_level({ access_level: access_level, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_access_level(::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new(access_level: access_level, 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_access_level_client_stub.call_rpc_count - end - end - - def test_delete_access_level - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_access_level_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_access_level, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_access_level_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_access_level({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_access_level name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_access_level ::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_access_level({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_access_level(::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.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_access_level_client_stub.call_rpc_count - end - end - - def test_replace_access_levels - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - access_levels = [{}] - etag = "hello world" - - replace_access_levels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_access_levels, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessLevel, request["access_levels"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_access_levels_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.replace_access_levels parent: parent, access_levels: access_levels, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.replace_access_levels ::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.replace_access_levels({ parent: parent, access_levels: access_levels, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.replace_access_levels(::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new(parent: parent, access_levels: access_levels, 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, replace_access_levels_client_stub.call_rpc_count - end - end - - def test_list_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListServicePerimetersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, 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_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_perimeters parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_perimeters ::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_perimeters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_perimeters(::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.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_service_perimeters_client_stub.call_rpc_count - end - end - - def test_get_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ServicePerimeter.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_perimeter({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_perimeter name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_perimeter ::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_perimeter(::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_perimeter_client_stub.call_rpc_count - end - end - - def test_create_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeter = {} - - create_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service_perimeter parent: parent, service_perimeter: service_perimeter do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service_perimeter ::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service_perimeter({ parent: parent, service_perimeter: service_perimeter }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service_perimeter(::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new(parent: parent, service_perimeter: service_perimeter), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_perimeter_client_stub.call_rpc_count - end - end - - def test_update_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_perimeter = {} - update_mask = {} - - update_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::ServicePerimeter), request["service_perimeter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_service_perimeter service_perimeter: service_perimeter, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_service_perimeter ::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_service_perimeter({ service_perimeter: service_perimeter, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_service_perimeter(::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new(service_perimeter: service_perimeter, 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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_delete_service_perimeter - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_perimeter_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_perimeter, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_perimeter_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_perimeter({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_service_perimeter name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_service_perimeter ::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_service_perimeter({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_service_perimeter(::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.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_service_perimeter_client_stub.call_rpc_count - end - end - - def test_replace_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_perimeters = [{}] - etag = "hello world" - - replace_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Identity::AccessContextManager::V1::ServicePerimeter, request["service_perimeters"].first - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.replace_service_perimeters parent: parent, service_perimeters: service_perimeters, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.replace_service_perimeters ::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.replace_service_perimeters({ parent: parent, service_perimeters: service_perimeters, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.replace_service_perimeters(::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new(parent: parent, service_perimeters: service_perimeters, 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, replace_service_perimeters_client_stub.call_rpc_count - end - end - - def test_commit_service_perimeters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - etag = "hello world" - - commit_service_perimeters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :commit_service_perimeters, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, commit_service_perimeters_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.commit_service_perimeters({ parent: parent, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.commit_service_perimeters parent: parent, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.commit_service_perimeters ::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.commit_service_perimeters({ parent: parent, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.commit_service_perimeters(::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new(parent: parent, 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, commit_service_perimeters_client_stub.call_rpc_count - end - end - - def test_list_gcp_user_access_bindings - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gcp_user_access_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gcp_user_access_bindings, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, 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_gcp_user_access_bindings_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gcp_user_access_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gcp_user_access_bindings ::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gcp_user_access_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gcp_user_access_bindings(::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.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_gcp_user_access_bindings_client_stub.call_rpc_count - end - end - - def test_get_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gcp_user_access_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gcp_user_access_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_create_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gcp_user_access_binding = {} - - create_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_gcp_user_access_binding parent: parent, gcp_user_access_binding: gcp_user_access_binding do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_gcp_user_access_binding({ parent: parent, gcp_user_access_binding: gcp_user_access_binding }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new(parent: parent, gcp_user_access_binding: gcp_user_access_binding), grpc_options) do |response, operation| - assert_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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_update_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcp_user_access_binding = {} - update_mask = {} - - update_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding), request["gcp_user_access_binding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_gcp_user_access_binding gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_gcp_user_access_binding({ gcp_user_access_binding: gcp_user_access_binding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new(gcp_user_access_binding: gcp_user_access_binding, 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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_delete_gcp_user_access_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_gcp_user_access_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_gcp_user_access_binding, name - assert_kind_of ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_gcp_user_access_binding_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_gcp_user_access_binding({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_gcp_user_access_binding name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_gcp_user_access_binding ::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_gcp_user_access_binding({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_gcp_user_access_binding(::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.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_gcp_user_access_binding_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::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::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb b/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-identity-access_context_manager-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json deleted file mode 100644 index 9720ed4289b0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine-delivery", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1", - "distribution_name": "google-maps-fleet_engine-delivery-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine-delivery", - "name_pretty": "Last Mile Fleet Solution Delivery V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml deleted file mode 100644 index 5134ed6467fb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts deleted file mode 100644 index 443d62823a66..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Last Mile Fleet Solution Delivery 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-maps-fleet_engine-delivery-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md deleted file mode 100644 index 5667ca97e0e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md deleted file mode 100644 index 46fddfd91415..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Last Mile Fleet Solution Delivery V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Last Mile Fleet Solution Delivery V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine-delivery](https://rubygems.org/gems/google-maps-fleet_engine-delivery). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-delivery-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/delivery/v1" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new -request = ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new # (request fields as keyword arguments...) -response = client.create_delivery_vehicle request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/delivery/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-maps-fleet_engine-delivery`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery`. -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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/Rakefile deleted file mode 100644 index cd9e87b75d54..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1/delivery_service/credentials" - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-delivery-v1" - header "google-maps-fleet_engine-delivery-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-delivery-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json deleted file mode 100644 index 4c69a9a6c497..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.delivery.v1", - "libraryPackage": "::Google::Maps::FleetEngine::Delivery::V1", - "services": { - "DeliveryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client", - "rpcs": { - "CreateDeliveryVehicle": { - "methods": [ - "create_delivery_vehicle" - ] - }, - "GetDeliveryVehicle": { - "methods": [ - "get_delivery_vehicle" - ] - }, - "DeleteDeliveryVehicle": { - "methods": [ - "delete_delivery_vehicle" - ] - }, - "UpdateDeliveryVehicle": { - "methods": [ - "update_delivery_vehicle" - ] - }, - "BatchCreateTasks": { - "methods": [ - "batch_create_tasks" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTaskTrackingInfo": { - "methods": [ - "get_task_tracking_info" - ] - }, - "ListDeliveryVehicles": { - "methods": [ - "list_delivery_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec deleted file mode 100644 index 7e1c51590eb3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/google-maps-fleet_engine-delivery-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/delivery/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-delivery-v1" - gem.version = Google::Maps::FleetEngine::Delivery::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-v1.rb deleted file mode 100644 index cd1ad7559d55..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google-maps-fleet_engine-delivery-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/maps/fleet_engine/delivery/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1.rb deleted file mode 100644 index bf548f559e81..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/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/maps/fleet_engine/delivery/v1/delivery_service" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/delivery/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb deleted file mode 100644 index 3f52ddd3345e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/client" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "delivery_service", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb deleted file mode 100644 index 57a447f2b08f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +++ /dev/null @@ -1,1757 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - ## - # Client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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/maps/fleetengine/delivery/v1/delivery_api_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 - - @delivery_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :create_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :delete_delivery_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.delivery_vehicle&.name && - %r{^providers/[^/]+/?$}.match?(request.delivery_vehicle.name) - header_params["provider_id"] = request.delivery_vehicle.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_delivery_vehicle, request, 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 and returns a batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :batch_create_tasks, request, 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 and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :create_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(header: nil, name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :delete_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.task&.name && - %r{^providers/[^/]+/?$}.match?(request.task.name) - header_params["provider_id"] = request.task.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :update_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :get_task_tracking_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.call_rpc :list_delivery_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, request, response, 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 DeliveryService API. - # - # This class represents the configuration for DeliveryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb deleted file mode 100644 index 8665c263a506..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Credentials for the DeliveryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb deleted file mode 100644 index dddaace08010..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - # Path helper methods for the DeliveryService API. - module Paths - ## - # Create a fully-qualified DeliveryVehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/deliveryVehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def delivery_vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/deliveryVehicles/#{vehicle}" - end - - ## - # Create a fully-qualified Provider resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}` - # - # @param provider [String] - # - # @return [::String] - def provider_path provider: - "providers/#{provider}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/tasks/{task}` - # - # @param provider [String] - # @param task [String] - # - # @return [::String] - def task_path provider:, task: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/tasks/#{task}" - end - - ## - # Create a fully-qualified TaskTrackingInfo resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/taskTrackingInfo/{tracking}` - # - # @param provider [String] - # @param tracking [String] - # - # @return [::String] - def task_tracking_info_path provider:, tracking: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/taskTrackingInfo/#{tracking}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb deleted file mode 100644 index c3e0d58b6ef6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_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/maps/fleet_engine/delivery/v1/version" - -require "google/maps/fleet_engine/delivery/v1/delivery_service/credentials" -require "google/maps/fleet_engine/delivery/v1/delivery_service/paths" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/client" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - ## - # The Last Mile Delivery service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module DeliveryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb deleted file mode 100644 index 3d36d73469a4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +++ /dev/null @@ -1,1618 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST client for the DeliveryService service. - # - # The Last Mile Delivery service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :delivery_service_stub - - ## - # Configure the DeliveryService Client class. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeliveryService clients - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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", "Maps", "FleetEngine", "Delivery", "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_delivery_vehicle.timeout = 60.0 - default_config.rpcs.create_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_delivery_vehicle.timeout = 60.0 - default_config.rpcs.get_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_delivery_vehicle.timeout = 60.0 - default_config.rpcs.update_delivery_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_create_tasks.timeout = 60.0 - default_config.rpcs.batch_create_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - default_config.rpcs.create_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_task.timeout = 60.0 - default_config.rpcs.update_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task_tracking_info.timeout = 60.0 - default_config.rpcs.get_task_tracking_info.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_delivery_vehicles.timeout = 60.0 - default_config.rpcs.list_delivery_vehicles.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 DeliveryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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 - @delivery_service_stub.universe_domain - end - - ## - # Create a new DeliveryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeliveryService 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 - - @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @delivery_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 - @delivery_service_stub.logger - end - - # Service calls - - ## - # Creates and returns a new `DeliveryVehicle`. - # - # @overload create_delivery_vehicle(request, options = nil) - # Pass arguments to `create_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil) - # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param delivery_vehicle_id [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - # - # # Call the create_delivery_vehicle method. - # result = client.create_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def create_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest - - # Converts hash and nil to an 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_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.create_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `DeliveryVehicle` instance. - # - # @overload get_delivery_vehicle(request, options = nil) - # Pass arguments to `get_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - # - # # Call the get_delivery_vehicle method. - # result = client.get_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def get_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeliveryVehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks - # assigned to it. - # - # @overload delete_delivery_vehicle(request, options = nil) - # Pass arguments to `delete_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_delivery_vehicle(header: nil, name: nil) - # Pass arguments to `delete_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - # - # # Call the delete_delivery_vehicle method. - # result = client.delete_delivery_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.delete_delivery_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - # but it must contain all of the `VehicleJourneySegment`s to be persisted on - # the `DeliveryVehicle`. The `task_id`s are retrieved from - # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - # assigned to the `DeliveryVehicle` if they have not yet been assigned. - # - # @overload update_delivery_vehicle(request, options = nil) - # Pass arguments to `update_delivery_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil) - # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - # - # # Call the update_delivery_vehicle method. - # result = client.update_delivery_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p result - # - def update_delivery_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_delivery_vehicle request, 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 and returns a batch of new `Task` objects. - # - # @overload batch_create_tasks(request, options = nil) - # Pass arguments to `batch_create_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_tasks(header: nil, parent: nil, requests: nil) - # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param parent [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - # - # # Call the batch_create_tasks method. - # result = client.batch_create_tasks request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - # p result - # - def batch_create_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.batch_create_tasks request, 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 and returns a new `Task` object. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @param task_id [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest - - # Converts hash and nil to an 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_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.create_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a `Task`. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(header: nil, name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Task. - # - # Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a - # DeliveryVehicle. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(header: nil, name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.delete_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `Task` data. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(header: nil, task: nil, update_mask: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - # p result - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.update_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `Task`s that meet the specified filtering criteria. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified `TaskTrackingInfo` instance. - # - # @overload get_task_tracking_info(request, options = nil) - # Pass arguments to `get_task_tracking_info` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task_tracking_info(header: nil, name: nil) - # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - # - # # Call the get_task_tracking_info method. - # result = client.get_task_tracking_info request - # - # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - # p result - # - def get_task_tracking_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task_tracking_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task_tracking_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.get_task_tracking_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all `DeliveryVehicle`s that meet the specified filtering criteria. - # - # @overload list_delivery_vehicles(request, options = nil) - # Pass arguments to `list_delivery_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil) - # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash] - # Optional. The standard Delivery API request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @param page_size [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/delivery/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - # - # # Call the list_delivery_vehicles method. - # result = client.list_delivery_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - # p item - # end - # - def list_delivery_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @delivery_service_stub.list_delivery_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, 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 DeliveryService REST API. - # - # This class represents the configuration for DeliveryService 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::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_delivery_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 DeliveryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_delivery_vehicle - ## - # RPC-specific configuration for `get_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_delivery_vehicle - ## - # RPC-specific configuration for `delete_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_delivery_vehicle - ## - # RPC-specific configuration for `update_delivery_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_delivery_vehicle - ## - # RPC-specific configuration for `batch_create_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_tasks - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task_tracking_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task_tracking_info - ## - # RPC-specific configuration for `list_delivery_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_delivery_vehicles - - # @private - def initialize parent_rpcs = nil - create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle - @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config - get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle - @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config - delete_delivery_vehicle_config = parent_rpcs.delete_delivery_vehicle if parent_rpcs.respond_to? :delete_delivery_vehicle - @delete_delivery_vehicle = ::Gapic::Config::Method.new delete_delivery_vehicle_config - update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle - @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config - batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks - @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info - @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config - list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles - @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb deleted file mode 100644 index b1a86959625c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +++ /dev/null @@ -1,820 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - module DeliveryService - module Rest - ## - # REST service stub for the DeliveryService 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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def create_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def get_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # A result object deserialized from the server's reply - def update_delivery_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_delivery_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse] - # A result object deserialized from the server's reply - def batch_create_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.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_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo] - # A result object deserialized from the server's reply - def get_task_tracking_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task_tracking_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse] - # A result object deserialized from the server's reply - def list_delivery_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_delivery_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.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_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest] - # 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_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deliveryVehicles", - body: "delivery_vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_delivery_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_delivery_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{delivery_vehicle.name}", - body: "delivery_vehicle", - matches: [ - ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks:batchCreate", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest] - # 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_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task_tracking_info REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_tracking_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_delivery_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_delivery_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deliveryVehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb deleted file mode 100644 index 8bc23bd54948..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" -require "google/maps/fleet_engine/delivery/v1/version" - -module Google - module Maps - module FleetEngine - module Delivery - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/delivery/v1/rest" - # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb deleted file mode 100644 index 5376e1dc941f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleet_engine/delivery/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb deleted file mode 100644 index 192798ce9466..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/common.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xa0\x01\n\x18\x44\x65liveryVehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\"\n delivery_vehicle_attribute_value\"\xd0\x0e\n\x17\x44\x65liveryVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x61\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"t\n\nTimeWindow\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"z\n\rTaskAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14task_attribute_value*\xe6\x01\n\x1d\x44\x65liveryVehicleLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01*\x98\x01\n\x1f\x44\x65liveryVehicleNavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04\x42\xfb\x01\n\'com.google.maps.fleetengine.delivery.v1B\x06\x43ommonP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleAttribute").msgclass - DeliveryVehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocation").msgclass - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TimeWindow").msgclass - TaskAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.TaskAttribute").msgclass - DeliveryVehicleLocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor").enummodule - DeliveryVehicleNavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb deleted file mode 100644 index 1d269d5162eb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/delivery_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/header_pb' -require 'google/maps/fleetengine/delivery/v1/task_tracking_info_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/maps/fleetengine/delivery/v1/delivery_api.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto\x1a\x30google/maps/fleetengine/delivery/v1/header.proto\x1a\n\x19remaining_distance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\x12remaining_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12_\n\"remaining_vehicle_journey_segments\x18\x08 \x03(\x0b\x32\x33.maps.fleetengine.delivery.v1.VehicleJourneySegment\x12J\n\nattributes\x18\t \x03(\x0b\x32\x36.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute\x12O\n\x04type\x18\n \x01(\x0e\x32\x41.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType\"t\n\x13\x44\x65liveryVehicleType\x12%\n!DELIVERY_VEHICLE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0f\n\x0bTWO_WHEELER\x10\x02\x12\x0b\n\x07\x42ICYCLE\x10\x03\x12\x0e\n\nPEDESTRIAN\x10\x04:`\xea\x41]\n*fleetengine.googleapis.com/DeliveryVehicle\x12/providers/{provider}/deliveryVehicles/{vehicle}\"2\n\x0cLocationInfo\x12\"\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"\xf5\x01\n\x15VehicleJourneySegment\x12\x37\n\x04stop\x18\x01 \x01(\x0b\x32).maps.fleetengine.delivery.v1.VehicleStop\x12\x41\n\x17\x64riving_distance_meters\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12\x38\n\x10\x64riving_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12&\n\x04path\x18\x05 \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\"\xbe\x03\n\x0bVehicleStop\x12I\n\x10planned_location\x18\x01 \x01(\x0b\x32*.maps.fleetengine.delivery.v1.LocationInfoB\x03\xe0\x41\x02\x12\x41\n\x05tasks\x18\x02 \x03(\x0b\x32\x32.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.maps.fleetengine.delivery.v1.VehicleStop.State\x1a\x9d\x01\n\x08TaskInfo\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x35\n\rtask_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x12target_time_window\x18\x03 \x01(\x0b\x32(.maps.fleetengine.delivery.v1.TimeWindowB\x03\xe0\x41\x03\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x0b\n\x07\x45NROUTE\x10\x02\x12\x0b\n\x07\x41RRIVED\x10\x03\x42\x85\x02\n\'com.google.maps.fleetengine.delivery.v1B\x10\x44\x65liveryVehiclesP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryVehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle").msgclass - DeliveryVehicle::DeliveryVehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType").enummodule - LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.LocationInfo").msgclass - VehicleJourneySegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleJourneySegment").msgclass - VehicleStop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop").msgclass - VehicleStop::TaskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.TaskInfo").msgclass - VehicleStop::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.VehicleStop.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb deleted file mode 100644 index 1e64318e1070..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/header_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n0google/maps/fleetengine/delivery/v1/header.proto\x12\x1cmaps.fleetengine.delivery.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb0\x04\n\x15\x44\x65liveryRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12M\n\x08sdk_type\x18\x06 \x01(\x0e\x32;.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12N\n\x08platform\x18\t \x01(\x0e\x32<.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xfc\x01\n\'com.google.maps.fleetengine.delivery.v1B\x07HeadersP\x01ZIcloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb\xa2\x02\x04\x43\x46\x45\x44\xaa\x02#Google.Maps.FleetEngine.Delivery.V1\xca\x02#Google\\Maps\\FleetEngine\\Delivery\\V1\xea\x02\'Google::Maps::FleetEngine::Delivery::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - DeliveryRequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader").msgclass - DeliveryRequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType").enummodule - DeliveryRequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb deleted file mode 100644 index b483e697d6e9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/delivery/v1/common_pb' -require 'google/maps/fleetengine/delivery/v1/delivery_vehicles_pb' -require 'google/maps/fleetengine/delivery/v1/tasks_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/

` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb deleted file mode 100644 index 1feab364a2dd..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DeliveryVehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of the `flp_location` - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class DeliveryVehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time range. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The start time of the time window (inclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end time of the time window (inclusive). - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a task attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TaskAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The sensor or methodology used to determine the location. - module DeliveryVehicleLocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - - # The vehicle's navigation status. - module DeliveryVehicleNavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb deleted file mode 100644 index 8c9bb733f9ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +++ /dev/null @@ -1,395 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `CreateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The provider must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] delivery_vehicle_id - # @return [::String] - # Required. The Delivery Vehicle ID must be unique and subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity to create. When creating a new - # delivery vehicle, you may set the following optional fields: - # - # * type - # * last_location - # * attributes - # - # Note: The DeliveryVehicle's `name` field is ignored. All other - # DeliveryVehicle fields must not be set; otherwise, an error is returned. - class CreateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteDeliveryVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. - # For example, `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of vehicles to return. The service may return - # fewer than this number. If you don't specify this number, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDeliveryVehicles` - # call. You must provide this in order to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeliveryVehicles` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing delivery vehicles. See - # http://aip.dev/160 for examples of the filter syntax. If you don't specify - # a value, or if you specify an empty string for the filter, then all - # delivery vehicles are returned. - # - # Note that the only queries supported for `ListDeliveryVehicles` are - # on vehicle attributes (for example, `attributes. = ` or - # `attributes. = AND attributes. = `). Also, all - # attributes are stored as strings, so the only supported comparisons against - # attributes are string comparisons. In order to compare against number or - # boolean values, the values must be explicitly quoted to be treated as - # strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # The maximum number of restrictions allowed in a filter query is 50. A - # restriction is a part of the query of the form - # `attribute. `, for example `attributes.foo = bar` - # is 1 restriction. - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListDeliveryVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListDeliveryVehicles` response message. - # @!attribute [rw] delivery_vehicles - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>] - # The set of delivery vehicles that meet the requested filtering criteria. - # When no filter is specified, the request returns all delivery vehicles. A - # successful response can also be empty. An empty response indicates that no - # delivery vehicles were found meeting the requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - # list results. When all of the results are returned, this field won't be in - # the response, or it will be an empty string. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of delivery vehicles that match the request criteria, - # across all pages. - class ListDeliveryVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateDeliveryVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] delivery_vehicle - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle] - # Required. The `DeliveryVehicle` entity update to apply. - # Note: You cannot update the name of the `DeliveryVehicle`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask that indicates which `DeliveryVehicle` fields to - # update. Note that the update_mask must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"remaining_vehicle_journey_segments"`. - class UpdateDeliveryVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # Note: If you set this field, then the header field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource shared by all tasks. This value must be in - # the format `providers/{provider}`. The `provider` must be the Google Cloud - # Project ID. For example, `sample-cloud-project`. The parent field in the - # `CreateTaskRequest` messages must either be empty, or it must match this - # field. - # @!attribute [rw] requests - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest>] - # Required. The request message that specifies the resources to create. - # Note: You can create a maximum of 500 tasks in a batch. - class BatchCreateTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `BatchCreateTask` response message. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The created Tasks. - class BatchCreateTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `CreateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. The `provider` must - # be the Google Cloud Project ID. For example, `sample-cloud-project`. - # @!attribute [rw] task_id - # @return [::String] - # Required. The Task ID must be unique, but it should be not a shipment - # tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - # Note that multiple tasks can have the same `tracking_id`. Task IDs are - # subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task entity to create. - # When creating a Task, the following fields are required: - # - # * `type` - # * `state` (must be set to `OPEN`) - # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - # tasks, but required for all other task types) - # * `planned_location` (optional for `UNAVAILABLE` tasks) - # * `task_duration` - # - # The following fields can be optionally set: - # - # * `target_time_window` - # * `task_tracking_view_config` - # * `attributes` - # - # Note: The Task's `name` field is ignored. All other Task fields must not be - # set; otherwise, an error is returned. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTask request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/tasks/{task}`. The - # `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `UpdateTask` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] task - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task] - # Required. The Task associated with the update. - # The following fields are maintained by Fleet Engine. Do not update - # them using `Task.update`. - # - # * `last_location`. - # * `last_location_snappable`. - # * `name`. - # * `remaining_vehicle_journey_segments`. - # * `task_outcome_location_source`. - # - # Note: You cannot change the value of `task_outcome` once you set it. - # - # If the Task has been assigned to a delivery vehicle, then don't set the - # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - # that contains the Task from the delivery vehicle, which automatically sets - # the Task state to CLOSED. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask that indicates which Task fields to update. - # Note: The `update_mask` must contain at least one field. - # - # This is a comma-separated list of fully qualified names of fields. Example: - # `"task_outcome,task_outcome_time,task_outcome_location"`. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The `provider` must be the Google Cloud Project ID. For example, - # `sample-cloud-project`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Tasks to return. The service may return - # fewer than this value. If you don't specify this value, then the server - # determines the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token received from a previous `ListTasks` call. - # You can provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTasks` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing Tasks. See - # http://aip.dev/160 for examples of filter syntax. If you don't specify a - # value, or if you filter on an empty string, then all Tasks are returned. - # For information about the Task properties that you can filter on, see [List - # tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ListTasks` response that contains the set of Tasks that meet the filter - # criteria in the `ListTasksRequest`. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::Task>] - # The set of Tasks that meet the requested filtering criteria. When no filter - # is specified, the request returns all tasks. A successful response can also - # be empty. An empty response indicates that no Tasks were found meeting the - # requested filter criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the `ListTasksRequest` to continue to list results. - # If all results have been returned, then this field is either an empty - # string, or it doesn't appear in the response. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of Tasks that match the request criteria, across all - # pages. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `GetTaskTrackingInfoRequest` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader] - # Optional. The standard Delivery API request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - # must be the Google Cloud Project ID, and the `tracking_id` must be the - # tracking ID associated with the task. An example name can be - # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - class GetTaskTrackingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb deleted file mode 100644 index 815ff7ffd128..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +++ /dev/null @@ -1,276 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `DeliveryVehicle` message. A delivery vehicle transports shipments from a - # depot to a delivery location, and from a pickup location to the depot. In - # some cases, delivery vehicles also transport shipments directly from the - # pickup location to the delivery location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `DeliveryVehicle.current_route_segment` field in the gRPC API and the - # `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # The unique name of this Delivery Vehicle. - # The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The last reported location of the Delivery Vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation>] - # Input only. Locations where this Delivery Vehicle has been in the past that - # haven't yet been reported to Fleet Engine. This is used in - # `UpdateDeliveryVehicleRequest` to record locations which were previously - # unable to be sent to the server. Typically this happens when the Delivery - # Vehicle does not have internet connectivity. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleNavigationStatus] - # The Delivery Vehicle's navigation status. - # @!attribute [rw] current_route_segment - # @return [::String] - # The encoded polyline specifying the route that the navigation recommends - # taking to the next waypoint. Your driver app updates this when a - # stop is reached or passed, and when the navigation reroutes. These - # `LatLng`s are returned in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST) for all active Tasks assigned to the Vehicle. - # - # There are a few cases where this field might not be used to populate - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST): - # - # * The endpoint of the `current_route_segment` does not match - # `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - # `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - # - # * The driver app has not updated its location recently, so the last - # updated value for this field might be stale. - # - # * The driver app has recently updated its location, but the - # `current_route_segment` is stale, and points to a previous vehicle stop. - # - # In these cases, Fleet Engine populates this field with a route from the - # most recently passed VehicleStop to the upcoming VehicleStop to ensure that - # the consumer of this field has the best available information on the - # current path of the Delivery Vehicle. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Type::LatLng] - # The location where the `current_route_segment` ends. This is not currently - # populated by the driver app, but you can supply it on - # `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - # vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual `VehicleStop`. - # - # This field is ignored in `UpdateDeliveryVehicle` calls if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - # or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - # for all active `Task`s assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_duration - # @return [::Google::Protobuf::Duration] - # The remaining driving time for the `current_route_segment`. - # The Driver app typically provides this field, but there are some - # circumstances in which Fleet Engine will override the value sent by the - # app. For more information, see - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # This field is returned in - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - # active tasks assigned to the Delivery Vehicle. - # - # Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - # `current_route_segment` field is empty. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # The journey segments assigned to this Delivery Vehicle, starting from the - # Vehicle's most recently reported location. This field won't be populated - # in the response of `ListDeliveryVehicles`. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleAttribute>] - # A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - # at most 100 attributes, and each attribute must have a unique key. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle::DeliveryVehicleType] - # The type of this delivery vehicle. If unset, this will default to `AUTO`. - class DeliveryVehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of delivery vehicle. - module DeliveryVehicleType - # The value is unused. - DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0 - - # An automobile. - AUTO = 1 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 2 - - # Human-powered transport. - BICYCLE = 3 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 4 - end - end - - # A location with any additional identifiers. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # The location's coordinates. - class LocationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Vehicle’s travel segment - from its previous stop to the - # current stop. If it is the first active stop, then it is from the - # Vehicle’s current location to this stop. - # @!attribute [rw] stop - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop] - # Specifies the stop location, along with the `Task`s associated with - # the stop. Some fields of the VehicleStop might not be present if this - # journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The travel distance from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the vehicle's location recorded - # at the time that this stop was added to the list. This field might not be - # present if this journey segment is part of `JourneySharingInfo`. - # @!attribute [r] driving_duration - # @return [::Google::Protobuf::Duration] - # Output only. The travel time from the previous stop to this stop. - # If the current stop is the first stop in the list of journey - # segments, then the starting point is the Vehicle's location recorded - # at the time that this stop was added to the list. - # - # If this field is defined in the path - # `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - # `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - # then it may be populated with the value from - # `DeliveryVehicle.remaining_duration` (gRPC) or - # `DeliveryVehicle.remainingDuration` (REST). - # This provides the remaining driving duration from the driver app's latest - # known location rather than the driving time from the previous stop. - # @!attribute [r] path - # @return [::Array<::Google::Type::LatLng>] - # Output only. The path from the previous stop to this stop. If the current - # stop is the first stop in the list of journey segments, then this is the - # path from the vehicle's current location to this stop at the time that the - # stop was added to the list. This field might not be present if this journey - # segment is part of `JourneySharingInfo`. - # - # If this field is defined in the path - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - # (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - # (REST), then it may be populated with the `LatLng`s decoded from - # `DeliveryVehicle.current_route_segment` (gRPC) or - # `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - # path from the driver app's latest known location rather than the path from - # the previous stop. - class VehicleJourneySegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a point where a Vehicle stops to perform one or more `Task`s. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Required. The location of the stop. Note that the locations in the `Task`s - # might not exactly match this location, but will be within a short distance - # of it. This field won't be populated in the response of a `GetTask` call. - # @!attribute [rw] tasks - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::TaskInfo>] - # The list of `Task`s to be performed at this stop. This field won't be - # populated in the response of a `GetTask` call. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::VehicleStop::State] - # The state of the `VehicleStop`. This field won't be populated in the - # response of a `GetTask` call. - class VehicleStop - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional information about the Task performed at this stop. - # @!attribute [rw] task_id - # @return [::String] - # The Task ID. This field won't be populated in the response of a `GetTask` - # call. Task IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] task_duration - # @return [::Google::Protobuf::Duration] - # Output only. The time required to perform the Task. - # @!attribute [r] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # Output only. The time window during which the task should be completed. - # This is only set in the response to `GetDeliveryVehicle`. - class TaskInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current state of a `VehicleStop`. - module State - # Unknown. - STATE_UNSPECIFIED = 0 - - # Created, but not actively routing. - NEW = 1 - - # Assigned and actively routing. - ENROUTE = 2 - - # Arrived at stop. Assumes that when the Vehicle is routing to the next - # stop, that all previous stops have been completed. - ARRIVED = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.rb deleted file mode 100644 index 8475ff84935a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/header.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 Maps - module FleetEngine - module Delivery - module V1 - # A RequestHeader contains fields common to all Delivery RPC requests. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as en-US or sr-Latn. For more information, - # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class DeliveryRequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb deleted file mode 100644 index 3a110fdb32d7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # The `TaskTrackingInfo` message. The message contains task tracking - # information which will be used for display. If a tracking ID is associated - # with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's - # TaskTrackingInfo to select. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - # where `tracking` represents the tracking ID. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. The tracking ID of a Task. - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # The vehicle's last location. - # @!attribute [rw] route_polyline_points - # @return [::Array<::Google::Type::LatLng>] - # A list of points which when connected forms a polyline of the vehicle's - # expected route to the location of this task. - # @!attribute [rw] remaining_stop_count - # @return [::Google::Protobuf::Int32Value] - # Indicates the number of stops the vehicle remaining until the task stop is - # reached, including the task stop. For example, if the vehicle's next stop - # is the task stop, the value will be 1. - # @!attribute [rw] remaining_driving_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The total remaining distance in meters to the `VehicleStop` of interest. - # @!attribute [rw] estimated_arrival_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated arrival time to the stop - # location. - # @!attribute [rw] estimated_task_completion_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates the estimated completion time of a Task. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of attempting to execute a Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the Task's outcome was set by the - # provider. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # The custom attributes set on the task. - class TaskTrackingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb deleted file mode 100644 index 0bb1c3f6a05b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module Delivery - module V1 - # A Task in the Delivery API represents a single action to track. In general, - # there is a distinction between shipment-related Tasks and break Tasks. A - # shipment can have multiple Tasks associated with it. For example, there could - # be one Task for the pickup, and one for the drop-off or transfer. Also, - # different Tasks for a given shipment can be handled by different vehicles. - # For example, one vehicle could handle the pickup, driving the shipment to the - # hub, while another vehicle drives the same shipment from the hub to the - # drop-off location. - # - # Note: gRPC and REST APIs use different field naming conventions. For example, - # the `Task.journey_sharing_info` field in the gRPC API and the - # `Task.journeySharingInfo` field in the REST API refer to the same - # field. - # @!attribute [rw] name - # @return [::String] - # Must be in the format `providers/{provider}/tasks/{task}`. - # @!attribute [rw] type - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::Type] - # Required. Immutable. Defines the type of the Task. For example, a break or - # shipment. - # @!attribute [rw] state - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::State] - # Required. The current execution state of the Task. - # @!attribute [rw] task_outcome - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome] - # The outcome of the Task. - # @!attribute [rw] task_outcome_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that indicates when the `Task`'s outcome was set by the - # provider. - # @!attribute [rw] task_outcome_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # The location where the `Task`'s outcome was set. This value is updated as - # part of `UpdateTask`. If this value isn't explicitly updated by the - # provider, then Fleet Engine populates it by default with the last known - # vehicle location (the *raw* location). - # @!attribute [rw] task_outcome_location_source - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource] - # Indicates where the value of the `task_outcome_location` came from. - # @!attribute [rw] tracking_id - # @return [::String] - # Immutable. This field facilitates the storing of an ID so you can avoid - # using a complicated mapping. You cannot set `tracking_id` for Tasks of type - # `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - # following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [r] delivery_vehicle_id - # @return [::String] - # Output only. The ID of the vehicle that is executing this Task. Delivery - # Vehicle IDs are subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] planned_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::LocationInfo] - # Immutable. The location where the Task will be completed. - # Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - # @!attribute [rw] task_duration - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The time needed to execute a Task at this location. - # @!attribute [rw] target_time_window - # @return [::Google::Maps::FleetEngine::Delivery::V1::TimeWindow] - # The time window during which the task should be completed. - # @!attribute [r] journey_sharing_info - # @return [::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo] - # Output only. Journey sharing-specific fields. Not populated when state is - # `CLOSED`. - # @!attribute [rw] task_tracking_view_config - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig] - # The configuration for task tracking that specifies which data elements are - # visible to the end users under what circumstances. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>] - # A list of custom Task attributes. Each attribute must have a unique key. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Journey sharing specific fields. - # @!attribute [rw] remaining_vehicle_journey_segments - # @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>] - # Tracking information for the stops that the assigned vehicle will make - # before it completes this Task. Note that this list can contain stops - # from other tasks. - # - # The first segment, - # `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - # or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - # contains route information from the driver's last known location to the - # upcoming `VehicleStop`. Current route information usually comes from the - # driver app, except for some cases noted in the documentation for - # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}. - # The other segments in - # `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - # `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - # populated by Fleet Engine. They provide route information between the - # remaining `VehicleStops`. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation] - # Indicates the vehicle's last reported location of the assigned vehicle. - # @!attribute [rw] last_location_snappable - # @return [::Boolean] - # Indicates whether the vehicle's lastLocation can be snapped to - # the `current_route_segment`. This value is False if either - # `last_location` or `current_route_segment` don't exist. This value is - # computed by Fleet Engine. Updates from clients are ignored. - class JourneySharingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of Task. - module Type - # Default, the Task type is unknown. - TYPE_UNSPECIFIED = 0 - - # A pickup Task is the action taken for picking up a shipment from a - # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` - # type. - PICKUP = 1 - - # A delivery Task is the action taken for delivering a shipment to an end - # customer. Depot or feeder vehicle dropoffs should use the - # `SCHEDULED_STOP` type. - DELIVERY = 2 - - # A scheduled stop Task is used for planning purposes. For example, it - # could represent picking up or dropping off shipments from feeder vehicles - # or depots. It shouldn't be used for any shipments that are picked up or - # dropped off from an end customer. - SCHEDULED_STOP = 3 - - # A Task that means the Vehicle is not available for service. For example, - # this can happen when the driver takes a break, or when the vehicle - # is being refueled. - UNAVAILABLE = 4 - end - - # The state of a Task. This indicates the Tasks's progress. - module State - # Default. Used for an unspecified or unrecognized Task state. - STATE_UNSPECIFIED = 0 - - # Either the Task has not yet been assigned to a delivery vehicle, or the - # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. - OPEN = 1 - - # When the vehicle passes the vehicle stop for this Task. - CLOSED = 2 - end - - # The outcome of attempting to execute a Task. When `TaskState` is closed, - # `TaskOutcome` indicates whether it was completed successfully. - module TaskOutcome - # The Task outcome before its value is set. - TASK_OUTCOME_UNSPECIFIED = 0 - - # The Task completed successfully. - SUCCEEDED = 1 - - # Either the Task couldn't be completed, or it was cancelled. - FAILED = 2 - end - - # The identity of the source that populated the `task_outcome_location`. - module TaskOutcomeLocationSource - # The task outcome before it is set. - TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0 - - # The provider-specified the `task_outcome_location`. - PROVIDER = 2 - - # The provider didn't specify the `task_outcome_location`, so Fleet Engine - # used the last known vehicle location. - LAST_VEHICLE_LOCATION = 3 - end - end - - # The configuration message that defines when a data element of a Task should - # be visible to the end users. - # @!attribute [rw] route_polyline_points_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when route polyline points can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] estimated_arrival_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated arrival time can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] estimated_task_completion_time_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when estimated task completion time can be - # visible. If this field is not specified, the project level default - # visibility configuration for this data will be used. - # @!attribute [rw] remaining_driving_distance_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining driving distance can be visible. If - # this field is not specified, the project level default visibility - # configuration for this data will be used. - # @!attribute [rw] remaining_stop_count_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when remaining stop count can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - # @!attribute [rw] vehicle_location_visibility - # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig::VisibilityOption] - # The field that specifies when vehicle location can be visible. If this - # field is not specified, the project level default visibility configuration - # for this data will be used. - class TaskTrackingViewConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The option message that defines when a data element should be visible to - # the end users. - # @!attribute [rw] remaining_stop_count_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining stop - # count <= remaining_stop_count_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] duration_until_estimated_arrival_time_threshold - # @return [::Google::Protobuf::Duration] - # This data element is visible to the end users if the ETA to the stop - # <= duration_until_estimated_arrival_time_threshold. - # - # Note: The following fields are mutually exclusive: `duration_until_estimated_arrival_time_threshold`, `remaining_stop_count_threshold`, `remaining_driving_distance_meters_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remaining_driving_distance_meters_threshold - # @return [::Integer] - # This data element is visible to the end users if the remaining - # driving distance in meters <= - # remaining_driving_distance_meters_threshold. - # - # Note: The following fields are mutually exclusive: `remaining_driving_distance_meters_threshold`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `always`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] always - # @return [::Boolean] - # If set to true, this data element is always visible to the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `always`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `never`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] never - # @return [::Boolean] - # If set to true, this data element is always hidden from the end users - # with no thresholds. This field cannot be set to false. - # - # Note: The following fields are mutually exclusive: `never`, `remaining_stop_count_threshold`, `duration_until_estimated_arrival_time_threshold`, `remaining_driving_distance_meters_threshold`, `always`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VisibilityOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index 593314b4cde5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/proto_docs/google/type/latlng.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object that represents a latitude/longitude pair. This is expressed as a - # pair of doubles to represent degrees latitude and degrees longitude. Unless - # specified otherwise, this object must conform to the - # - # WGS84 standard. Values must be within normalized ranges. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - class LatLng - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/Gemfile deleted file mode 100644 index 30533202706d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1", path: "../" -else - gem "google-maps-fleet_engine-delivery-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-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb deleted file mode 100644 index 14782a4848c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/batch_create_tasks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the batch_create_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks. -# -def batch_create_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new - - # Call the batch_create_tasks method. - result = client.batch_create_tasks request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb deleted file mode 100644 index 4e414ecb6e94..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle. -# -def create_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new - - # Call the create_delivery_vehicle method. - result = client.create_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb deleted file mode 100644 index 786f6ae89625..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/create_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the create_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb deleted file mode 100644 index 0a42a3ea4d16..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle. -# -def delete_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new - - # Call the delete_delivery_vehicle method. - result = client.delete_delivery_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb deleted file mode 100644 index 7839b4fc3aa0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/delete_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the delete_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb deleted file mode 100644 index ac4be0811ccf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle. -# -def get_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new - - # Call the get_delivery_vehicle method. - result = client.get_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb deleted file mode 100644 index 51530e7ea2a7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb deleted file mode 100644 index 50c6fcfcbe4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/get_task_tracking_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the get_task_tracking_info call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info. -# -def get_task_tracking_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new - - # Call the get_task_tracking_info method. - result = client.get_task_tracking_info request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb deleted file mode 100644 index 06025d2f85f2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_delivery_vehicles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_delivery_vehicles call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles. -# -def list_delivery_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new - - # Call the list_delivery_vehicles method. - result = client.list_delivery_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb deleted file mode 100644 index f5751c045373..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the list_tasks call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task. - p item - end -end -# [END fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb deleted file mode 100644 index 54d6bfef390a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_delivery_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_delivery_vehicle call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle. -# -def update_delivery_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new - - # Call the update_delivery_vehicle method. - result = client.update_delivery_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb deleted file mode 100644 index 6413dfeaa315..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/delivery_service/update_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] -require "google/maps/fleet_engine/delivery/v1" - -## -# Snippet for the update_task call in the DeliveryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task. - p result -end -# [END fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json deleted file mode 100644 index 7abad3f98118..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/snippets/snippet_metadata_maps.fleetengine.delivery.v1.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-delivery-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.delivery.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateDeliveryVehicle_sync", - "title": "Snippet for the create_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle.", - "file": "delivery_service/create_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetDeliveryVehicle_sync", - "title": "Snippet for the get_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle.", - "file": "delivery_service/get_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync", - "title": "Snippet for the delete_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle.", - "file": "delivery_service/delete_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync", - "title": "Snippet for the update_delivery_vehicle call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle.", - "file": "delivery_service/update_delivery_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_delivery_vehicle", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_delivery_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateDeliveryVehicle", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateDeliveryVehicle", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_BatchCreateTasks_sync", - "title": "Snippet for the batch_create_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks.", - "file": "delivery_service/batch_create_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#batch_create_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "BatchCreateTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.BatchCreateTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_CreateTask_sync", - "title": "Snippet for the create_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task.", - "file": "delivery_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.CreateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTask_sync", - "title": "Snippet for the get_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task.", - "file": "delivery_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task.", - "file": "delivery_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.DeleteTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task.", - "file": "delivery_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::Task", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.UpdateTask", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks.", - "file": "delivery_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListTasks", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_GetTaskTrackingInfo_sync", - "title": "Snippet for the get_task_tracking_info call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info.", - "file": "delivery_service/get_task_tracking_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task_tracking_info", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#get_task_tracking_info", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "GetTaskTrackingInfo", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.GetTaskTrackingInfo", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetenginedelivery_v1_generated_DeliveryService_ListDeliveryVehicles_sync", - "title": "Snippet for the list_delivery_vehicles call in the DeliveryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles.", - "file": "delivery_service/list_delivery_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_delivery_vehicles", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client#list_delivery_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse", - "client": { - "short_name": "DeliveryService::Client", - "full_name": "::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client" - }, - "method": { - "short_name": "ListDeliveryVehicles", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService.ListDeliveryVehicles", - "service": { - "short_name": "DeliveryService", - "full_name": "maps.fleetengine.delivery.v1.DeliveryService" - } - } - }, - "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-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb deleted file mode 100644 index 8d3d04d6c721..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.delivery_vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/deliveryVehicles/value1", path - end - end - - def test_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provider_path provider: "value0" - assert_equal "providers/value0", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path provider: "value0", task: "value1" - assert_equal "providers/value0/tasks/value1", path - end - end - - def test_task_tracking_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_tracking_info_path provider: "value0", tracking: "value1" - assert_equal "providers/value0/taskTrackingInfo/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb deleted file mode 100644 index df0109912e9d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb +++ /dev/null @@ -1,773 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service/rest" - - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_count - end - end - end - - def test_get_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_count - end - end - end - - def test_delete_delivery_vehicle - # 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. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_delivery_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_delivery_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_delivery_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_delivery_vehicle_client_stub.call_count - end - end - end - - def test_update_delivery_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_delivery_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_delivery_vehicle_client_stub.call_count - end - end - end - - def test_batch_create_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_batch_create_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_tasks header: header, parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_tasks({ header: header, parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_task header: header, parent: parent, task_id: task_id, task: task do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_delete_task - # 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. - header = {} - name = "hello world" - - delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_task({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_task header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_task({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_update_task - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_task({ header: header, task: task, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_task header: header, task: task, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_task({ header: header, task: task, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_get_task_tracking_info - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_get_task_tracking_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_tracking_info_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_task_tracking_info({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_task_tracking_info header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_task_tracking_info({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_count - end - end - end - - def test_list_delivery_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.stub :transcode_list_delivery_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb deleted file mode 100644 index d08154229fd8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/google/maps/fleet_engine/delivery/v1/delivery_service_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/delivery/v1/delivery_api_pb" -require "google/maps/fleet_engine/delivery/v1/delivery_service" - -class ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - delivery_vehicle_id = "hello world" - delivery_vehicle = {} - - create_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["delivery_vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_delivery_vehicle header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_delivery_vehicle({ header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new(header: header, parent: parent, delivery_vehicle_id: delivery_vehicle_id, delivery_vehicle: delivery_vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_get_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_delivery_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_delivery_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_delivery_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::DeleteDeliveryVehicleRequest.new(header: header, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_update_delivery_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - delivery_vehicle = {} - update_mask = {} - - update_delivery_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_delivery_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle), request["delivery_vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_delivery_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_delivery_vehicle header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_delivery_vehicle ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_delivery_vehicle({ header: header, delivery_vehicle: delivery_vehicle, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_delivery_vehicle(::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new(header: header, delivery_vehicle: delivery_vehicle, 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_delivery_vehicle_client_stub.call_rpc_count - end - end - - def test_batch_create_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - requests = [{}] - - batch_create_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_tasks, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_tasks({ header: header, parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_tasks header: header, parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_tasks ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_tasks({ header: header, parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_tasks(::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new(header: header, parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_tasks_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - task_id = "hello world" - task = {} - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_task header: header, parent: parent, task_id: task_id, task: task do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_task ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_task({ header: header, parent: parent, task_id: task_id, task: task }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_task(::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new(header: header, parent: parent, task_id: task_id, task: task), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_task ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_task({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_task(::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_task({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_task header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_task ::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_task({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_task(::Google::Maps::FleetEngine::Delivery::V1::DeleteTaskRequest.new(header: header, 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_task_client_stub.call_rpc_count - end - end - - def test_update_task - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - task = {} - update_mask = {} - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::Task), request["task"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_task({ header: header, task: task, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_task header: header, task: task, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_task ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_task({ header: header, task: task, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_task(::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new(header: header, task: task, 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_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_tasks header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_tasks ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_tasks({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_tasks(::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_get_task_tracking_info - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - get_task_tracking_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task_tracking_info, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_tracking_info_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_task_tracking_info({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_task_tracking_info header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_task_tracking_info ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_task_tracking_info({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_task_tracking_info(::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new(header: header, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_tracking_info_client_stub.call_rpc_count - end - end - - def test_list_delivery_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - viewport = {} - - list_delivery_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_delivery_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_delivery_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_delivery_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_delivery_vehicles ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_delivery_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_delivery_vehicles(::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_delivery_vehicles_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::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::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-delivery-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore b/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json deleted file mode 100644 index 4592d201ad59..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "fleetengine.googleapis.com", - "api_shortname": "fleetengine", - "client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-v1", - "distribution_name": "google-maps-fleet_engine-v1", - "is_cloud": false, - "language": "ruby", - "name": "fleetengine", - "name_pretty": "Local Rides and Deliveries V1 API", - "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml b/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml deleted file mode 100644 index 50b9b02eb455..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-maps-fleet_engine-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-maps-fleet_engine-v1.rb" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb b/owl-bot-staging/google-maps-fleet_engine-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/.yardopts b/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts deleted file mode 100644 index 53681741a35c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Local Rides and Deliveries 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-maps-fleet_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md deleted file mode 100644 index 934462c35216..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/maps/fleet_engine/v1" - -::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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/maps/fleet_engine/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-v1/CHANGELOG.md b/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md b/owl-bot-staging/google-maps-fleet_engine-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/README.md deleted file mode 100644 index 6abe0096016a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Local Rides and Deliveries V1 API - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Local Rides and Deliveries V1 API. Most users should consider using -the main client gem, -[google-maps-fleet_engine](https://rubygems.org/gems/google-maps-fleet_engine). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-maps-fleet_engine-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/fleetengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/maps/fleet_engine/v1" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new -request = ::Google::Maps::FleetEngine::V1::CreateTripRequest.new # (request fields as keyword arguments...) -response = client.create_trip request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-maps-fleet_engine-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/maps/documentation/transportation-logistics/mobility) -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/maps/fleet_engine/v1" -require "logger" - -client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-maps-fleet_engine`, -and lower-level _versioned_ client libraries with names such as -`google-maps-fleet_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-maps-fleet_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-maps-fleet_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-maps-fleet_engine-v1/Rakefile b/owl-bot-staging/google-maps-fleet_engine-v1/Rakefile deleted file mode 100644 index 3919676d82cf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-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/maps/fleet_engine/v1/trip_service/credentials" - ::Google::Maps::FleetEngine::V1::TripService::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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-maps-fleet_engine-v1" - header "google-maps-fleet_engine-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-maps-fleet_engine-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-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-maps-fleet_engine-v1/gapic_metadata.json b/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json deleted file mode 100644 index 0bdd51b5c575..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "maps.fleetengine.v1", - "libraryPackage": "::Google::Maps::FleetEngine::V1", - "services": { - "TripService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::TripService::Client", - "rpcs": { - "CreateTrip": { - "methods": [ - "create_trip" - ] - }, - "GetTrip": { - "methods": [ - "get_trip" - ] - }, - "DeleteTrip": { - "methods": [ - "delete_trip" - ] - }, - "ReportBillableTrip": { - "methods": [ - "report_billable_trip" - ] - }, - "SearchTrips": { - "methods": [ - "search_trips" - ] - }, - "UpdateTrip": { - "methods": [ - "update_trip" - ] - } - } - } - } - }, - "VehicleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Maps::FleetEngine::V1::VehicleService::Client", - "rpcs": { - "CreateVehicle": { - "methods": [ - "create_vehicle" - ] - }, - "GetVehicle": { - "methods": [ - "get_vehicle" - ] - }, - "DeleteVehicle": { - "methods": [ - "delete_vehicle" - ] - }, - "UpdateVehicle": { - "methods": [ - "update_vehicle" - ] - }, - "UpdateVehicleAttributes": { - "methods": [ - "update_vehicle_attributes" - ] - }, - "ListVehicles": { - "methods": [ - "list_vehicles" - ] - }, - "SearchVehicles": { - "methods": [ - "search_vehicles" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec b/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec deleted file mode 100644 index e47fe7d61a50..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/google-maps-fleet_engine-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/maps/fleet_engine/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-maps-fleet_engine-v1" - gem.version = Google::Maps::FleetEngine::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine instead. See the readme for more details." - gem.summary = "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-geo-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-v1.rb deleted file mode 100644 index d09ab3bdc03a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google-maps-fleet_engine-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/maps/fleet_engine/v1" diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb deleted file mode 100644 index b9e04593edfe..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleet_engine/v1/trip_service" -require "google/maps/fleet_engine/v1/vehicle_service" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/maps/fleet_engine/v1" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/maps/fleet_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/rest.rb deleted file mode 100644 index a0010e1c40d9..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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/maps/fleet_engine/v1/trip_service/rest" -require "google/maps/fleet_engine/v1/vehicle_service/rest" -require "google/maps/fleet_engine/v1/version" - -module Google - module Maps - module FleetEngine - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/maps/fleet_engine/v1/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service.rb deleted file mode 100644 index cb3cd45ab109..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/client" -require "google/maps/fleet_engine/v1/trip_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/trip_service" - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - end - end - end - end -end - -helper_path = ::File.join __dir__, "trip_service", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb deleted file mode 100644 index 18ea9bb63065..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/client.rb +++ /dev/null @@ -1,1153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - ## - # Client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.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 TripService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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/maps/fleetengine/v1/trip_api_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 - - @trip_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::TripService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :create_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :get_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :delete_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :report_billable_trip, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_trips.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :search_trips, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @trip_service_stub, :search_trips, request, response, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_trip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.call_rpc :update_trip, request, 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 TripService API. - # - # This class represents the configuration for TripService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::TripService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb deleted file mode 100644 index 4377df747ce3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Credentials for the TripService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb deleted file mode 100644 index 7de4a91f901d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Path helper methods for the TripService API. - module Paths - ## - # Create a fully-qualified Trip resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/trips/{trip}` - # - # @param provider [String] - # @param trip [String] - # - # @return [::String] - def trip_path provider:, trip: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/trips/#{trip}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest.rb deleted file mode 100644 index 8f43dcd60e6b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/trip_service/credentials" -require "google/maps/fleet_engine/v1/trip_service/paths" -require "google/maps/fleet_engine/v1/trip_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Trip management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/trip_service/rest" - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - module TripService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/trip_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb deleted file mode 100644 index 78114c5d13b2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +++ /dev/null @@ -1,1062 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST client for the TripService service. - # - # Trip management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trip_service_stub - - ## - # Configure the TripService Client class. - # - # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TripService clients - # ::Google::Maps::FleetEngine::V1::TripService::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", "Maps", "FleetEngine", "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_trip.timeout = 15.0 - default_config.rpcs.create_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_trip.timeout = 15.0 - default_config.rpcs.get_trip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_trips.timeout = 15.0 - default_config.rpcs.search_trips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_trip.timeout = 15.0 - default_config.rpcs.update_trip.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 TripService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::TripService::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 - @trip_service_stub.universe_domain - end - - ## - # Create a new TripService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TripService 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 - - @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @trip_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 - @trip_service_stub.logger - end - - # Service calls - - ## - # Creates a trip in the Fleet Engine and returns the new trip. - # - # @overload create_trip(request, options = nil) - # Pass arguments to `create_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil) - # Pass arguments to `create_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param trip_id [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - # - # # Call the create_trip method. - # result = client.create_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def create_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest - - # Converts hash and nil to an 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_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.create_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get information about a single trip. - # - # @overload get_trip(request, options = nil) - # Pass arguments to `get_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil) - # Pass arguments to `get_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param view [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetTripRequest.new - # - # # Call the get_trip method. - # result = client.get_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def get_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.get_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - # - # @overload delete_trip(request, options = nil) - # Pass arguments to `delete_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_trip(header: nil, name: nil) - # Pass arguments to `delete_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - # - # # Call the delete_trip method. - # result = client.delete_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.delete_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report billable trip usage. - # - # @overload report_billable_trip(request, options = nil) - # Pass arguments to `report_billable_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil) - # Pass arguments to `report_billable_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @param country_code [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @param related_ids [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - # - # # Call the report_billable_trip method. - # result = client.report_billable_trip request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def report_billable_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.report_billable_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.report_billable_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.report_billable_trip request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get all the trips for a specific vehicle. - # - # @overload search_trips(request, options = nil) - # Pass arguments to `search_trips` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil) - # Pass arguments to `search_trips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @param active_trips_only [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @param page_size [::Integer] - # If not set, the server decides the number of results to return. - # @param page_token [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - # - # # Call the search_trips method. - # result = client.search_trips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - # p item - # end - # - def search_trips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest - - # Converts hash and nil to an 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_trips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trips.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_trips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.search_trips request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, 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 trip data. - # - # @overload update_trip(request, options = nil) - # Pass arguments to `update_trip` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil) - # Pass arguments to `update_trip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - # - # # Call the update_trip method. - # result = client.update_trip request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - # p result - # - def update_trip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_trip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_trip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_trip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trip_service_stub.update_trip request, 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 TripService REST API. - # - # This class represents the configuration for TripService 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::Maps::FleetEngine::V1::TripService::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_trip to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_trip.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 TripService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trip - ## - # RPC-specific configuration for `get_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trip - ## - # RPC-specific configuration for `delete_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trip - ## - # RPC-specific configuration for `report_billable_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :report_billable_trip - ## - # RPC-specific configuration for `search_trips` - # @return [::Gapic::Config::Method] - # - attr_reader :search_trips - ## - # RPC-specific configuration for `update_trip` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trip - - # @private - def initialize parent_rpcs = nil - create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip - @create_trip = ::Gapic::Config::Method.new create_trip_config - get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip - @get_trip = ::Gapic::Config::Method.new get_trip_config - delete_trip_config = parent_rpcs.delete_trip if parent_rpcs.respond_to? :delete_trip - @delete_trip = ::Gapic::Config::Method.new delete_trip_config - report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip - @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config - search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips - @search_trips = ::Gapic::Config::Method.new search_trips_config - update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip - @update_trip = ::Gapic::Config::Method.new update_trip_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb deleted file mode 100644 index 989dd713b15c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +++ /dev/null @@ -1,451 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/trip_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module TripService - module Rest - ## - # REST service stub for the TripService 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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def create_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def get_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def report_billable_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_report_billable_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "report_billable_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchTripsResponse] - # A result object deserialized from the server's reply - def search_trips request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_trips_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trips", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Trip] - # A result object deserialized from the server's reply - def update_trip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_trip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_trip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Trip.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_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateTripRequest] - # 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_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips", - body: "trip", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the report_billable_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_report_billable_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:report", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/billableTrips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_trips REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchTripsRequest] - # 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_trips_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trips:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_trip REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateTripRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_trip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "trip", - matches: [ - ["name", %r{^providers/[^/]+/trips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service.rb deleted file mode 100644 index 8a9893ae0e60..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/client" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/maps/fleet_engine/v1/vehicle_service" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "vehicle_service", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb deleted file mode 100644 index c1b48e95c452..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +++ /dev/null @@ -1,1463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - ## - # Client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.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 VehicleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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/maps/fleetengine/v1/vehicle_api_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 - - @vehicle_service_stub = ::Gapic::ServiceStub.new( - ::Google::Maps::FleetEngine::V1::VehicleService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :create_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :get_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :delete_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name && - %r{^providers/[^/]+/?$}.match?(request.name) - header_params["provider_id"] = request.name - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :update_vehicle_attributes, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :list_vehicles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent && - %r{^providers/[^/]+/?$}.match?(request.parent) - header_params["provider_id"] = request.parent - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_vehicles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.call_rpc :search_vehicles, request, 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 VehicleService API. - # - # This class represents the configuration for VehicleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Maps::FleetEngine::V1::VehicleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb deleted file mode 100644 index fa225faa2e96..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Credentials for the VehicleService 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-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb deleted file mode 100644 index 55fd593ff4b1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Path helper methods for the VehicleService API. - module Paths - ## - # Create a fully-qualified Vehicle resource string. - # - # The resource will be in the following format: - # - # `providers/{provider}/vehicles/{vehicle}` - # - # @param provider [String] - # @param vehicle [String] - # - # @return [::String] - def vehicle_path provider:, vehicle: - raise ::ArgumentError, "provider cannot contain /" if provider.to_s.include? "/" - - "providers/#{provider}/vehicles/#{vehicle}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb deleted file mode 100644 index c638416560e4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/version" - -require "google/maps/fleet_engine/v1/vehicle_service/credentials" -require "google/maps/fleet_engine/v1/vehicle_service/paths" -require "google/maps/fleet_engine/v1/vehicle_service/rest/client" - -module Google - module Maps - module FleetEngine - module V1 - ## - # Vehicle management service. - # - # To load this service and instantiate a REST client: - # - # require "google/maps/fleet_engine/v1/vehicle_service/rest" - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - module VehicleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb deleted file mode 100644 index 6f30d8a08b7c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +++ /dev/null @@ -1,1364 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest/service_stub" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST client for the VehicleService service. - # - # Vehicle management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vehicle_service_stub - - ## - # Configure the VehicleService Client class. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VehicleService clients - # ::Google::Maps::FleetEngine::V1::VehicleService::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", "Maps", "FleetEngine", "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_vehicle.timeout = 15.0 - default_config.rpcs.create_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_vehicle.timeout = 15.0 - default_config.rpcs.get_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle.timeout = 15.0 - default_config.rpcs.update_vehicle.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_vehicle_attributes.timeout = 15.0 - default_config.rpcs.update_vehicle_attributes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_vehicles.timeout = 15.0 - default_config.rpcs.search_vehicles.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 VehicleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Maps::FleetEngine::V1::VehicleService::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 - @vehicle_service_stub.universe_domain - end - - ## - # Create a new VehicleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VehicleService 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 - - @vehicle_service_stub = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @vehicle_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 - @vehicle_service_stub.logger - end - - # Service calls - - ## - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # - # @overload create_vehicle(request, options = nil) - # Pass arguments to `create_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::CreateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_vehicle(header: nil, parent: nil, vehicle_id: nil, vehicle: nil) - # Pass arguments to `create_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle_id [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - # - # # Call the create_vehicle method. - # result = client.create_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def create_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateVehicleRequest - - # Converts hash and nil to an 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_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.create_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a vehicle from the Fleet Engine. - # - # @overload get_vehicle(request, options = nil) - # Pass arguments to `get_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::GetVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_vehicle(header: nil, name: nil, current_route_segment_version: nil, waypoints_version: nil) - # Pass arguments to `get_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @param waypoints_version [::Google::Protobuf::Timestamp, ::Hash] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - # - # # Call the get_vehicle method. - # result = client.get_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def get_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.get_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - # - # @overload delete_vehicle(request, options = nil) - # Pass arguments to `delete_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::DeleteVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_vehicle(header: nil, name: nil) - # Pass arguments to `delete_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # Optional. The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - # - # # Call the delete_vehicle method. - # result = client.delete_vehicle request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.delete_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - # - # @overload update_vehicle(request, options = nil) - # Pass arguments to `update_vehicle` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle(header: nil, name: nil, vehicle: nil, update_mask: nil) - # Pass arguments to `update_vehicle` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param vehicle [::Google::Maps::FleetEngine::V1::Vehicle, ::Hash] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - # - # # Call the update_vehicle method. - # result = client.update_vehicle request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - # p result - # - def update_vehicle request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_vehicle.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_vehicle.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - # - # @overload update_vehicle_attributes(request, options = nil) - # Pass arguments to `update_vehicle_attributes` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vehicle_attributes(header: nil, name: nil, attributes: nil) - # Pass arguments to `update_vehicle_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param name [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - # - # # Call the update_vehicle_attributes method. - # result = client.update_vehicle_attributes request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - # p result - # - def update_vehicle_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_vehicle_attributes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_vehicle_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vehicle_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.update_vehicle_attributes request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - # - # @overload list_vehicles(request, options = nil) - # Pass arguments to `list_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::ListVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_type_categories: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, vehicle_state: nil, on_trip_only: nil, filter: nil, viewport: nil) - # Pass arguments to `list_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param page_size [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @param page_token [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @param minimum_capacity [::Google::Protobuf::Int32Value, ::Hash] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @param vehicle_type_categories [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @param required_attributes [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @param required_one_of_attributes [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @param required_one_of_attribute_sets [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @param vehicle_state [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @param on_trip_only [::Boolean] - # Only return the vehicles with current trip(s). - # @param filter [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @param viewport [::Google::Geo::Type::Viewport, ::Hash] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Vehicle>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - # - # # Call the list_vehicles method. - # result = client.list_vehicles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - # p item - # end - # - def list_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ListVehiclesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.list_vehicles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vehicle_service_stub, :list_vehicles, "vehicles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of vehicles that match the request options. - # - # @overload search_vehicles(request, options = nil) - # Pass arguments to `search_vehicles` via a request object, either of type - # {::Google::Maps::FleetEngine::V1::SearchVehiclesRequest} or an equivalent Hash. - # - # @param request [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_vehicles(header: nil, parent: nil, pickup_point: nil, dropoff_point: nil, pickup_radius_meters: nil, count: nil, minimum_capacity: nil, trip_types: nil, maximum_staleness: nil, vehicle_types: nil, required_attributes: nil, required_one_of_attributes: nil, required_one_of_attribute_sets: nil, order_by: nil, include_back_to_back: nil, trip_id: nil, current_trips_present: nil, filter: nil) - # Pass arguments to `search_vehicles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash] - # The standard Fleet Engine request header. - # @param parent [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @param pickup_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # Required. The pickup point to search near. - # @param dropoff_point [::Google::Maps::FleetEngine::V1::TerminalLocation, ::Hash] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @param pickup_radius_meters [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @param count [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @param minimum_capacity [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @param trip_types [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @param maximum_staleness [::Google::Protobuf::Duration, ::Hash] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @param vehicle_types [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, ::Hash>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @param required_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute, ::Hash>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @param required_one_of_attributes [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @param required_one_of_attribute_sets [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList, ::Hash>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @param order_by [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @param include_back_to_back [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @param trip_id [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @param current_trips_present [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @param filter [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/maps/fleet_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - # - # # Call the search_vehicles method. - # result = client.search_vehicles request - # - # # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - # p result - # - def search_vehicles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest - - # Converts hash and nil to an 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_vehicles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Maps::FleetEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_vehicles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_vehicles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vehicle_service_stub.search_vehicles request, 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 VehicleService REST API. - # - # This class represents the configuration for VehicleService 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::Maps::FleetEngine::V1::VehicleService::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_vehicle to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_vehicle.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "fleetengine.googleapis.com" - - config_attr :endpoint, nil, ::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 VehicleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vehicle - ## - # RPC-specific configuration for `get_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vehicle - ## - # RPC-specific configuration for `delete_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vehicle - ## - # RPC-specific configuration for `update_vehicle` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle - ## - # RPC-specific configuration for `update_vehicle_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vehicle_attributes - ## - # RPC-specific configuration for `list_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vehicles - ## - # RPC-specific configuration for `search_vehicles` - # @return [::Gapic::Config::Method] - # - attr_reader :search_vehicles - - # @private - def initialize parent_rpcs = nil - create_vehicle_config = parent_rpcs.create_vehicle if parent_rpcs.respond_to? :create_vehicle - @create_vehicle = ::Gapic::Config::Method.new create_vehicle_config - get_vehicle_config = parent_rpcs.get_vehicle if parent_rpcs.respond_to? :get_vehicle - @get_vehicle = ::Gapic::Config::Method.new get_vehicle_config - delete_vehicle_config = parent_rpcs.delete_vehicle if parent_rpcs.respond_to? :delete_vehicle - @delete_vehicle = ::Gapic::Config::Method.new delete_vehicle_config - update_vehicle_config = parent_rpcs.update_vehicle if parent_rpcs.respond_to? :update_vehicle - @update_vehicle = ::Gapic::Config::Method.new update_vehicle_config - update_vehicle_attributes_config = parent_rpcs.update_vehicle_attributes if parent_rpcs.respond_to? :update_vehicle_attributes - @update_vehicle_attributes = ::Gapic::Config::Method.new update_vehicle_attributes_config - list_vehicles_config = parent_rpcs.list_vehicles if parent_rpcs.respond_to? :list_vehicles - @list_vehicles = ::Gapic::Config::Method.new list_vehicles_config - search_vehicles_config = parent_rpcs.search_vehicles if parent_rpcs.respond_to? :search_vehicles - @search_vehicles = ::Gapic::Config::Method.new search_vehicles_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb deleted file mode 100644 index ab5b0c346f64..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/maps/fleetengine/v1/vehicle_api_pb" - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - module Rest - ## - # REST service stub for the VehicleService 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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def create_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def get_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::Vehicle] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # A result object deserialized from the server's reply - def update_vehicle request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vehicle", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::Vehicle.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse] - # A result object deserialized from the server's reply - def update_vehicle_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vehicle_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vehicle_attributes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::ListVehiclesResponse] - # A result object deserialized from the server's reply - def list_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.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_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesResponse] - # A result object deserialized from the server's reply - def search_vehicles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_vehicles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_vehicles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.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_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::CreateVehicleRequest] - # 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_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles", - body: "vehicle", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::GetVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::DeleteVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_vehicle_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}", - body: "vehicle", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vehicle_attributes REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_vehicle_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateAttributes", - body: "*", - matches: [ - ["name", %r{^providers/[^/]+/vehicles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::ListVehiclesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vehicles", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_vehicles REST call - # - # @param request_pb [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest] - # 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_vehicles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vehicles:search", - body: "*", - matches: [ - ["parent", %r{^providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/v1/version.rb deleted file mode 100644 index 5f98242dd062..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleet_engine/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 Maps - module FleetEngine - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb deleted file mode 100644 index 58e92abfb79e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/fleetengine_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/fleetengine.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/fleetengine.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"b\n\x0fTerminalPointId\x12\x16\n\x08place_id\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\x1a\n\x0cgenerated_id\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x11\n\x05value\x18\x04 \x01(\tB\x02\x18\x01:\x02\x18\x01\x42\x04\n\x02Id\"\xf9\x01\n\x10TerminalLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x43\n\x11terminal_point_id\x18\x02 \x01(\x0b\x32$.maps.fleetengine.v1.TerminalPointIdB\x02\x18\x01\x12\x1b\n\x0f\x61\x63\x63\x65ss_point_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x13\n\x07trip_id\x18\x04 \x01(\tB\x02\x18\x01\x12\x45\n\x16terminal_location_type\x18\x05 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointTypeB\x02\x18\x01\"\xbc\x03\n\x0cTripWaypoint\x12\x37\n\x08location\x18\x01 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x0f\n\x07trip_id\x18\x02 \x01(\t\x12\x38\n\rwaypoint_type\x18\x03 \x01(\x0e\x32!.maps.fleetengine.v1.WaypointType\x12-\n\x10path_to_waypoint\x18\x04 \x03(\x0b\x32\x13.google.type.LatLng\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x05 \x01(\t\x12K\n\x13traffic_to_waypoint\x18\n \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolyline\x12\x34\n\x0f\x64istance_meters\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\'\n\x03\x65ta\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x01\n\x10VehicleAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x05 \x01(\x01H\x00\x42\x19\n\x17vehicle_attribute_value\"\x80\x0e\n\x0fVehicleLocation\x12%\n\x08location\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12=\n\x13horizontal_accuracy\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x35\n\x0flatlng_accuracy\x18\x16 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12,\n\x07heading\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12:\n\x10\x62\x65\x61ring_accuracy\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x36\n\x10heading_accuracy\x18\x17 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12.\n\x08\x61ltitude\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x11vertical_accuracy\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x02\x18\x01\x12\x37\n\x11\x61ltitude_accuracy\x18\x18 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x33\n\nspeed_kmph\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x02\x18\x01\x12+\n\x05speed\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x34\n\x0espeed_accuracy\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bserver_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0flocation_sensor\x18\x0b \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x33\n\x0fis_road_snapped\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12>\n\x15is_gps_sensor_enabled\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x04\x12;\n\x11time_since_update\x18\x0e \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12=\n\x11num_stale_updates\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x05\x18\x01\xe0\x41\x04\x12)\n\x0craw_location\x18\x10 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x11raw_location_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x13raw_location_sensor\x18\x1c \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12;\n\x15raw_location_accuracy\x18\x19 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12)\n\x0c\x66lp_location\x18\x1d \x01(\x0b\x32\x13.google.type.LatLng\x12\x33\n\x0f\x66lp_update_time\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1a\x66lp_latlng_accuracy_meters\x18\x1f \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x38\n\x13\x66lp_heading_degrees\x18 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x32\n\x15supplemental_location\x18\x12 \x01(\x0b\x32\x13.google.type.LatLng\x12>\n\x1asupplemental_location_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x1csupplemental_location_sensor\x18\x14 \x01(\x0e\x32#.maps.fleetengine.v1.LocationSensor\x12\x44\n\x1esupplemental_location_accuracy\x18\x15 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x18\n\x0croad_snapped\x18\x1a \x01(\x08\x42\x02\x18\x01\"z\n\rTripAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cnumber_value\x18\x04 \x01(\x01H\x00\x42\x16\n\x14trip_attribute_value*<\n\x08TripType\x12\x15\n\x11UNKNOWN_TRIP_TYPE\x10\x00\x12\n\n\x06SHARED\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*\x8b\x01\n\x0cWaypointType\x12\x19\n\x15UNKNOWN_WAYPOINT_TYPE\x10\x00\x12\x18\n\x14PICKUP_WAYPOINT_TYPE\x10\x01\x12\x1a\n\x16\x44ROP_OFF_WAYPOINT_TYPE\x10\x02\x12*\n&INTERMEDIATE_DESTINATION_WAYPOINT_TYPE\x10\x03*_\n\x12PolylineFormatType\x12\x17\n\x13UNKNOWN_FORMAT_TYPE\x10\x00\x12\x15\n\x11LAT_LNG_LIST_TYPE\x10\x01\x12\x19\n\x15\x45NCODED_POLYLINE_TYPE\x10\x02*\x89\x01\n\x10NavigationStatus\x12\x1d\n\x19UNKNOWN_NAVIGATION_STATUS\x10\x00\x12\x0f\n\x0bNO_GUIDANCE\x10\x01\x12\x1a\n\x16\x45NROUTE_TO_DESTINATION\x10\x02\x12\r\n\tOFF_ROUTE\x10\x03\x12\x1a\n\x16\x41RRIVED_AT_DESTINATION\x10\x04*\xd7\x01\n\x0eLocationSensor\x12\x12\n\x0eUNKNOWN_SENSOR\x10\x00\x12\x07\n\x03GPS\x10\x01\x12\x0b\n\x07NETWORK\x10\x02\x12\x0b\n\x07PASSIVE\x10\x03\x12\"\n\x1eROAD_SNAPPED_LOCATION_PROVIDER\x10\x04\x12\x1e\n\x1a\x43USTOMER_SUPPLIED_LOCATION\x10\x05\x12\x19\n\x15\x46LEET_ENGINE_LOCATION\x10\x06\x12\x1b\n\x17\x46USED_LOCATION_PROVIDER\x10\x64\x12\x12\n\rCORE_LOCATION\x10\xc8\x01\x42\xd7\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0b\x46leetEngineP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - TerminalPointId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalPointId").msgclass - TerminalLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TerminalLocation").msgclass - TripWaypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripWaypoint").msgclass - VehicleAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttribute").msgclass - VehicleLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleLocation").msgclass - TripAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripAttribute").msgclass - TripType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripType").enummodule - WaypointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.WaypointType").enummodule - PolylineFormatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PolylineFormatType").enummodule - NavigationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.NavigationStatus").enummodule - LocationSensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationSensor").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb deleted file mode 100644 index 3f8cd27dcedb..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/header_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/header.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/maps/fleetengine/v1/header.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x04\n\rRequestHeader\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0bsdk_version\x18\x03 \x01(\t\x12\x12\n\nos_version\x18\x04 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x05 \x01(\t\x12<\n\x08sdk_type\x18\x06 \x01(\x0e\x32*.maps.fleetengine.v1.RequestHeader.SdkType\x12\x18\n\x10maps_sdk_version\x18\x07 \x01(\t\x12\x17\n\x0fnav_sdk_version\x18\x08 \x01(\t\x12=\n\x08platform\x18\t \x01(\x0e\x32+.maps.fleetengine.v1.RequestHeader.Platform\x12\x14\n\x0cmanufacturer\x18\n \x01(\t\x12\x19\n\x11\x61ndroid_api_level\x18\x0b \x01(\x05\x12\x10\n\x08trace_id\x18\x0c \x01(\t\"M\n\x07SdkType\x12\x18\n\x14SDK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONSUMER\x10\x01\x12\n\n\x06\x44RIVER\x10\x02\x12\x0e\n\nJAVASCRIPT\x10\x03\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07HeadersP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - RequestHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader").msgclass - RequestHeader::SdkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.SdkType").enummodule - RequestHeader::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.RequestHeader.Platform").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb deleted file mode 100644 index 14bfe0f2b53b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/traffic_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/traffic.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/maps/fleetengine/v1/traffic.proto\x12\x13maps.fleetengine.v1\"\xe3\x01\n\x14SpeedReadingInterval\x12\"\n\x1astart_polyline_point_index\x18\x01 \x01(\x05\x12 \n\x18\x65nd_polyline_point_index\x18\x02 \x01(\x05\x12>\n\x05speed\x18\x03 \x01(\x0e\x32/.maps.fleetengine.v1.SpeedReadingInterval.Speed\"E\n\x05Speed\x12\x15\n\x11SPEED_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x08\n\x04SLOW\x10\x02\x12\x0f\n\x0bTRAFFIC_JAM\x10\x03\"\x88\x01\n\x19\x43onsumableTrafficPolyline\x12I\n\x16speed_reading_interval\x18\x01 \x03(\x0b\x32).maps.fleetengine.v1.SpeedReadingInterval\x12 \n\x18\x65ncoded_path_to_waypoint\x18\x02 \x01(\tB\xd8\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x0cTrafficProtoP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - SpeedReadingInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval").msgclass - SpeedReadingInterval::Speed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SpeedReadingInterval.Speed").enummodule - ConsumableTrafficPolyline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ConsumableTrafficPolyline").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb deleted file mode 100644 index eb001c21ef19..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trip_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/trips_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/maps/fleetengine/v1/trip_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a&google/maps/fleetengine/v1/trips.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\x11\x43reateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x37\n\x06parent\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12\x14\n\x07trip_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\"\x86\x04\n\x0eGetTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x35\n\x04name\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\x12+\n\x04view\x18\x0b \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1bremaining_waypoints_version\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x42\n\x11route_format_type\x18\x08 \x01(\x0e\x32\'.maps.fleetengine.v1.PolylineFormatType\x12I\n%current_route_segment_traffic_version\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n!remaining_waypoints_route_version\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x83\x01\n\x11\x44\x65leteTripRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x35\n\x04name\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66leetengine.googleapis.com/Trip\"\xcd\x02\n\x19ReportBillableTripRequest\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x08platform\x18\x05 \x01(\x0e\x32..maps.fleetengine.v1.BillingPlatformIdentifier\x12\x13\n\x0brelated_ids\x18\x06 \x03(\t\x12R\n\rsolution_type\x18\x07 \x01(\x0e\x32;.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType\"W\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12(\n$ON_DEMAND_RIDESHARING_AND_DELIVERIES\x10\x01\"\xbe\x01\n\x11UpdateTripRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x04trip\x18\x04 \x01(\x0b\x32\x19.maps.fleetengine.v1.TripB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe9\x01\n\x12SearchTripsRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvehicle_id\x18\x04 \x01(\t\x12\x19\n\x11\x61\x63tive_trips_only\x18\x05 \x01(\x08\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x34\n\x11minimum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\"X\n\x13SearchTripsResponse\x12(\n\x05trips\x18\x01 \x03(\x0b\x32\x19.maps.fleetengine.v1.Trip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\x08\n\x0bTripService\x12\xa8\x01\n\nCreateTrip\x12&.maps.fleetengine.v1.CreateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"W\x82\xd3\xe4\x93\x02&\"\x1e/v1/{parent=providers/*}/trips:\x04trip\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\x9a\x01\n\x07GetTrip\x12#.maps.fleetengine.v1.GetTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"O\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xa4\x01\n\nDeleteTrip\x12&.maps.fleetengine.v1.DeleteTripRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=providers/*/trips/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbf\x01\n\x12ReportBillableTrip\x12..maps.fleetengine.v1.ReportBillableTripRequest\x1a\x16.google.protobuf.Empty\"a\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=providers/*/billableTrips/*}:report:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xbd\x01\n\x0bSearchTrips\x12\'.maps.fleetengine.v1.SearchTripsRequest\x1a(.maps.fleetengine.v1.SearchTripsResponse\"[\x82\xd3\xe4\x93\x02*\"%/v1/{parent=providers/*}/trips:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nUpdateTrip\x12&.maps.fleetengine.v1.UpdateTripRequest\x1a\x19.maps.fleetengine.v1.Trip\"U\x82\xd3\xe4\x93\x02&\x1a\x1e/v1/{name=providers/*/trips/*}:\x04trip\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd3\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x07TripApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateTripRequest").msgclass - GetTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetTripRequest").msgclass - DeleteTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteTripRequest").msgclass - ReportBillableTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest").msgclass - ReportBillableTripRequest::SolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ReportBillableTripRequest.SolutionType").enummodule - UpdateTripRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateTripRequest").msgclass - SearchTripsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsRequest").msgclass - SearchTripsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchTripsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb deleted file mode 100644 index 39026e91ba88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/trip_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/trip_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module TripService - # Trip management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.TripService' - - # Creates a trip in the Fleet Engine and returns the new trip. - rpc :CreateTrip, ::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Get information about a single trip. - rpc :GetTrip, ::Google::Maps::FleetEngine::V1::GetTripRequest, ::Google::Maps::FleetEngine::V1::Trip - # Deletes a single Trip. - # - # Returns FAILED_PRECONDITION if the Trip is active and assigned to a - # vehicle. - rpc :DeleteTrip, ::Google::Maps::FleetEngine::V1::DeleteTripRequest, ::Google::Protobuf::Empty - # Report billable trip usage. - rpc :ReportBillableTrip, ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Google::Protobuf::Empty - # Get all the trips for a specific vehicle. - rpc :SearchTrips, ::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Google::Maps::FleetEngine::V1::SearchTripsResponse - # Updates trip data. - rpc :UpdateTrip, ::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Google::Maps::FleetEngine::V1::Trip - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb deleted file mode 100644 index 2aea61330c0f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/trips_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/trips.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/traffic_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n&google/maps/fleetengine/v1/trips.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a(google/maps/fleetengine/v1/traffic.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xef\x10\n\x04Trip\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nvehicle_id\x18\x02 \x01(\t\x12\x34\n\x0btrip_status\x18\x03 \x01(\x0e\x32\x1f.maps.fleetengine.v1.TripStatus\x12\x30\n\ttrip_type\x18\x04 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12;\n\x0cpickup_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x43\n\x13\x61\x63tual_pickup_point\x18\x16 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12K\n\x1b\x61\x63tual_pickup_arrival_point\x18 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x34\n\x0bpickup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x19intermediate_destinations\x18\x0e \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x45\n!intermediate_destinations_version\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x1eintermediate_destination_index\x18\x0f \x01(\x05\x12^\n.actual_intermediate_destination_arrival_points\x18! \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12P\n actual_intermediate_destinations\x18\" \x03(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12<\n\rdropoff_point\x18\x07 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12\x44\n\x14\x61\x63tual_dropoff_point\x18\x17 \x01(\x0b\x32!.maps.fleetengine.v1.StopLocationB\x03\xe0\x41\x04\x12\x35\n\x0c\x64ropoff_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x13remaining_waypoints\x18\x10 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12<\n\x11vehicle_waypoints\x18\x14 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12\'\n\x05route\x18\t \x03(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x03\x12\"\n\x15\x63urrent_route_segment\x18\x15 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32..maps.fleetengine.v1.ConsumableTrafficPolylineB\x03\xe0\x41\x03\x12N\n%current_route_segment_traffic_version\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypointB\x03\xe0\x41\x03\x12\x43\n\x19remaining_distance_meters\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x03\x12>\n\x15\x65ta_to_first_waypoint\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n remaining_time_to_first_waypoint\x18\x1b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x44\n\x1bremaining_waypoints_version\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n!remaining_waypoints_route_version\x18\x1d \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14number_of_passengers\x18\n \x01(\x05\x42\x03\xe0\x41\x05\x12@\n\rlast_location\x18\x0b \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x03\x12$\n\x17last_location_snappable\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\x04view\x18\x1f \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripView\x12\x36\n\nattributes\x18# \x03(\x0b\x32\".maps.fleetengine.v1.TripAttribute:G\xea\x41\x44\n\x1f\x66leetengine.googleapis.com/Trip\x12!providers/{provider}/trips/{trip}\"\x9c\x01\n\x0cStopLocation\x12\'\n\x05point\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\tstop_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x04*\xe2\x01\n\nTripStatus\x12\x17\n\x13UNKNOWN_TRIP_STATUS\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x15\n\x11\x45NROUTE_TO_PICKUP\x10\x02\x12\x15\n\x11\x41RRIVED_AT_PICKUP\x10\x03\x12\'\n#ARRIVED_AT_INTERMEDIATE_DESTINATION\x10\x07\x12\'\n#ENROUTE_TO_INTERMEDIATE_DESTINATION\x10\x08\x12\x16\n\x12\x45NROUTE_TO_DROPOFF\x10\x04\x12\x0c\n\x08\x43OMPLETE\x10\x05\x12\x0c\n\x08\x43\x41NCELED\x10\x06*\x7f\n\x19\x42illingPlatformIdentifier\x12+\n\'BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED\x10\x00\x12\n\n\x06SERVER\x10\x01\x12\x07\n\x03WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\n\n\x06OTHERS\x10\x05*G\n\x08TripView\x12\x19\n\x15TRIP_VIEW_UNSPECIFIED\x10\x00\x12\x07\n\x03SDK\x10\x01\x12\x17\n\x13JOURNEY_SHARING_V1S\x10\x02\x42\xd1\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x05TripsP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Trip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Trip").msgclass - StopLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.StopLocation").msgclass - TripStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripStatus").enummodule - BillingPlatformIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BillingPlatformIdentifier").enummodule - TripView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TripView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb deleted file mode 100644 index 4a1949b764b4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicle_api.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/geo/type/viewport_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/maps/fleetengine/v1/header_pb' -require 'google/maps/fleetengine/v1/vehicles_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/maps/fleetengine/v1/vehicle_api.proto\x12\x13maps.fleetengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\'google/maps/fleetengine/v1/header.proto\x1a)google/maps/fleetengine/v1/vehicles.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\"\xac\x01\n\x14\x43reateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvehicle_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x05 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\"\xfb\x01\n\x11GetVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x38\n\x04name\x18\x03 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\x12\x41\n\x1d\x63urrent_route_segment_version\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11waypoints_version\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x89\x01\n\x14\x44\x65leteVehicleRequest\x12\x37\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeaderB\x03\xe0\x41\x01\x12\x38\n\x04name\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"fleetengine.googleapis.com/Vehicle\"\xc7\x01\n\x14UpdateVehicleRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa7\x01\n\x1eUpdateVehicleAttributesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12>\n\nattributes\x18\x04 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"a\n\x1fUpdateVehicleAttributesResponse\x12>\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttributeB\x03\xe0\x41\x02\"\xc6\t\n\x15SearchVehiclesRequest\x12\x32\n\x06header\x18\x01 \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0cpickup_point\x18\x04 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x03\xe0\x41\x02\x12<\n\rdropoff_point\x18\x05 \x01(\x0b\x32%.maps.fleetengine.v1.TerminalLocation\x12!\n\x14pickup_radius_meters\x18\x06 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05\x63ount\x18\x07 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10minimum_capacity\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x36\n\ntrip_types\x18\t \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12\x34\n\x11maximum_staleness\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\rvehicle_types\x18\x0e \x03(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x42\n\x13required_attributes\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12M\n\x1arequired_one_of_attributes\x18\x0f \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12Q\n\x1erequired_one_of_attribute_sets\x18\x14 \x03(\x0b\x32).maps.fleetengine.v1.VehicleAttributeList\x12S\n\x08order_by\x18\r \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrderB\x03\xe0\x41\x02\x12\x1c\n\x14include_back_to_back\x18\x12 \x01(\x08\x12\x0f\n\x07trip_id\x18\x13 \x01(\t\x12]\n\x15\x63urrent_trips_present\x18\x15 \x01(\x0e\x32>.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent\x12\x13\n\x06\x66ilter\x18\x16 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x11VehicleMatchOrder\x12\x1f\n\x1bUNKNOWN_VEHICLE_MATCH_ORDER\x10\x00\x12\x14\n\x10PICKUP_POINT_ETA\x10\x01\x12\x19\n\x15PICKUP_POINT_DISTANCE\x10\x02\x12\x15\n\x11\x44ROPOFF_POINT_ETA\x10\x03\x12\"\n\x1ePICKUP_POINT_STRAIGHT_DISTANCE\x10\x04\x12\x08\n\x04\x43OST\x10\x05\"O\n\x13\x43urrentTripsPresent\x12%\n!CURRENT_TRIPS_PRESENT_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03\x41NY\x10\x02\"L\n\x16SearchVehiclesResponse\x12\x32\n\x07matches\x18\x01 \x03(\x0b\x32!.maps.fleetengine.v1.VehicleMatch\"\xfe\x04\n\x13ListVehiclesRequest\x12\x32\n\x06header\x18\x0c \x01(\x0b\x32\".maps.fleetengine.v1.RequestHeader\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x35\n\x10minimum_capacity\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\ntrip_types\x18\x07 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x34\n\x11maximum_staleness\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12W\n\x17vehicle_type_categories\x18\t \x03(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.CategoryB\x03\xe0\x41\x02\x12\x1b\n\x13required_attributes\x18\n \x03(\t\x12\"\n\x1arequired_one_of_attributes\x18\r \x03(\t\x12&\n\x1erequired_one_of_attribute_sets\x18\x0f \x03(\t\x12\x38\n\rvehicle_state\x18\x0b \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12\x14\n\x0con_trip_only\x18\x0e \x01(\x08\x12\x13\n\x06\x66ilter\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x08viewport\x18\x11 \x01(\x0b\x32\x19.google.geo.type.ViewportB\x03\xe0\x41\x01\"x\n\x14ListVehiclesResponse\x12.\n\x08vehicles\x18\x01 \x03(\x0b\x32\x1c.maps.fleetengine.v1.Vehicle\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x17\n\ntotal_size\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\"Y\n\x08Waypoint\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12\'\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfe\x06\n\x0cVehicleMatch\x12\x32\n\x07vehicle\x18\x01 \x01(\x0b\x32\x1c.maps.fleetengine.v1.VehicleB\x03\xe0\x41\x02\x12\x36\n\x12vehicle_pickup_eta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x1evehicle_pickup_distance_meters\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12V\n,vehicle_pickup_straight_line_distance_meters\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\x12\x37\n\x13vehicle_dropoff_eta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n)vehicle_pickup_to_dropoff_distance_meters\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x35\n\ttrip_type\x18\x06 \x01(\x0e\x32\x1d.maps.fleetengine.v1.TripTypeB\x03\xe0\x41\x02\x12>\n\x17vehicle_trips_waypoints\x18\x07 \x03(\x0b\x32\x1d.maps.fleetengine.v1.Waypoint\x12N\n\x12vehicle_match_type\x18\x08 \x01(\x0e\x32\x32.maps.fleetengine.v1.VehicleMatch.VehicleMatchType\x12Z\n\x14requested_ordered_by\x18\t \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\x12P\n\nordered_by\x18\n \x01(\x0e\x32<.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder\"g\n\x10VehicleMatchType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tEXCLUSIVE\x10\x01\x12\x10\n\x0c\x42\x41\x43K_TO_BACK\x10\x02\x12\x0b\n\x07\x43\x41RPOOL\x10\x03\x12\x18\n\x14\x43\x41RPOOL_BACK_TO_BACK\x10\x04\"Q\n\x14VehicleAttributeList\x12\x39\n\nattributes\x18\x01 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute2\xa2\x0b\n\x0eVehicleService\x12\xb7\x01\n\rCreateVehicle\x12).maps.fleetengine.v1.CreateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"]\x82\xd3\xe4\x93\x02,\"!/v1/{parent=providers/*}/vehicles:\x07vehicle\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xa6\x01\n\nGetVehicle\x12&.maps.fleetengine.v1.GetVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"R\x82\xd3\xe4\x93\x02#\x12!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xad\x01\n\rDeleteVehicle\x12).maps.fleetengine.v1.DeleteVehicleRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=providers/*/vehicles/*}\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb5\x01\n\rUpdateVehicle\x12).maps.fleetengine.v1.UpdateVehicleRequest\x1a\x1c.maps.fleetengine.v1.Vehicle\"[\x82\xd3\xe4\x93\x02,\x1a!/v1/{name=providers/*/vehicles/*}:\x07vehicle\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xec\x01\n\x17UpdateVehicleAttributes\x12\x33.maps.fleetengine.v1.UpdateVehicleAttributesRequest\x1a\x34.maps.fleetengine.v1.UpdateVehicleAttributesResponse\"f\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=providers/*/vehicles/*}:updateAttributes:\x01*\x8a\xd3\xe4\x93\x02#\x12!\n\x04name\x12\x19{provider_id=providers/*}\x12\xb9\x01\n\x0cListVehicles\x12(.maps.fleetengine.v1.ListVehiclesRequest\x1a).maps.fleetengine.v1.ListVehiclesResponse\"T\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=providers/*}/vehicles\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x12\xc9\x01\n\x0eSearchVehicles\x12*.maps.fleetengine.v1.SearchVehiclesRequest\x1a+.maps.fleetengine.v1.SearchVehiclesResponse\"^\x82\xd3\xe4\x93\x02-\"(/v1/{parent=providers/*}/vehicles:search:\x01*\x8a\xd3\xe4\x93\x02%\x12#\n\x06parent\x12\x19{provider_id=providers/*}\x1aN\xca\x41\x1a\x66leetengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n\x1e\x63om.google.maps.fleetengine.v1B\nVehicleApiP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - CreateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.CreateVehicleRequest").msgclass - GetVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.GetVehicleRequest").msgclass - DeleteVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeleteVehicleRequest").msgclass - UpdateVehicleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleRequest").msgclass - UpdateVehicleAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesRequest").msgclass - UpdateVehicleAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.UpdateVehicleAttributesResponse").msgclass - SearchVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest").msgclass - SearchVehiclesRequest::VehicleMatchOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder").enummodule - SearchVehiclesRequest::CurrentTripsPresent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent").enummodule - SearchVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.SearchVehiclesResponse").msgclass - ListVehiclesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesRequest").msgclass - ListVehiclesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.ListVehiclesResponse").msgclass - Waypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Waypoint").msgclass - VehicleMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch").msgclass - VehicleMatch::VehicleMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleMatch.VehicleMatchType").enummodule - VehicleAttributeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleAttributeList").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb deleted file mode 100644 index 31ee1908cafc..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/maps/fleetengine/v1/vehicle_api.proto for package 'Google.Maps.FleetEngine.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/maps/fleetengine/v1/vehicle_api_pb' - -module Google - module Maps - module FleetEngine - module V1 - module VehicleService - # Vehicle management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'maps.fleetengine.v1.VehicleService' - - # Instantiates a new vehicle associated with an on-demand rideshare or - # deliveries provider. Each `Vehicle` must have a unique vehicle ID. - # - # The following `Vehicle` fields are required when creating a `Vehicle`: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # The following `Vehicle` fields are ignored when creating a `Vehicle`: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - rpc :CreateVehicle, ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Returns a vehicle from the Fleet Engine. - rpc :GetVehicle, ::Google::Maps::FleetEngine::V1::GetVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Deletes a Vehicle from the Fleet Engine. - # - # Returns FAILED_PRECONDITION if the Vehicle has active Trips. - # assigned to it. - rpc :DeleteVehicle, ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, ::Google::Protobuf::Empty - # Writes updated vehicle data to the Fleet Engine. - # - # When updating a `Vehicle`, the following fields cannot be updated since - # they are managed by the server: - # - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment_version` - # * `waypoints_version` - # - # The vehicle `name` also cannot be updated. - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. Likewise, - # the `waypoints` field can be updated, but must contain all the waypoints - # currently on the vehicle, and no other waypoints. - rpc :UpdateVehicle, ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, ::Google::Maps::FleetEngine::V1::Vehicle - # Partially updates a vehicle's attributes. - # Only the attributes mentioned in the request will be updated, other - # attributes will NOT be altered. Note: this is different in `UpdateVehicle`, - # where the whole `attributes` field will be replaced by the one in - # `UpdateVehicleRequest`, attributes not in the request would be removed. - rpc :UpdateVehicleAttributes, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse - # Returns a paginated list of vehicles associated with - # a provider that match the request options. - rpc :ListVehicles, ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, ::Google::Maps::FleetEngine::V1::ListVehiclesResponse - # Returns a list of vehicles that match the request options. - rpc :SearchVehicles, ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb b/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb deleted file mode 100644 index 91a8f67ad59d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/lib/google/maps/fleetengine/v1/vehicles_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/maps/fleetengine/v1/vehicles.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/maps/fleetengine/v1/fleetengine_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n)google/maps/fleetengine/v1/vehicles.proto\x12\x13maps.fleetengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/maps/fleetengine/v1/fleetengine.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\x0c\n\x07Vehicle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rvehicle_state\x18\x02 \x01(\x0e\x32!.maps.fleetengine.v1.VehicleState\x12;\n\x14supported_trip_types\x18\x03 \x03(\x0e\x32\x1d.maps.fleetengine.v1.TripType\x12\x1a\n\rcurrent_trips\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12;\n\rlast_location\x18\x05 \x01(\x0b\x32$.maps.fleetengine.v1.VehicleLocation\x12\x41\n\x0epast_locations\x18\x1e \x03(\x0b\x32$.maps.fleetengine.v1.VehicleLocationB\x03\xe0\x41\x04\x12\x18\n\x10maximum_capacity\x18\x06 \x01(\x05\x12\x39\n\nattributes\x18\x08 \x03(\x0b\x32%.maps.fleetengine.v1.VehicleAttribute\x12\x43\n\x0cvehicle_type\x18\t \x01(\x0b\x32(.maps.fleetengine.v1.Vehicle.VehicleTypeB\x03\xe0\x41\x02\x12\x38\n\rlicense_plate\x18\n \x01(\x0b\x32!.maps.fleetengine.v1.LicensePlate\x12\x38\n\x05route\x18\x0c \x03(\x0b\x32%.maps.fleetengine.v1.TerminalLocationB\x02\x18\x01\x12\x1d\n\x15\x63urrent_route_segment\x18\x14 \x01(\t\x12T\n\x1d\x63urrent_route_segment_traffic\x18\x1c \x01(\x0b\x32(.maps.fleetengine.v1.TrafficPolylineDataB\x03\xe0\x41\x04\x12\x46\n\x1d\x63urrent_route_segment_version\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x1f\x63urrent_route_segment_end_point\x18\x18 \x01(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12>\n\x19remaining_distance_meters\x18\x12 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x15\x65ta_to_first_waypoint\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x16remaining_time_seconds\x18\x19 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x04\x12\x34\n\twaypoints\x18\x16 \x03(\x0b\x32!.maps.fleetengine.v1.TripWaypoint\x12:\n\x11waypoints_version\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x14\x62\x61\x63k_to_back_enabled\x18\x17 \x01(\x08\x12@\n\x11navigation_status\x18\x1a \x01(\x0e\x32%.maps.fleetengine.v1.NavigationStatus\x12\x41\n\x0f\x64\x65vice_settings\x18\x1b \x01(\x0b\x32#.maps.fleetengine.v1.DeviceSettingsB\x03\xe0\x41\x04\x1a\xb8\x01\n\x0bVehicleType\x12\x43\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x31.maps.fleetengine.v1.Vehicle.VehicleType.Category\"d\n\x08\x43\x61tegory\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04TAXI\x10\x02\x12\t\n\x05TRUCK\x10\x03\x12\x0f\n\x0bTWO_WHEELER\x10\x04\x12\x0b\n\x07\x42ICYCLE\x10\x05\x12\x0e\n\nPEDESTRIAN\x10\x06:P\xea\x41M\n\"fleetengine.googleapis.com/Vehicle\x12\'providers/{provider}/vehicles/{vehicle}\"\x9d\x01\n\x0b\x42\x61tteryInfo\x12:\n\x0e\x62\x61ttery_status\x18\x01 \x01(\x0e\x32\".maps.fleetengine.v1.BatteryStatus\x12\x36\n\x0cpower_source\x18\x02 \x01(\x0e\x32 .maps.fleetengine.v1.PowerSource\x12\x1a\n\x12\x62\x61ttery_percentage\x18\x03 \x01(\x02\"\xca\x01\n\x0e\x44\x65viceSettings\x12L\n\x18location_power_save_mode\x18\x01 \x01(\x0e\x32*.maps.fleetengine.v1.LocationPowerSaveMode\x12\x1a\n\x12is_power_save_mode\x18\x02 \x01(\x08\x12\x16\n\x0eis_interactive\x18\x03 \x01(\x08\x12\x36\n\x0c\x62\x61ttery_info\x18\x04 \x01(\x0b\x32 .maps.fleetengine.v1.BatteryInfo\"A\n\x0cLicensePlate\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elast_character\x18\x02 \x01(\t\"\xf6\x02\n$VisualTrafficReportPolylineRendering\x12`\n\x0croad_stretch\x18\x01 \x03(\x0b\x32\x45.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretchB\x03\xe0\x41\x01\x1a\xeb\x01\n\x0bRoadStretch\x12_\n\x05style\x18\x01 \x01(\x0e\x32K.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.StyleB\x03\xe0\x41\x02\x12\x1a\n\roffset_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rlength_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"C\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLOWER_TRAFFIC\x10\x01\x12\x0f\n\x0bTRAFFIC_JAM\x10\x02\"k\n\x13TrafficPolylineData\x12T\n\x11traffic_rendering\x18\x01 \x01(\x0b\x32\x39.maps.fleetengine.v1.VisualTrafficReportPolylineRendering*B\n\x0cVehicleState\x12\x19\n\x15UNKNOWN_VEHICLE_STATE\x10\x00\x12\x0b\n\x07OFFLINE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\x92\x02\n\x15LocationPowerSaveMode\x12$\n UNKNOWN_LOCATION_POWER_SAVE_MODE\x10\x00\x12\x1b\n\x17LOCATION_MODE_NO_CHANGE\x10\x01\x12.\n*LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF\x10\x02\x12.\n*LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\x10\x03\x12!\n\x1dLOCATION_MODE_FOREGROUND_ONLY\x10\x04\x12\x33\n/LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF\x10\x05*\xc0\x01\n\rBatteryStatus\x12\x1a\n\x16UNKNOWN_BATTERY_STATUS\x10\x00\x12\x1b\n\x17\x42\x41TTERY_STATUS_CHARGING\x10\x01\x12\x1e\n\x1a\x42\x41TTERY_STATUS_DISCHARGING\x10\x02\x12\x17\n\x13\x42\x41TTERY_STATUS_FULL\x10\x03\x12\x1f\n\x1b\x42\x41TTERY_STATUS_NOT_CHARGING\x10\x04\x12\x1c\n\x18\x42\x41TTERY_STATUS_POWER_LOW\x10\x05*\x89\x01\n\x0bPowerSource\x12\x18\n\x14UNKNOWN_POWER_SOURCE\x10\x00\x12\x13\n\x0fPOWER_SOURCE_AC\x10\x01\x12\x14\n\x10POWER_SOURCE_USB\x10\x02\x12\x19\n\x15POWER_SOURCE_WIRELESS\x10\x03\x12\x1a\n\x16POWER_SOURCE_UNPLUGGED\x10\x04\x42\xd4\x01\n\x1e\x63om.google.maps.fleetengine.v1B\x08VehiclesP\x01ZFcloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb\xa2\x02\x03\x43\x46\x45\xaa\x02\x1aGoogle.Maps.FleetEngine.V1\xca\x02\x1aGoogle\\Maps\\FleetEngine\\V1\xea\x02\x1dGoogle::Maps::FleetEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Maps - module FleetEngine - module V1 - Vehicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle").msgclass - Vehicle::VehicleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType").msgclass - Vehicle::VehicleType::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.Vehicle.VehicleType.Category").enummodule - BatteryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryInfo").msgclass - DeviceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.DeviceSettings").msgclass - LicensePlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LicensePlate").msgclass - VisualTrafficReportPolylineRendering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering").msgclass - VisualTrafficReportPolylineRendering::RoadStretch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch").msgclass - VisualTrafficReportPolylineRendering::RoadStretch::Style = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style").enummodule - TrafficPolylineData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.TrafficPolylineData").msgclass - VehicleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.VehicleState").enummodule - LocationPowerSaveMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.LocationPowerSaveMode").enummodule - BatteryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.BatteryStatus").enummodule - PowerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("maps.fleetengine.v1.PowerSource").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md deleted file mode 100644 index faf4842e7c03..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Local Rides and Deliveries 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-maps-fleet_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb deleted file mode 100644 index f387552a7073..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/geo/type/viewport.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Geo - module Type - # A latitude-longitude viewport, represented as two diagonally opposite `low` - # and `high` points. A viewport is considered a closed region, i.e. it includes - # its boundary. The latitude bounds must range between -90 to 90 degrees - # inclusive, and the longitude bounds must range between -180 to 180 degrees - # inclusive. Various cases include: - # - # - If `low` = `high`, the viewport consists of that single point. - # - # - If `low.longitude` > `high.longitude`, the longitude range is inverted - # (the viewport crosses the 180 degree longitude line). - # - # - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, - # the viewport includes all longitudes. - # - # - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, - # the longitude range is empty. - # - # - If `low.latitude` > `high.latitude`, the latitude range is empty. - # - # Both `low` and `high` must be populated, and the represented box cannot be - # empty (as specified by the definitions above). An empty viewport will result - # in an error. - # - # For example, this viewport fully encloses New York City: - # - # { - # "low": { - # "latitude": 40.477398, - # "longitude": -74.259087 - # }, - # "high": { - # "latitude": 40.91618, - # "longitude": -73.70018 - # } - # } - # @!attribute [rw] low - # @return [::Google::Type::LatLng] - # Required. The low point of the viewport. - # @!attribute [rw] high - # @return [::Google::Type::LatLng] - # Required. The high point of the viewport. - class Viewport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb deleted file mode 100644 index 9855fd75847c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +++ /dev/null @@ -1,394 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use - # `TerminalLocation.point` instead. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] place_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `place_id`, `generated_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generated_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # - # Note: The following fields are mutually exclusive: `generated_id`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - class TerminalPointId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the location of a waypoint. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the location of a trip waypoint. - # @!attribute [rw] terminal_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::TerminalPointId] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] access_point_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Specify the `point` field instead. - # @!attribute [rw] trip_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated. - # @!attribute [rw] terminal_location_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # Deprecated: `Vehicle.waypoint` will have this data. - class TerminalLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a stopping point on a vehicle's route or an ending point on a - # vehicle's trip. - # @!attribute [rw] location - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The location of this waypoint. - # @!attribute [rw] trip_id - # @return [::String] - # The trip associated with this waypoint. - # @!attribute [rw] waypoint_type - # @return [::Google::Maps::FleetEngine::V1::WaypointType] - # The role this waypoint plays in this trip, such as pickup or dropoff. - # @!attribute [rw] path_to_waypoint - # @return [::Array<::Google::Type::LatLng>] - # The path from the previous waypoint to the current waypoint. Undefined for - # the first waypoint in a list. This field is only populated when requested. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The encoded path from the previous waypoint to the current waypoint. - # - #

Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [rw] traffic_to_waypoint - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # The traffic conditions along the path to this waypoint. Note that traffic - # is only available for Google Map Platform Rides and Deliveries Solution - # customers. - # @!attribute [rw] distance_meters - # @return [::Google::Protobuf::Int32Value] - # The path distance from the previous waypoint to the current waypoint. - # Undefined for the first waypoint in a list. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time of arrival at this waypoint. Undefined for the first - # waypoint in a list. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The travel time from previous waypoint to this point. Undefined for the - # first waypoint in a list. - class TripWaypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a vehicle attribute as a key-value pair. The "key:value" string - # length cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] value - # @return [::String] - # The attribute's value. - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: This is identical to the `value` field which will eventually be - # deprecated. For create or update methods, either field can be used, but - # it's strongly recommended to use `string_value`. If both `string_value` - # and `value` are set, they must be identical or an error will be thrown. - # Both fields are populated in responses. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VehicleAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location, speed, and heading of a vehicle at a point in time. - # @!attribute [rw] location - # @return [::Google::Type::LatLng] - # The location of the vehicle. - # When it is sent to Fleet Engine, the vehicle's location is a GPS location. - # When you receive it in a response, the vehicle's location can be either a - # GPS location, a supplemental location, or some other estimated location. - # The source is specified in `location_sensor`. - # @!attribute [rw] horizontal_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `latlng_accuracy` instead. - # @!attribute [rw] latlng_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `location` in meters as a radius. - # @!attribute [rw] heading - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees. 0 represents North. - # The valid range is [0,360). - # @!attribute [rw] bearing_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `heading_accuracy` instead. - # @!attribute [rw] heading_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `heading` in degrees. - # @!attribute [rw] altitude - # @return [::Google::Protobuf::DoubleValue] - # Altitude in meters above WGS84. - # @!attribute [rw] vertical_accuracy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::DoubleValue] - # Deprecated: Use `altitude_accuracy` instead. - # @!attribute [rw] altitude_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `altitude` in meters. - # @!attribute [rw] speed_kmph - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Speed of the vehicle in kilometers per hour. - # Deprecated: Use `speed` instead. - # @!attribute [rw] speed - # @return [::Google::Protobuf::DoubleValue] - # Speed of the vehicle in meters/second - # @!attribute [rw] speed_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `speed` in meters/second. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when `location` was reported by the sensor according to the - # sensor's clock. - # @!attribute [r] server_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the server received the location information. - # @!attribute [rw] location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Provider of location data (for example, `GPS`). - # @!attribute [rw] is_road_snapped - # @return [::Google::Protobuf::BoolValue] - # Whether `location` is snapped to a road. - # @!attribute [rw] is_gps_sensor_enabled - # @return [::Google::Protobuf::BoolValue] - # Input only. Indicates whether the GPS sensor is enabled on the mobile - # device. - # @!attribute [rw] time_since_update - # @return [::Google::Protobuf::Int32Value] - # Input only. Time (in seconds) since this location was first sent to the - # server. This will be zero for the first update. If the time is unknown (for - # example, when the app restarts), this value resets to zero. - # @!attribute [rw] num_stale_updates - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Int32Value] - # Input only. Deprecated: Other signals are now used to determine if a - # location is stale. - # @!attribute [rw] raw_location - # @return [::Google::Type::LatLng] - # Raw vehicle location (unprocessed by road-snapper). - # @!attribute [rw] raw_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the raw location. - # @!attribute [rw] raw_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the raw location. Defaults to `GPS`. - # @!attribute [rw] raw_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `raw_location` as a radius, in meters. - # @!attribute [rw] flp_location - # @return [::Google::Type::LatLng] - # The location from Android's Fused Location Provider. - # @!attribute [rw] flp_update_time - # @return [::Google::Protobuf::Timestamp] - # Update timestamp of `flp_location`. - # @!attribute [rw] flp_latlng_accuracy_meters - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `flp_location` in meters as a radius. - # @!attribute [rw] flp_heading_degrees - # @return [::Google::Protobuf::Int32Value] - # Direction the vehicle is moving in degrees, as determined by the Fused - # Location Provider. 0 represents North. The valid range is [0,360). - # @!attribute [rw] supplemental_location - # @return [::Google::Type::LatLng] - # Supplemental location provided by the integrating app. - # @!attribute [rw] supplemental_location_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp associated with the supplemental location. - # @!attribute [rw] supplemental_location_sensor - # @return [::Google::Maps::FleetEngine::V1::LocationSensor] - # Source of the supplemental location. Defaults to - # `CUSTOMER_SUPPLIED_LOCATION`. - # @!attribute [rw] supplemental_location_accuracy - # @return [::Google::Protobuf::DoubleValue] - # Accuracy of `supplemental_location` as a radius, in meters. - # @!attribute [rw] road_snapped - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: Use `is_road_snapped` instead. - class VehicleLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a trip attribute as a key-value pair. The "key:value" string length - # cannot exceed 256 characters. - # @!attribute [rw] key - # @return [::String] - # The attribute's key. Keys may not contain the colon character (:). - # @!attribute [rw] string_value - # @return [::String] - # String typed attribute value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean typed attribute value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Double typed attribute value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TripAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of a trip. - module TripType - # Default, used for unspecified or unrecognized trip types. - UNKNOWN_TRIP_TYPE = 0 - - # The trip may share a vehicle with other trips. - SHARED = 1 - - # The trip is exclusive to a vehicle. - EXCLUSIVE = 2 - end - - # The type of waypoint. - module WaypointType - # Unknown or unspecified waypoint type. - UNKNOWN_WAYPOINT_TYPE = 0 - - # Waypoints for picking up riders or items. - PICKUP_WAYPOINT_TYPE = 1 - - # Waypoints for dropping off riders or items. - DROP_OFF_WAYPOINT_TYPE = 2 - - # Waypoints for intermediate destinations in a multi-destination trip. - INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3 - end - - # The type of polyline format. - module PolylineFormatType - # The format is unspecified or unknown. - UNKNOWN_FORMAT_TYPE = 0 - - # A list of `google.type.LatLng`. - LAT_LNG_LIST_TYPE = 1 - - # A polyline encoded with a polyline compression algorithm. Decoding is not - # yet supported. - ENCODED_POLYLINE_TYPE = 2 - end - - # The vehicle's navigation status. - module NavigationStatus - # Unspecified navigation status. - UNKNOWN_NAVIGATION_STATUS = 0 - - # The Driver app's navigation is in `FREE_NAV` mode. - NO_GUIDANCE = 1 - - # Turn-by-turn navigation is available and the Driver app navigation has - # entered `GUIDED_NAV` mode. - ENROUTE_TO_DESTINATION = 2 - - # The vehicle has gone off the suggested route. - OFF_ROUTE = 3 - - # The vehicle is within approximately 50m of the destination. - ARRIVED_AT_DESTINATION = 4 - end - - # The sensor or methodology used to determine the location. - module LocationSensor - # The sensor is unspecified or unknown. - UNKNOWN_SENSOR = 0 - - # GPS or Assisted GPS. - GPS = 1 - - # Assisted GPS, cell tower ID, or WiFi access point. - NETWORK = 2 - - # Cell tower ID or WiFi access point. - PASSIVE = 3 - - # A location determined by the mobile device to be the most likely - # road position. - ROAD_SNAPPED_LOCATION_PROVIDER = 4 - - # A customer-supplied location from an independent source. Typically, this - # value is used for a location provided from sources other than the mobile - # device running Driver SDK. If the original source is described by one of - # the other enum values, use that value. Locations marked - # CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's - # `last_location.supplemental_location_sensor`. - CUSTOMER_SUPPLIED_LOCATION = 5 - - # A location calculated by Fleet Engine based on the signals available to it. - # Output only. This value will be rejected if it is received in a request. - FLEET_ENGINE_LOCATION = 6 - - # Android's Fused Location Provider. - FUSED_LOCATION_PROVIDER = 100 - - # The location provider on Apple operating systems. - CORE_LOCATION = 200 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.rb deleted file mode 100644 index dbc08c7760c6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/header.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 Maps - module FleetEngine - module V1 - # A RequestHeader contains fields common to all Fleet Engine RPC requests. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as en-US or sr-Latn. For more information, - # see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - # is specified, the response may be in any language, with a preference for - # English if such a name exists. Field value example: `en-US`. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the region where the request originates. - # Field value example: `US`. - # @!attribute [rw] sdk_version - # @return [::String] - # Version of the calling SDK, if applicable. - # The version format is "major.minor.patch", example: `1.1.2`. - # @!attribute [rw] os_version - # @return [::String] - # Version of the operating system on which the calling SDK is running. - # Field value examples: `4.4.1`, `12.1`. - # @!attribute [rw] device_model - # @return [::String] - # Model of the device on which the calling SDK is running. - # Field value examples: `iPhone12,1`, `SM-G920F`. - # @!attribute [rw] sdk_type - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::SdkType] - # The type of SDK sending the request. - # @!attribute [rw] maps_sdk_version - # @return [::String] - # Version of the MapSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `5.2.1`. - # @!attribute [rw] nav_sdk_version - # @return [::String] - # Version of the NavSDK which the calling SDK depends on, if applicable. - # The version format is "major.minor.patch", example: `2.1.0`. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::RequestHeader::Platform] - # Platform of the calling SDK. - # @!attribute [rw] manufacturer - # @return [::String] - # Manufacturer of the Android device from the calling SDK, only applicable - # for the Android SDKs. - # Field value example: `Samsung`. - # @!attribute [rw] android_api_level - # @return [::Integer] - # Android API level of the calling SDK, only applicable for the Android SDKs. - # Field value example: `23`. - # @!attribute [rw] trace_id - # @return [::String] - # Optional ID that can be provided for logging purposes in order to identify - # the request. - class RequestHeader - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of SDK. - module SdkType - # The default value. This value is used if the `sdk_type` is omitted. - SDK_TYPE_UNSPECIFIED = 0 - - # The calling SDK is Consumer. - CONSUMER = 1 - - # The calling SDK is Driver. - DRIVER = 2 - - # The calling SDK is JavaScript. - JAVASCRIPT = 3 - end - - # The platform of the calling SDK. - module Platform - # The default value. This value is used if the platform is omitted. - PLATFORM_UNSPECIFIED = 0 - - # The request is coming from Android. - ANDROID = 1 - - # The request is coming from iOS. - IOS = 2 - - # The request is coming from the web. - WEB = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb deleted file mode 100644 index 024d9a7221d4..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/traffic.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Traffic density indicator on a contiguous segment of a path. Given a path - # with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval - # defines an interval and describes its traffic using the following categories. - # @!attribute [rw] start_polyline_point_index - # @return [::Integer] - # The starting index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] end_polyline_point_index - # @return [::Integer] - # The ending index of this interval in the path. - # In JSON, when the index is 0, the field will appear to be unpopulated. - # @!attribute [rw] speed - # @return [::Google::Maps::FleetEngine::V1::SpeedReadingInterval::Speed] - # Traffic speed in this interval. - class SpeedReadingInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The classification of polyline speed based on traffic data. - module Speed - # Default value. This value is unused. - SPEED_UNSPECIFIED = 0 - - # Normal speed, no traffic delays. - NORMAL = 1 - - # Slowdown detected, medium amount of traffic. - SLOW = 2 - - # Traffic delays. - TRAFFIC_JAM = 3 - end - end - - # Traffic density along a Vehicle's path. - # @!attribute [rw] speed_reading_interval - # @return [::Array<::Google::Maps::FleetEngine::V1::SpeedReadingInterval>] - # Traffic speed along the path from the previous waypoint to the current - # waypoint. - # @!attribute [rw] encoded_path_to_waypoint - # @return [::String] - # The path the driver is taking from the previous waypoint to the current - # waypoint. This path has landmarks in it so clients can show traffic markers - # along the path (see `speed_reading_interval`). Decoding is not yet - # supported. - class ConsumableTrafficPolyline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb deleted file mode 100644 index 4bf45f469f13..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trip_api.rb +++ /dev/null @@ -1,312 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # CreateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] trip_id - # @return [::String] - # Required. Unique Trip ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. Trip entity to create. - # - # When creating a Trip, the following fields are required: - # - # * `trip_type` - # * `pickup_point` - # - # The following fields are used if you provide them: - # - # * `number_of_passengers` - # * `vehicle_id` - # * `dropoff_point` - # * `intermediate_destinations` - # * `vehicle_waypoints` - # - # All other Trip fields are ignored. For example, all trips start with a - # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in - # the creation request. - # - # Only `EXCLUSIVE` trips support `intermediate_destinations`. - # - # When `vehicle_id` is set for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints for the vehicle, otherwise the waypoint order will be - # undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - class CreateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that should be returned and their interpretation. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Trip.route` or - # `Trip.current_route_segment` data are retrieved. If route data are - # unchanged since this timestamp, the route field is not set in the response. - # If a minimum is unspecified, the route data are always retrieved. - # @!attribute [rw] remaining_waypoints_version - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated: `Trip.remaining_waypoints` are always retrieved. Use - # `remaining_waypoints_route_version` to control when - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. - # @!attribute [rw] route_format_type - # @return [::Google::Maps::FleetEngine::V1::PolylineFormatType] - # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), - # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default - # is `LAT_LNG_LIST_TYPE`. - # @!attribute [rw] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.current_route_segment_traffic` is retrieved. If traffic data are - # unchanged since this timestamp, the `current_route_segment_traffic` field - # is not set in the response. If a minimum is unspecified, the traffic data - # are always retrieved. Note that traffic is only available for On-Demand - # Rides and Deliveries Solution customers. - # @!attribute [rw] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Trip.remaining_waypoints.traffic_to_waypoint` and - # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are - # unchanged since this timestamp, the fields above are - # not set in the response. If `remaining_waypoints_route_version` is - # unspecified, traffic and path are always retrieved. - class GetTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/trips/{trip}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReportBillableTrip request message. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/billableTrips/{billable_trip}`. The - # provider must be the Project ID (for example, `sample-cloud-project`) of - # the Google Cloud Project of which the service account making this call is a - # member. - # @!attribute [rw] country_code - # @return [::String] - # Required. Two letter country code of the country where the trip takes - # place. Price is defined according to country code. - # @!attribute [rw] platform - # @return [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier] - # The platform upon which the request was issued. - # @!attribute [rw] related_ids - # @return [::Array<::String>] - # The identifiers that are directly related to the trip being reported. These - # are usually IDs (for example, session IDs) of pre-booking operations done - # before the trip ID is available. The number of `related_ids` is - # limited to 50. - # @!attribute [rw] solution_type - # @return [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType] - # The type of GMP product solution (for example, - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip. - class ReportBillableTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Selector for different solution types of a reported trip. - module SolutionType - # The default value. For backwards-compatibility, the API will use - # `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first - # supported solution type. - SOLUTION_TYPE_UNSPECIFIED = 0 - - # The solution is an on-demand ridesharing and deliveries trip. - ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1 - end - end - - # UpdateTrip request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/trips/{trip}`. The provider must - # be the Project ID (for example, `sample-consumer-project`) of the Google - # Cloud Project of which the service account making this call is a member. - # @!attribute [rw] trip - # @return [::Google::Maps::FleetEngine::V1::Trip] - # Required. The Trip associated with the update. - # - # The following fields are maintained by the Fleet Engine. Do not update - # them using Trip.update. - # - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_traffic` - # * `current_route_segment_traffic_version` - # * `current_route_segment_version` - # * `dropoff_time` - # * `eta_to_next_waypoint` - # * `intermediate_destinations_version` - # * `last_location` - # * `name` - # * `number_of_passengers` - # * `pickup_time` - # * `remaining_distance_meters` - # * `remaining_time_to_first_waypoint` - # * `remaining_waypoints` - # * `remaining_waypoints_version` - # * `route` - # - # When you update the `Trip.vehicle_id` for a shared trip, you must supply - # the list of `Trip.vehicle_waypoints` to specify the order of the remaining - # waypoints, otherwise the order will be undetermined. - # - # When you specify `Trip.vehicle_waypoints`, the list must contain all - # the remaining waypoints of the vehicle's trips, with no extra waypoints. - # You must order these waypoints such that for a given trip, the pickup - # point is before intermediate destinations, and all intermediate - # destinations come before the drop-off point. An `EXCLUSIVE` trip's - # waypoints must not interleave with any other trips. - # The `trip_id`, `waypoint_type` and `location` fields are used, and all - # other TripWaypoint fields in `vehicle_waypoints` are ignored. - # - # To avoid a race condition for trips with multiple destinations, you - # should provide `Trip.intermediate_destinations_version` when updating - # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The - # `Trip.intermediate_destinations_version` passed must be consistent with - # Fleet Engine's version. If it isn't, the request fails. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field mask indicating which fields in Trip to update. - # The `update_mask` must contain at least one field. - class UpdateTripRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # The vehicle associated with the trips in the request. If unspecified, the - # returned trips do not contain: - # - # * `current_route_segment` - # * `remaining_waypoints` - # * `remaining_distance_meters` - # * `eta_to_first_waypoint` - # @!attribute [rw] active_trips_only - # @return [::Boolean] - # If set to true, the response includes Trips that influence a driver's - # route. - # @!attribute [rw] page_size - # @return [::Integer] - # If not set, the server decides the number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # Set this to a value previously returned in the `SearchTripsResponse` to - # continue from previous results. - # @!attribute [rw] minimum_staleness - # @return [::Google::Protobuf::Duration] - # If specified, returns the trips that have not been updated after the time - # `(current - minimum_staleness)`. - class SearchTripsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SearchTrips response message. - # @!attribute [rw] trips - # @return [::Array<::Google::Maps::FleetEngine::V1::Trip>] - # The list of trips for the requested vehicle. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token in the SearchTripsRequest to page through list results. The - # API returns a trip list on each call, and when no more results remain the - # trip list is empty. - class SearchTripsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb deleted file mode 100644 index e5dd08d4fdac..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/trips.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Trip metadata. - # @!attribute [r] name - # @return [::String] - # Output only. In the format "providers/\\{provider}/trips/\\{trip}" - # @!attribute [rw] vehicle_id - # @return [::String] - # ID of the vehicle making this trip. - # @!attribute [rw] trip_status - # @return [::Google::Maps::FleetEngine::V1::TripStatus] - # Current status of the trip. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # The type of the trip. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be picked up. - # @!attribute [rw] actual_pickup_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual location when and where customer was picked up. - # This field is for provider to provide feedback on actual pickup - # information. - # @!attribute [rw] actual_pickup_arrival_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location of the driver arrival at - # the pickup point. - # This field is for provider to provide feedback on actual arrival - # information at the pickup point. - # @!attribute [r] pickup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # picked up, or the actual time when they were picked up. - # @!attribute [rw] intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Intermediate stops in order that the trip requests (in addition - # to pickup and dropoff). Initially this will not be supported for shared - # trips. - # @!attribute [rw] intermediate_destinations_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the last time the `intermediate_destinations` was modified. - # Your server should cache this value and pass it in `UpdateTripRequest` - # when update `intermediate_destination_index` to ensure the - # `intermediate_destinations` is not changed. - # @!attribute [rw] intermediate_destination_index - # @return [::Integer] - # When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number - # between [0..N-1] indicating which intermediate destination the vehicle will - # cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a - # number between [0..N-1] indicating which intermediate destination the - # vehicle is at. The provider sets this value. If there are no - # `intermediate_destinations`, this field is ignored. - # @!attribute [rw] actual_intermediate_destination_arrival_points - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location of the driver's arrival at - # an intermediate destination. - # This field is for provider to provide feedback on actual arrival - # information at intermediate destinations. - # @!attribute [rw] actual_intermediate_destinations - # @return [::Array<::Google::Maps::FleetEngine::V1::StopLocation>] - # Input only. The actual time and location when and where the customer was - # picked up from an intermediate destination. This field is for provider to - # provide feedback on actual pickup information at intermediate destinations. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Location where customer indicates they will be dropped off. - # @!attribute [rw] actual_dropoff_point - # @return [::Google::Maps::FleetEngine::V1::StopLocation] - # Input only. The actual time and location when and where customer was - # dropped off. This field is for provider to provide feedback on actual - # dropoff information. - # @!attribute [r] dropoff_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Either the estimated future time when the rider(s) will be - # dropped off at the final destination, or the actual time when they were - # dropped off. - # @!attribute [r] remaining_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # Output only. The full path from the current location to the dropoff point, - # inclusive. This path could include waypoints from other trips. - # @!attribute [rw] vehicle_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # This field supports manual ordering of the waypoints for the trip. It - # contains all of the remaining waypoints for the assigned vehicle, as well - # as the pickup and drop-off waypoints for this trip. If the trip hasn't been - # assigned to a vehicle, then Fleet Engine ignores this field. For privacy - # reasons, this field is only populated by the server on `UpdateTrip` and - # `CreateTrip` calls, NOT on `GetTrip` calls. - # @!attribute [r] route - # @return [::Array<::Google::Type::LatLng>] - # Output only. Anticipated route for this trip to the first entry in - # remaining_waypoints. Note that the first waypoint may belong to a different - # trip. - # @!attribute [r] current_route_segment - # @return [::String] - # Output only. An encoded path to the next waypoint. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. Decoding is not yet supported. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the route was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::ConsumableTrafficPolyline] - # Output only. Indicates the traffic conditions along the - # `current_route_segment` when they're available. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_traffic_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the `current_route_segment_traffic` - # was modified. - # - # Note: This field is intended only for use by the Driver SDK and Consumer - # SDK. - # @!attribute [r] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # Output only. The waypoint where `current_route_segment` ends. - # @!attribute [r] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Output only. The remaining driving distance in the `current_route_segment` - # field. The value is unspecified if the trip is not assigned to a vehicle, - # or the trip is completed or cancelled. - # @!attribute [r] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # Output only. The ETA to the next waypoint (the first entry in the - # `remaining_waypoints` field). The value is unspecified if the trip is not - # assigned to a vehicle, or the trip is inactive (completed or cancelled). - # @!attribute [r] remaining_time_to_first_waypoint - # @return [::Google::Protobuf::Duration] - # Output only. The duration from when the Trip data is returned to the time - # in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is - # not assigned to a vehicle, or the trip is inactive (completed or - # cancelled). - # @!attribute [r] remaining_waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time that `remaining_waypoints` was changed - # (a waypoint was added, removed, or changed). - # @!attribute [r] remaining_waypoints_route_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Indicates the last time the - # `remaining_waypoints.path_to_waypoint` and - # `remaining_waypoints.traffic_to_waypoint` were modified. Your client app - # should cache this value and pass it in `GetTripRequest` to ensure the - # paths and traffic for `remaining_waypoints` are only returned if updated. - # @!attribute [rw] number_of_passengers - # @return [::Integer] - # Immutable. Indicates the number of passengers on this trip and does not - # include the driver. A vehicle must have available capacity to be returned - # in a `SearchVehicles` response. - # @!attribute [r] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Output only. Indicates the last reported location of the vehicle along the - # route. - # @!attribute [r] last_location_snappable - # @return [::Boolean] - # Output only. Indicates whether the vehicle's `last_location` can be snapped - # to the current_route_segment. False if `last_location` or - # `current_route_segment` doesn't exist. - # It is computed by Fleet Engine. Any update from clients will be ignored. - # @!attribute [rw] view - # @return [::Google::Maps::FleetEngine::V1::TripView] - # The subset of Trip fields that are populated and how they should be - # interpreted. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::TripAttribute>] - # A list of custom Trip attributes. Each attribute must have a unique key. - class Trip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The actual location where a stop (pickup/dropoff) happened. - # @!attribute [rw] point - # @return [::Google::Type::LatLng] - # Required. Denotes the actual location. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates when the stop happened. - # @!attribute [rw] stop_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Input only. Deprecated. Use the timestamp field. - class StopLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of a trip indicating its progression. - module TripStatus - # Default, used for unspecified or unrecognized trip status. - UNKNOWN_TRIP_STATUS = 0 - - # Newly created trip. - NEW = 1 - - # The driver is on their way to the pickup point. - ENROUTE_TO_PICKUP = 2 - - # The driver has arrived at the pickup point. - ARRIVED_AT_PICKUP = 3 - - # The driver has arrived at an intermediate destination and is waiting for - # the rider. - ARRIVED_AT_INTERMEDIATE_DESTINATION = 7 - - # The driver is on their way to an intermediate destination - # (not the dropoff point). - ENROUTE_TO_INTERMEDIATE_DESTINATION = 8 - - # The driver has picked up the rider and is on their way to the - # next destination. - ENROUTE_TO_DROPOFF = 4 - - # The rider has been dropped off and the trip is complete. - COMPLETE = 5 - - # The trip was canceled prior to pickup by the driver, rider, or - # rideshare provider. - CANCELED = 6 - end - - # A set of values that indicate upon which platform the request was issued. - module BillingPlatformIdentifier - # Default. Used for unspecified platforms. - BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0 - - # The platform is a client server. - SERVER = 1 - - # The platform is a web browser. - WEB = 2 - - # The platform is an Android mobile device. - ANDROID = 3 - - # The platform is an IOS mobile device. - IOS = 4 - - # Other platforms that are not listed in this enumeration. - OTHERS = 5 - end - - # Selector for different sets of Trip fields in a `GetTrip` response. See - # [AIP-157](https://google.aip.dev/157) for context. Additional views are - # likely to be added. - module TripView - # The default value. For backwards-compatibility, the API will default to an - # SDK view. To ensure stability and support, customers are - # advised to select a `TripView` other than `SDK`. - TRIP_VIEW_UNSPECIFIED = 0 - - # Includes fields that may not be interpretable or supportable using - # publicly available libraries. - SDK = 1 - - # Trip fields are populated for the Journey Sharing use case. This view is - # intended for server-to-server communications. - JOURNEY_SHARING_V1S = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb deleted file mode 100644 index 501bd43c50a3..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +++ /dev/null @@ -1,674 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # `CreateVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle_id - # @return [::String] - # Required. Unique Vehicle ID. - # Subject to the following restrictions: - # - # * Must be a valid Unicode string. - # * Limited to a maximum length of 64 characters. - # * Normalized according to [Unicode Normalization Form C] - # (http://www.unicode.org/reports/tr15/). - # * May not contain any of the following ASCII characters: '/', ':', '?', - # ',', or '#'. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The Vehicle entity to create. When creating a Vehicle, the - # following fields are required: - # - # * `vehicleState` - # * `supportedTripTypes` - # * `maximumCapacity` - # * `vehicleType` - # - # When creating a Vehicle, the following fields are ignored: - # - # * `name` - # * `currentTrips` - # * `availableCapacity` - # * `current_route_segment` - # * `current_route_segment_end_point` - # * `current_route_segment_version` - # * `current_route_segment_traffic` - # * `route` - # * `waypoints` - # * `waypoints_version` - # * `remaining_distance_meters` - # * `remaining_time_seconds` - # * `eta_to_next_waypoint` - # * `navigation_status` - # - # All other fields are optional and used if provided. - class CreateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `GetVehicle` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which - # `Vehicle.current_route_segment` is retrieved. - # If the route is unchanged since this timestamp, the `current_route_segment` - # field is not set in the response. If a minimum is unspecified, the - # `current_route_segment` is always retrieved. - # @!attribute [rw] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints` - # data is retrieved. If the waypoints are unchanged since this timestamp, the - # `vehicle.waypoints` data is not set in the response. If this field is - # unspecified, `vehicle.waypoints` is always retrieved. - class GetVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # Optional. The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - class DeleteVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicle request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format - # `providers/{provider}/vehicles/{vehicle}`. - # The \\{provider} must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, - # the following fields may not be updated as they are managed by the - # server. - # - # * `available_capacity` - # * `current_route_segment_version` - # * `current_trips` - # * `name` - # * `waypoints_version` - # - # If the `attributes` field is updated, **all** the vehicle's attributes are - # replaced with the attributes provided in the request. If you want to update - # only some attributes, see the `UpdateVehicleAttributes` method. - # - # Likewise, the `waypoints` field can be updated, but must contain all the - # waypoints currently on the vehicle, and no other waypoints. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A field mask indicating which fields of the `Vehicle` to update. - # At least one field name must be provided. - class UpdateVehicleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] name - # @return [::String] - # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The vehicle attributes to update. Unmentioned attributes are not - # altered or removed. - class UpdateVehicleAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `UpdateVehicleAttributes` response message. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Required. The updated full list of vehicle attributes, including new, - # altered, and untouched attributes. - class UpdateVehicleAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `SearchVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] pickup_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # Required. The pickup point to search near. - # @!attribute [rw] dropoff_point - # @return [::Google::Maps::FleetEngine::V1::TerminalLocation] - # The customer's intended dropoff location. The field is required if - # `trip_types` contains `TripType.SHARED`. - # @!attribute [rw] pickup_radius_meters - # @return [::Integer] - # Required. Defines the vehicle search radius around the pickup point. Only - # vehicles within the search radius will be returned. Value must be between - # 400 and 10000 meters (inclusive). - # @!attribute [rw] count - # @return [::Integer] - # Required. Specifies the maximum number of vehicles to return. The value - # must be between 1 and 50 (inclusive). - # @!attribute [rw] minimum_capacity - # @return [::Integer] - # Required. Specifies the number of passengers being considered for a trip. - # The value must be greater than or equal to one. The driver is not - # considered in the capacity value. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Required. Represents the type of proposed trip. Must include exactly one - # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only - # those vehicles that can support that trip type. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the search to only those vehicles that have sent location updates - # to Fleet Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If this field is not - # set, the server uses five minutes as the default value. - # @!attribute [rw] vehicle_types - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>] - # Required. Restricts the search to vehicles with one of the specified types. - # At least one vehicle type must be specified. VehicleTypes with a category - # of `UNKNOWN` are not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the search to only those vehicles with the specified attributes. - # This field is a conjunction/AND operation. A max of 50 required_attributes - # is allowed. This matches the maximum number of attributes allowed on a - # vehicle. - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # Restricts the search to only those vehicles with at least one of - # the specified attributes in each `VehicleAttributeList`. Within each - # list, a vehicle must match at least one of the attributes. This field is an - # inclusive disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the search to only those vehicles with all the attributes in a - # `VehicleAttributeList`. Within each list, a - # vehicle must match all of the attributes. This field is a conjunction/AND - # operation in each `VehicleAttributeList` and inclusive disjunction/OR - # operation across the collection of `VehicleAttributeList`. - # @!attribute [rw] order_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # Required. Specifies the desired ordering criterion for results. - # @!attribute [rw] include_back_to_back - # @return [::Boolean] - # This indicates if vehicles with a single active trip are eligible for this - # search. This field is only used when `current_trips_present` is - # unspecified. When `current_trips_present` is unspecified and this field - # is `false`, vehicles with assigned trips are excluded from the search - # results. When `current_trips_present` is unspecified and this field is - # `true`, search results can include vehicles with one active trip that has a - # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified, - # this field cannot be set to true. - # - # The default value is `false`. - # @!attribute [rw] trip_id - # @return [::String] - # Indicates the trip associated with this `SearchVehicleRequest`. - # @!attribute [rw] current_trips_present - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent] - # This indicates if vehicles with active trips are eligible for this search. - # This must be set to something other than - # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when searching vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `minimum_capacity` or `vehicle_types`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - class SearchVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the order of the vehicle matches in the response. - module VehicleMatchOrder - # Default, used for unspecified or unrecognized vehicle matches order. - UNKNOWN_VEHICLE_MATCH_ORDER = 0 - - # Ascending order by vehicle driving time to the pickup point. - PICKUP_POINT_ETA = 1 - - # Ascending order by vehicle driving distance to the pickup point. - PICKUP_POINT_DISTANCE = 2 - - # Ascending order by vehicle driving time to the dropoff point. This order - # can only be used if the dropoff point is specified in the request. - DROPOFF_POINT_ETA = 3 - - # Ascending order by straight-line distance from the vehicle's last - # reported location to the pickup point. - PICKUP_POINT_STRAIGHT_DISTANCE = 4 - - # Ascending order by the configured match cost. Match cost is defined as a - # weighted calculation between straight-line distance and ETA. Weights are - # set with default values and can be modified per customer. Please contact - # Google support if these weights need to be modified for your project. - COST = 5 - end - - # Specifies the types of restrictions on a vehicle's current trips. - module CurrentTripsPresent - # The availability of vehicles with trips present is governed by the - # `include_back_to_back` field. - CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0 - - # Vehicles without trips can appear in search results. When this value is - # used, `include_back_to_back` cannot be `true`. - NONE = 1 - - # Vehicles with at most 5 current trips and 10 waypoints are included - # in the search results. When this value is used, `include_back_to_back` - # cannot be `true`. - ANY = 2 - end - end - - # `SearchVehicles` response message. - # @!attribute [rw] matches - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>] - # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered - # according to `SearchVehiclesRequest.order_by` field. - class SearchVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` request message. - # @!attribute [rw] header - # @return [::Google::Maps::FleetEngine::V1::RequestHeader] - # The standard Fleet Engine request header. - # @!attribute [rw] parent - # @return [::String] - # Required. Must be in the format `providers/{provider}`. - # The provider must be the Project ID (for example, `sample-cloud-project`) - # of the Google Cloud Project of which the service account making - # this call is a member. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of vehicles to return. - # Default value: 100. - # @!attribute [rw] page_token - # @return [::String] - # The value of the `next_page_token` provided by a previous call to - # `ListVehicles` so that you can paginate through groups of vehicles. The - # value is undefined if the filter criteria of the request is not the same as - # the filter criteria for the previous call to `ListVehicles`. - # @!attribute [rw] minimum_capacity - # @return [::Google::Protobuf::Int32Value] - # Specifies the required minimum capacity of the vehicle. All vehicles - # returned will have a `maximum_capacity` greater than or equal to this - # value. If set, must be greater or equal to 0. - # @!attribute [rw] trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Restricts the response to vehicles that support at least one of the - # specified trip types. - # @!attribute [rw] maximum_staleness - # @return [::Google::Protobuf::Duration] - # Restricts the response to vehicles that have sent location updates to Fleet - # Engine within the specified duration. Stationary vehicles still - # transmitting their locations are not considered stale. If present, must be - # a valid positive duration. - # @!attribute [rw] vehicle_type_categories - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>] - # Required. Restricts the response to vehicles with one of the specified type - # categories. `UNKNOWN` is not allowed. - # @!attribute [rw] required_attributes - # @return [::Array<::String>] - # Callers can form complex logical operations using any combination of the - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attribute_sets` fields. - # - # `required_attributes` is a list; `required_one_of_attributes` uses a - # message which allows a list of lists. In combination, the two fields allow - # the composition of this expression: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR - # ...) - # AND - # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR - # ...) - # ``` - # - # Restricts the response to vehicles with the specified attributes. This - # field is a conjunction/AND operation. A max of 50 required_attributes is - # allowed. This matches the maximum number of attributes allowed on a - # vehicle. Each repeated string should be of the format "key:value". - # @!attribute [rw] required_one_of_attributes - # @return [::Array<::String>] - # Restricts the response to vehicles with at least one of the specified - # attributes in each `VehicleAttributeList`. Within each list, a vehicle must - # match at least one of the attributes. This field is an inclusive - # disjunction/OR operation in each `VehicleAttributeList` and a - # conjunction/AND operation across the collection of `VehicleAttributeList`. - # Each repeated string should be of the format - # "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] required_one_of_attribute_sets - # @return [::Array<::String>] - # `required_one_of_attribute_sets` provides additional functionality. - # - # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets` - # uses a message which allows a list of lists, allowing expressions such as - # this one: - # - # ``` - # (required_attributes[0] AND required_attributes[1] AND ...) - # AND - # ( - # (required_one_of_attribute_sets[0][0] AND - # required_one_of_attribute_sets[0][1] AND - # ...) - # OR - # (required_one_of_attribute_sets[1][0] AND - # required_one_of_attribute_sets[1][1] AND - # ...) - # ) - # ``` - # - # Restricts the response to vehicles that match all the attributes in a - # `VehicleAttributeList`. Within each list, a vehicle must match all of the - # attributes. This field is a conjunction/AND operation in each - # `VehicleAttributeList` and inclusive disjunction/OR operation across the - # collection of `VehicleAttributeList`. Each repeated string should be of the - # format "key1:value1|key2:value2|key3:value3". - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # Restricts the response to vehicles that have this vehicle state. - # @!attribute [rw] on_trip_only - # @return [::Boolean] - # Only return the vehicles with current trip(s). - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter query to apply when listing vehicles. See - # http://aip.dev/160 for examples of the filter syntax. - # - # This field is designed to replace the `required_attributes`, - # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields. - # If a non-empty value is specified here, the following fields must be empty: - # `required_attributes`, `required_one_of_attributes`, and - # `required_one_of_attributes_sets`. - # - # This filter functions as an AND clause with other constraints, - # such as `vehicle_state` or `on_trip_only`. - # - # Note that the only queries supported are on vehicle attributes (for - # example, `attributes. = ` or `attributes. = AND - # attributes. = `). The maximum number of restrictions allowed - # in a filter query is 50. - # - # Also, all attributes are stored as strings, so the only supported - # comparisons against attributes are string comparisons. In order to compare - # against number or boolean values, the values must be explicitly quoted to - # be treated as strings (for example, `attributes. = "10"` or - # `attributes. = "true"`). - # @!attribute [rw] viewport - # @return [::Google::Geo::Type::Viewport] - # Optional. A filter that limits the vehicles returned to those whose last - # known location was in the rectangular area defined by the viewport. - class ListVehiclesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListVehicles` response message. - # @!attribute [rw] vehicles - # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>] - # Vehicles matching the criteria in the request. - # The maximum number of vehicles returned is determined by the `page_size` - # field in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of vehicles, or empty if there are no - # more vehicles that meet the request criteria. - # @!attribute [rw] total_size - # @return [::Integer] - # Required. Total number of vehicles matching the request criteria across all - # pages. - class ListVehiclesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes intermediate points along a route for a `VehicleMatch` in a - # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in - # all other endpoints. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # The location of this waypoint. - # @!attribute [rw] eta - # @return [::Google::Protobuf::Timestamp] - # The estimated time that the vehicle will arrive at this waypoint. - class Waypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the vehicle and related estimates for a vehicle that match the - # points of active trips for the vehicle `SearchVehiclesRequest`. - # @!attribute [rw] vehicle - # @return [::Google::Maps::FleetEngine::V1::Vehicle] - # Required. A vehicle that matches the request. - # @!attribute [rw] vehicle_pickup_eta - # @return [::Google::Protobuf::Timestamp] - # The vehicle's driving ETA to the pickup point specified in the - # request. An empty value indicates a failure in calculating ETA for the - # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and - # this vehicle has an active trip, `vehicle_pickup_eta` includes the time - # required to complete the current active trip. - # @!attribute [rw] vehicle_pickup_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The distance from the Vehicle's current location to the pickup point - # specified in the request, including any intermediate pickup or dropoff - # points for existing trips. This distance comprises the calculated driving - # (route) distance, plus the straight line distance between the navigation - # end point and the requested pickup point. (The distance between the - # navigation end point and the requested pickup point is typically small.) An - # empty value indicates an error in calculating the distance. - # @!attribute [rw] vehicle_pickup_straight_line_distance_meters - # @return [::Google::Protobuf::Int32Value] - # Required. The straight-line distance between the vehicle and the pickup - # point specified in the request. - # @!attribute [rw] vehicle_dropoff_eta - # @return [::Google::Protobuf::Timestamp] - # The complete vehicle's driving ETA to the drop off point specified in the - # request. The ETA includes stopping at any waypoints before the - # `dropoff_point` specified in the request. The value will only be populated - # when a drop off point is specified in the request. An empty value indicates - # an error calculating the ETA. - # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The vehicle's driving distance (in meters) from the pickup point - # to the drop off point specified in the request. The distance is only - # between the two points and does not include the vehicle location or any - # other points that must be visited before the vehicle visits either the - # pickup point or dropoff point. The value will only be populated when a - # `dropoff_point` is specified in the request. An empty value indicates - # a failure in calculating the distance from the pickup to - # drop off point specified in the request. - # @!attribute [rw] trip_type - # @return [::Google::Maps::FleetEngine::V1::TripType] - # Required. The trip type of the request that was used to calculate the ETA - # to the pickup point. - # @!attribute [rw] vehicle_trips_waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>] - # The ordered list of waypoints used to calculate the ETA. The list - # includes vehicle location, the pickup points of active - # trips for the vehicle, and the pickup points provided in the - # request. An empty list indicates a failure in calculating ETA for the - # vehicle. - # @!attribute [rw] vehicle_match_type - # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType] - # Type of the vehicle match. - # @!attribute [rw] requested_ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `ordered_by`. - # @!attribute [rw] ordered_by - # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder] - # The order requested for sorting vehicle matches. Equivalent to - # `requested_ordered_by`. - class VehicleMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of vehicle match. - module VehicleMatchType - # Unknown vehicle match type - UNKNOWN = 0 - - # The vehicle currently has no trip assigned to it and can proceed to the - # pickup point. - EXCLUSIVE = 1 - - # The vehicle is currently assigned to a trip, but can proceed to the - # pickup point after completing the in-progress trip. ETA and distance - # calculations take the existing trip into account. - BACK_TO_BACK = 2 - - # The vehicle has sufficient capacity for a shared ride. - CARPOOL = 3 - - # The vehicle will finish its current, active trip before proceeding to the - # pickup point. ETA and distance calculations take the existing trip into - # account. - CARPOOL_BACK_TO_BACK = 4 - end - end - - # A list-of-lists datatype for vehicle attributes. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # A list of attributes in this collection. - class VehicleAttributeList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb deleted file mode 100644 index 59703d2da0b2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/maps/fleetengine/v1/vehicles.rb +++ /dev/null @@ -1,365 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Maps - module FleetEngine - module V1 - # Vehicle metadata. - # @!attribute [r] name - # @return [::String] - # Output only. The unique name for this vehicle. - # The format is `providers/{provider}/vehicles/{vehicle}`. - # @!attribute [rw] vehicle_state - # @return [::Google::Maps::FleetEngine::V1::VehicleState] - # The vehicle state. - # @!attribute [rw] supported_trip_types - # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>] - # Trip types supported by this vehicle. - # @!attribute [r] current_trips - # @return [::Array<::String>] - # Output only. List of `trip_id`'s for trips currently assigned to this - # vehicle. - # @!attribute [rw] last_location - # @return [::Google::Maps::FleetEngine::V1::VehicleLocation] - # Last reported location of the vehicle. - # @!attribute [rw] past_locations - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleLocation>] - # Input only. Locations where this vehicle has been in the past that haven't - # yet been reported to Fleet Engine. This is used in `UpdateVehicleRequest` - # to record locations which were previously unable to be sent to the server. - # Typically this happens when the vehicle does not have internet - # connectivity. - # @!attribute [rw] maximum_capacity - # @return [::Integer] - # The total numbers of riders this vehicle can carry. The driver is not - # considered in this value. This value must be greater than or equal to one. - # @!attribute [rw] attributes - # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>] - # List of vehicle attributes. A vehicle can have at most 100 - # attributes, and each attribute must have a unique key. - # @!attribute [rw] vehicle_type - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType] - # Required. The type of this vehicle. Can be used to filter vehicles in - # `SearchVehicles` results. Also influences ETA and route calculations. - # @!attribute [rw] license_plate - # @return [::Google::Maps::FleetEngine::V1::LicensePlate] - # License plate information for the vehicle. - # @!attribute [rw] route - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Maps::FleetEngine::V1::TerminalLocation>] - # Deprecated: Use `Vehicle.waypoints` instead. - # @!attribute [rw] current_route_segment - # @return [::String] - # The polyline specifying the route the driver app intends to take to - # the next waypoint. This list is also returned in - # `Trip.current_route_segment` for all active trips assigned to the vehicle. - # - # Note: This field is intended only for use by the Driver SDK. Decoding is - # not yet supported. - # @!attribute [rw] current_route_segment_traffic - # @return [::Google::Maps::FleetEngine::V1::TrafficPolylineData] - # Input only. Fleet Engine uses this information to improve journey sharing. - # Note: This field is intended only for use by the Driver SDK. - # @!attribute [r] current_route_segment_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when `current_route_segment` was set. It can be stored by - # the client and passed in future `GetVehicle` requests to prevent returning - # routes that haven't changed. - # @!attribute [rw] current_route_segment_end_point - # @return [::Google::Maps::FleetEngine::V1::TripWaypoint] - # The waypoint where `current_route_segment` ends. This can be supplied by - # drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint - # `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet - # Engine will then do its best to interpolate to an actual waypoint if it is - # not fully specified. This field is ignored in `UpdateVehicle` calls unless - # `current_route_segment` is also specified. - # @!attribute [rw] remaining_distance_meters - # @return [::Google::Protobuf::Int32Value] - # The remaining driving distance for the `current_route_segment`. - # This value is also returned in `Trip.remaining_distance_meters` for all - # active trips assigned to the vehicle. The value is unspecified if the - # `current_route_segment` field is empty. - # @!attribute [rw] eta_to_first_waypoint - # @return [::Google::Protobuf::Timestamp] - # The ETA to the first entry in the `waypoints` field. The value is - # unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] remaining_time_seconds - # @return [::Google::Protobuf::Int32Value] - # Input only. The remaining driving time for the `current_route_segment`. The - # value is unspecified if the `waypoints` field is empty or the - # `Vehicle.current_route_segment` field is empty. This value should match - # `eta_to_first_waypoint` - `current_time` if all parties are using the same - # clock. - # - # When updating a vehicle, `remaining_time_seconds` takes precedence over - # `eta_to_first_waypoint` in the same request. - # @!attribute [rw] waypoints - # @return [::Array<::Google::Maps::FleetEngine::V1::TripWaypoint>] - # The remaining waypoints assigned to this Vehicle. - # @!attribute [r] waypoints_version - # @return [::Google::Protobuf::Timestamp] - # Output only. Last time the `waypoints` field was updated. Clients should - # cache this value and pass it in `GetVehicleRequest` to ensure the - # `waypoints` field is only returned if it is updated. - # @!attribute [rw] back_to_back_enabled - # @return [::Boolean] - # Indicates if the driver accepts back-to-back trips. If `true`, - # `SearchVehicles` may include the vehicle even if it is currently assigned - # to a trip. The default value is `false`. - # @!attribute [rw] navigation_status - # @return [::Google::Maps::FleetEngine::V1::NavigationStatus] - # The vehicle's navigation status. - # @!attribute [rw] device_settings - # @return [::Google::Maps::FleetEngine::V1::DeviceSettings] - # Input only. Information about settings in the mobile device being used by - # the driver. - class Vehicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of vehicle. - # @!attribute [rw] category - # @return [::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category] - # Vehicle type category - class VehicleType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Vehicle type categories - module Category - # Default, used for unspecified or unrecognized vehicle categories. - UNKNOWN = 0 - - # An automobile. - AUTO = 1 - - # Any vehicle that acts as a taxi (typically licensed or regulated). - TAXI = 2 - - # Generally, a vehicle with a large storage capacity. - TRUCK = 3 - - # A motorcycle, moped, or other two-wheeled vehicle - TWO_WHEELER = 4 - - # Human-powered transport. - BICYCLE = 5 - - # A human transporter, typically walking or running, traveling along - # pedestrian pathways. - PEDESTRIAN = 6 - end - end - end - - # Information about the device's battery. - # @!attribute [rw] battery_status - # @return [::Google::Maps::FleetEngine::V1::BatteryStatus] - # Status of the battery, whether full or charging etc. - # @!attribute [rw] power_source - # @return [::Google::Maps::FleetEngine::V1::PowerSource] - # Status of battery power source. - # @!attribute [rw] battery_percentage - # @return [::Float] - # Current battery percentage [0-100]. - class BatteryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about various settings on the mobile device. - # @!attribute [rw] location_power_save_mode - # @return [::Google::Maps::FleetEngine::V1::LocationPowerSaveMode] - # How location features are set to behave on the device when battery saver is - # on. - # @!attribute [rw] is_power_save_mode - # @return [::Boolean] - # Whether the device is currently in power save mode. - # @!attribute [rw] is_interactive - # @return [::Boolean] - # Whether the device is in an interactive state. - # @!attribute [rw] battery_info - # @return [::Google::Maps::FleetEngine::V1::BatteryInfo] - # Information about the battery state. - class DeviceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The license plate information of the Vehicle. To avoid storing - # personally-identifiable information, only the minimum information - # about the license plate is stored as part of the entity. - # @!attribute [rw] country_code - # @return [::String] - # Required. CLDR Country/Region Code. For example, `US` for United States, - # or `IN` for India. - # @!attribute [rw] last_character - # @return [::String] - # The last digit of the license plate or "-1" to denote no numeric value - # is present in the license plate. - # - # * "ABC 1234" -> "4" - # * "AB 123 CD" -> "3" - # * "ABCDEF" -> "-1" - class LicensePlate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how clients should color one portion of the polyline along the - # route. - # @!attribute [rw] road_stretch - # @return [::Array<::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch>] - # Optional. Road stretches that should be rendered along the polyline. - # Stretches are guaranteed to not overlap, and do not necessarily span the - # full route. - # - # In the absence of a road stretch to style, the client should apply the - # default for the route. - class VisualTrafficReportPolylineRendering - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # One road stretch that should be rendered. - # @!attribute [rw] style - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering::RoadStretch::Style] - # Required. The style to apply. - # @!attribute [rw] offset_meters - # @return [::Integer] - # Required. The style should be applied between `[offset_meters, - # offset_meters + length_meters)`. - # @!attribute [rw] length_meters - # @return [::Integer] - # Required. The length of the path where to apply the style. - class RoadStretch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The traffic style, indicating traffic speed. - module Style - # No style selected. - STYLE_UNSPECIFIED = 0 - - # Traffic is slowing down. - SLOWER_TRAFFIC = 1 - - # There is a traffic jam. - TRAFFIC_JAM = 2 - end - end - end - - # Traffic conditions along the expected vehicle route. - # @!attribute [rw] traffic_rendering - # @return [::Google::Maps::FleetEngine::V1::VisualTrafficReportPolylineRendering] - # A polyline rendering of how fast traffic is for all regions along - # one stretch of a customer ride. - class TrafficPolylineData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of a `Vehicle`. - module VehicleState - # Default, used for unspecified or unrecognized vehicle states. - UNKNOWN_VEHICLE_STATE = 0 - - # The vehicle is not accepting new trips. Note: the vehicle may continue to - # operate in this state while completing a trip assigned to it. - OFFLINE = 1 - - # The vehicle is accepting new trips. - ONLINE = 2 - end - - # How location features are configured to behave on the mobile device when the - # devices "battery saver" feature is on. - # (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode()) - module LocationPowerSaveMode - # Undefined LocationPowerSaveMode - UNKNOWN_LOCATION_POWER_SAVE_MODE = 0 - - # Either the location providers shouldn't be affected by battery saver, or - # battery saver is off. - LOCATION_MODE_NO_CHANGE = 1 - - # The GPS based location provider should be disabled when battery saver is on - # and the device is non-interactive. - LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2 - - # All location providers should be disabled when battery saver is on and the - # device is non-interactive. - LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3 - - # All the location providers will be kept available, but location fixes - # should only be provided to foreground apps. - LOCATION_MODE_FOREGROUND_ONLY = 4 - - # Location will not be turned off, but LocationManager will throttle all - # requests to providers when the device is non-interactive. - LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5 - end - - # Status of the battery, whether full or charging etc. - module BatteryStatus - # Battery status unknown. - UNKNOWN_BATTERY_STATUS = 0 - - # Battery is being charged. - BATTERY_STATUS_CHARGING = 1 - - # Battery is discharging. - BATTERY_STATUS_DISCHARGING = 2 - - # Battery is full. - BATTERY_STATUS_FULL = 3 - - # Battery is not charging. - BATTERY_STATUS_NOT_CHARGING = 4 - - # Battery is low on power. - BATTERY_STATUS_POWER_LOW = 5 - end - - # Type of the charger being used to charge the battery. - module PowerSource - # Power source unknown. - UNKNOWN_POWER_SOURCE = 0 - - # Power source is an AC charger. - POWER_SOURCE_AC = 1 - - # Power source is a USB port. - POWER_SOURCE_USB = 2 - - # Power source is wireless. - POWER_SOURCE_WIRELESS = 3 - - # Battery is unplugged. - POWER_SOURCE_UNPLUGGED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index 593314b4cde5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/proto_docs/google/type/latlng.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object that represents a latitude/longitude pair. This is expressed as a - # pair of doubles to represent degrees latitude and degrees longitude. Unless - # specified otherwise, this object must conform to the - # - # WGS84 standard. Values must be within normalized ranges. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - class LatLng - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/Gemfile deleted file mode 100644 index 1a35fc6011c5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-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-maps-fleet_engine-v1", path: "../" -else - gem "google-maps-fleet_engine-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-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json deleted file mode 100644 index a69f797d658e..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/snippet_metadata_maps.fleetengine.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-maps-fleet_engine-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "maps.fleetengine.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "fleetengine_v1_generated_TripService_CreateTrip_sync", - "title": "Snippet for the create_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#create_trip.", - "file": "trip_service/create_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#create_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "CreateTrip", - "full_name": "maps.fleetengine.v1.TripService.CreateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_GetTrip_sync", - "title": "Snippet for the get_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#get_trip.", - "file": "trip_service/get_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#get_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "GetTrip", - "full_name": "maps.fleetengine.v1.TripService.GetTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_DeleteTrip_sync", - "title": "Snippet for the delete_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#delete_trip.", - "file": "trip_service/delete_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#delete_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "DeleteTrip", - "full_name": "maps.fleetengine.v1.TripService.DeleteTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_ReportBillableTrip_sync", - "title": "Snippet for the report_billable_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip.", - "file": "trip_service/report_billable_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "report_billable_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ReportBillableTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "ReportBillableTrip", - "full_name": "maps.fleetengine.v1.TripService.ReportBillableTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_SearchTrips_sync", - "title": "Snippet for the search_trips call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#search_trips.", - "file": "trip_service/search_trips.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_trips", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#search_trips", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchTripsRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchTripsResponse", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "SearchTrips", - "full_name": "maps.fleetengine.v1.TripService.SearchTrips", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_TripService_UpdateTrip_sync", - "title": "Snippet for the update_trip call in the TripService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::TripService::Client#update_trip.", - "file": "trip_service/update_trip.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_trip", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client#update_trip", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateTripRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Trip", - "client": { - "short_name": "TripService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::TripService::Client" - }, - "method": { - "short_name": "UpdateTrip", - "full_name": "maps.fleetengine.v1.TripService.UpdateTrip", - "service": { - "short_name": "TripService", - "full_name": "maps.fleetengine.v1.TripService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_CreateVehicle_sync", - "title": "Snippet for the create_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle.", - "file": "vehicle_service/create_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::CreateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "CreateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.CreateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_GetVehicle_sync", - "title": "Snippet for the get_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle.", - "file": "vehicle_service/get_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::GetVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "GetVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.GetVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_DeleteVehicle_sync", - "title": "Snippet for the delete_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle.", - "file": "vehicle_service/delete_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::DeleteVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "DeleteVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.DeleteVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicle_sync", - "title": "Snippet for the update_vehicle call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle.", - "file": "vehicle_service/update_vehicle.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::Vehicle", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicle", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicle", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync", - "title": "Snippet for the update_vehicle_attributes call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes.", - "file": "vehicle_service/update_vehicle_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vehicle_attributes", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "UpdateVehicleAttributes", - "full_name": "maps.fleetengine.v1.VehicleService.UpdateVehicleAttributes", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_ListVehicles_sync", - "title": "Snippet for the list_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles.", - "file": "vehicle_service/list_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::ListVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::ListVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "ListVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.ListVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "fleetengine_v1_generated_VehicleService_SearchVehicles_sync", - "title": "Snippet for the search_vehicles call in the VehicleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles.", - "file": "vehicle_service/search_vehicles.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_vehicles", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles", - "async": false, - "parameters": [ - { - "type": "::Google::Maps::FleetEngine::V1::SearchVehiclesRequest", - "name": "request" - } - ], - "result_type": "::Google::Maps::FleetEngine::V1::SearchVehiclesResponse", - "client": { - "short_name": "VehicleService::Client", - "full_name": "::Google::Maps::FleetEngine::V1::VehicleService::Client" - }, - "method": { - "short_name": "SearchVehicles", - "full_name": "maps.fleetengine.v1.VehicleService.SearchVehicles", - "service": { - "short_name": "VehicleService", - "full_name": "maps.fleetengine.v1.VehicleService" - } - } - }, - "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-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb deleted file mode 100644 index 471ee490d00d..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/create_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_CreateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#create_trip. -# -def create_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateTripRequest.new - - # Call the create_trip method. - result = client.create_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_CreateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb deleted file mode 100644 index 892398e76959..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/delete_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_DeleteTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#delete_trip. -# -def delete_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteTripRequest.new - - # Call the delete_trip method. - result = client.delete_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_DeleteTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb deleted file mode 100644 index d02ae4f6720c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/get_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_GetTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#get_trip. -# -def get_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetTripRequest.new - - # Call the get_trip method. - result = client.get_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_GetTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb deleted file mode 100644 index 66c560dccfb5..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/report_billable_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_ReportBillableTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the report_billable_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#report_billable_trip. -# -def report_billable_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new - - # Call the report_billable_trip method. - result = client.report_billable_trip request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_TripService_ReportBillableTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb deleted file mode 100644 index 213ca35edfd8..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/search_trips.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_SearchTrips_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_trips call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#search_trips. -# -def search_trips - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new - - # Call the search_trips method. - result = client.search_trips request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Trip. - p item - end -end -# [END fleetengine_v1_generated_TripService_SearchTrips_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb deleted file mode 100644 index caca64f14dad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/trip_service/update_trip.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_TripService_UpdateTrip_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_trip call in the TripService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::TripService::Client#update_trip. -# -def update_trip - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::TripService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new - - # Call the update_trip method. - result = client.update_trip request - - # The returned object is of type Google::Maps::FleetEngine::V1::Trip. - p result -end -# [END fleetengine_v1_generated_TripService_UpdateTrip_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb deleted file mode 100644 index 70db086501d6..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/create_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_CreateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the create_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#create_vehicle. -# -def create_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::CreateVehicleRequest.new - - # Call the create_vehicle method. - result = client.create_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_CreateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb deleted file mode 100644 index c040d402cb0b..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/delete_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the delete_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#delete_vehicle. -# -def delete_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new - - # Call the delete_vehicle method. - result = client.delete_vehicle request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END fleetengine_v1_generated_VehicleService_DeleteVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb deleted file mode 100644 index 4872490fa433..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/get_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_GetVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the get_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#get_vehicle. -# -def get_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::GetVehicleRequest.new - - # Call the get_vehicle method. - result = client.get_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_GetVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb deleted file mode 100644 index 1119502e68a1..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/list_vehicles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_ListVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the list_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#list_vehicles. -# -def list_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::ListVehiclesRequest.new - - # Call the list_vehicles method. - result = client.list_vehicles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Maps::FleetEngine::V1::Vehicle. - p item - end -end -# [END fleetengine_v1_generated_VehicleService_ListVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb deleted file mode 100644 index e28a620bb8ef..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/search_vehicles.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_SearchVehicles_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the search_vehicles call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#search_vehicles. -# -def search_vehicles - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new - - # Call the search_vehicles method. - result = client.search_vehicles request - - # The returned object is of type Google::Maps::FleetEngine::V1::SearchVehiclesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_SearchVehicles_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb deleted file mode 100644 index 87e5b21b85ad..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle. -# -def update_vehicle - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new - - # Call the update_vehicle method. - result = client.update_vehicle request - - # The returned object is of type Google::Maps::FleetEngine::V1::Vehicle. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicle_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb b/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb deleted file mode 100644 index abf97493f162..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/snippets/vehicle_service/update_vehicle_attributes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] -require "google/maps/fleet_engine/v1" - -## -# Snippet for the update_vehicle_attributes call in the VehicleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Maps::FleetEngine::V1::VehicleService::Client#update_vehicle_attributes. -# -def update_vehicle_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Maps::FleetEngine::V1::VehicleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new - - # Call the update_vehicle_attributes method. - result = client.update_vehicle_attributes request - - # The returned object is of type Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse. - p result -end -# [END fleetengine_v1_generated_VehicleService_UpdateVehicleAttributes_sync] diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_paths_test.rb deleted file mode 100644 index f1ddb3264a50..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_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/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trip_path provider: "value0", trip: "value1" - assert_equal "providers/value0/trips/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb deleted file mode 100644 index a6042f765747..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_rest_test.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service/rest" - - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_create_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_count - end - end - end - - def test_get_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_get_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_count - end - end - end - - def test_delete_trip - # 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. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_delete_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_trip({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_trip header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_trip({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_trip_client_stub.call_count - end - end - end - - def test_report_billable_trip - # 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" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_report_billable_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, report_billable_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_count - end - end - end - - def test_search_trips - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_search_trips_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_trips_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_trips_client_stub.call_count - end - end - end - - def test_update_trip - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Trip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.stub :transcode_update_trip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_trip_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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb deleted file mode 100644 index 38356c41018f..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/trip_service_test.rb +++ /dev/null @@ -1,505 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/trip_api_pb" -require "google/maps/fleet_engine/v1/trip_service" - -class ::Google::Maps::FleetEngine::V1::TripService::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_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - trip_id = "hello world" - trip = {} - - create_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["trip_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_trip header: header, parent: parent, trip_id: trip_id, trip: trip do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_trip ::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_trip({ header: header, parent: parent, trip_id: trip_id, trip: trip }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_trip(::Google::Maps::FleetEngine::V1::CreateTripRequest.new(header: header, parent: parent, trip_id: trip_id, trip: trip), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_trip_client_stub.call_rpc_count - end - end - - def test_get_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - view = :TRIP_VIEW_UNSPECIFIED - current_route_segment_version = {} - remaining_waypoints_version = {} - route_format_type = :UNKNOWN_FORMAT_TYPE - current_route_segment_traffic_version = {} - remaining_waypoints_route_version = {} - - get_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal :TRIP_VIEW_UNSPECIFIED, request["view"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_version"] - assert_equal :UNKNOWN_FORMAT_TYPE, request["route_format_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_traffic_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["remaining_waypoints_route_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_trip header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_trip ::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_trip({ header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_trip(::Google::Maps::FleetEngine::V1::GetTripRequest.new(header: header, name: name, view: view, current_route_segment_version: current_route_segment_version, remaining_waypoints_version: remaining_waypoints_version, route_format_type: route_format_type, current_route_segment_traffic_version: current_route_segment_traffic_version, remaining_waypoints_route_version: remaining_waypoints_route_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_trip_client_stub.call_rpc_count - end - end - - def test_delete_trip - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_trip({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_trip header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_trip ::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_trip({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_trip(::Google::Maps::FleetEngine::V1::DeleteTripRequest.new(header: header, 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_trip_client_stub.call_rpc_count - end - end - - def test_report_billable_trip - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - country_code = "hello world" - platform = :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED - related_ids = ["hello world"] - solution_type = :SOLUTION_TYPE_UNSPECIFIED - - report_billable_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report_billable_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["country_code"] - assert_equal :BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED, request["platform"] - assert_equal ["hello world"], request["related_ids"] - assert_equal :SOLUTION_TYPE_UNSPECIFIED, request["solution_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_billable_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.report_billable_trip name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.report_billable_trip ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.report_billable_trip({ name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.report_billable_trip(::Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new(name: name, country_code: country_code, platform: platform, related_ids: related_ids, solution_type: solution_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_billable_trip_client_stub.call_rpc_count - end - end - - def test_search_trips - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchTripsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - active_trips_only = true - page_size = 42 - page_token = "hello world" - minimum_staleness = {} - - search_trips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_trips, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchTripsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal true, request["active_trips_only"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["minimum_staleness"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_trips_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_trips header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_trips ::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_trips({ header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_trips(::Google::Maps::FleetEngine::V1::SearchTripsRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, active_trips_only: active_trips_only, page_size: page_size, page_token: page_token, minimum_staleness: minimum_staleness), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_trips_client_stub.call_rpc_count - end - end - - def test_update_trip - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Trip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - trip = {} - update_mask = {} - - update_trip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_trip, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateTripRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Trip), request["trip"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_trip_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_trip header: header, name: name, trip: trip, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_trip ::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_trip({ header: header, name: name, trip: trip, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_trip(::Google::Maps::FleetEngine::V1::UpdateTripRequest.new(header: header, name: name, trip: trip, 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_trip_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::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::Maps::FleetEngine::V1::TripService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::TripService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_paths_test.rb deleted file mode 100644 index 104283f54a4c..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_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/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vehicle_path provider: "value0", vehicle: "value1" - assert_equal "providers/value0/vehicles/value1", path - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb deleted file mode 100644 index e5e9ed6215e7..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_rest_test.rb +++ /dev/null @@ -1,520 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service/rest" - - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_create_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_count - end - end - end - - def test_get_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_get_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_count - end - end - end - - def test_delete_vehicle - # 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. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_delete_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_vehicle({ header: header, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_vehicle header: header, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_vehicle({ header: header, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::Vehicle.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_client_stub.call_count - end - end - end - - def test_update_vehicle_attributes - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_update_vehicle_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_vehicle_attributes header: header, name: name, attributes: attributes do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_count - end - end - end - - def test_list_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_list_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_count - end - end - end - - def test_search_vehicles - # Create test objects. - client_result = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Maps::FleetEngine::V1::VehicleService::Rest::ServiceStub.stub :transcode_search_vehicles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_vehicles_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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb deleted file mode 100644 index f20a91100c3a..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/google/maps/fleet_engine/v1/vehicle_service_test.rb +++ /dev/null @@ -1,601 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/maps/fleetengine/v1/vehicle_api_pb" -require "google/maps/fleet_engine/v1/vehicle_service" - -class ::Google::Maps::FleetEngine::V1::VehicleService::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_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - vehicle_id = "hello world" - vehicle = {} - - create_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::CreateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vehicle_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_vehicle header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_vehicle ::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_vehicle({ header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_vehicle(::Google::Maps::FleetEngine::V1::CreateVehicleRequest.new(header: header, parent: parent, vehicle_id: vehicle_id, vehicle: vehicle), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_vehicle_client_stub.call_rpc_count - end - end - - def test_get_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - current_route_segment_version = {} - waypoints_version = {} - - get_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::GetVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["current_route_segment_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["waypoints_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_vehicle header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_vehicle ::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_vehicle({ header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_vehicle(::Google::Maps::FleetEngine::V1::GetVehicleRequest.new(header: header, name: name, current_route_segment_version: current_route_segment_version, waypoints_version: waypoints_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_vehicle_client_stub.call_rpc_count - end - end - - def test_delete_vehicle - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - - delete_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_vehicle({ header: header, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_vehicle header: header, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_vehicle ::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_vehicle({ header: header, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_vehicle(::Google::Maps::FleetEngine::V1::DeleteVehicleRequest.new(header: header, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::Vehicle.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - vehicle = {} - update_mask = {} - - update_vehicle_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::Vehicle), request["vehicle"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_vehicle header: header, name: name, vehicle: vehicle, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_vehicle ::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_vehicle({ header: header, name: name, vehicle: vehicle, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_vehicle(::Google::Maps::FleetEngine::V1::UpdateVehicleRequest.new(header: header, name: name, vehicle: vehicle, 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_vehicle_client_stub.call_rpc_count - end - end - - def test_update_vehicle_attributes - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - name = "hello world" - attributes = [{}] - - update_vehicle_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vehicle_attributes, name - assert_kind_of ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["attributes"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vehicle_attributes_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_vehicle_attributes header: header, name: name, attributes: attributes do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_vehicle_attributes ::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_vehicle_attributes({ header: header, name: name, attributes: attributes }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_vehicle_attributes(::Google::Maps::FleetEngine::V1::UpdateVehicleAttributesRequest.new(header: header, name: name, attributes: attributes), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_vehicle_attributes_client_stub.call_rpc_count - end - end - - def test_list_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::ListVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - page_size = 42 - page_token = "hello world" - minimum_capacity = {} - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_type_categories = [:UNKNOWN] - required_attributes = ["hello world"] - required_one_of_attributes = ["hello world"] - required_one_of_attribute_sets = ["hello world"] - vehicle_state = :UNKNOWN_VEHICLE_STATE - on_trip_only = true - filter = "hello world" - viewport = {} - - list_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::ListVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_equal [:UNKNOWN], request["vehicle_type_categories"] - assert_equal ["hello world"], request["required_attributes"] - assert_equal ["hello world"], request["required_one_of_attributes"] - assert_equal ["hello world"], request["required_one_of_attribute_sets"] - assert_equal :UNKNOWN_VEHICLE_STATE, request["vehicle_state"] - assert_equal true, request["on_trip_only"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Geo::Type::Viewport), request["viewport"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_vehicles header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_vehicles ::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_vehicles({ header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_vehicles(::Google::Maps::FleetEngine::V1::ListVehiclesRequest.new(header: header, parent: parent, page_size: page_size, page_token: page_token, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_type_categories: vehicle_type_categories, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, vehicle_state: vehicle_state, on_trip_only: on_trip_only, filter: filter, viewport: viewport), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_vehicles_client_stub.call_rpc_count - end - end - - def test_search_vehicles - # Create GRPC objects. - grpc_response = ::Google::Maps::FleetEngine::V1::SearchVehiclesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - header = {} - parent = "hello world" - pickup_point = {} - dropoff_point = {} - pickup_radius_meters = 42 - count = 42 - minimum_capacity = 42 - trip_types = [:UNKNOWN_TRIP_TYPE] - maximum_staleness = {} - vehicle_types = [{}] - required_attributes = [{}] - required_one_of_attributes = [{}] - required_one_of_attribute_sets = [{}] - order_by = :UNKNOWN_VEHICLE_MATCH_ORDER - include_back_to_back = true - trip_id = "hello world" - current_trips_present = :CURRENT_TRIPS_PRESENT_UNSPECIFIED - filter = "hello world" - - search_vehicles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_vehicles, name - assert_kind_of ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::RequestHeader), request["header"] - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["pickup_point"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Maps::FleetEngine::V1::TerminalLocation), request["dropoff_point"] - assert_equal 42, request["pickup_radius_meters"] - assert_equal 42, request["count"] - assert_equal 42, request["minimum_capacity"] - assert_equal [:UNKNOWN_TRIP_TYPE], request["trip_types"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["maximum_staleness"] - assert_kind_of ::Google::Maps::FleetEngine::V1::Vehicle::VehicleType, request["vehicle_types"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttribute, request["required_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attributes"].first - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleAttributeList, request["required_one_of_attribute_sets"].first - assert_equal :UNKNOWN_VEHICLE_MATCH_ORDER, request["order_by"] - assert_equal true, request["include_back_to_back"] - assert_equal "hello world", request["trip_id"] - assert_equal :CURRENT_TRIPS_PRESENT_UNSPECIFIED, request["current_trips_present"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_vehicles_client_stub do - # Create client - c = ::Google::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_vehicles header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_vehicles ::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search_vehicles({ header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search_vehicles(::Google::Maps::FleetEngine::V1::SearchVehiclesRequest.new(header: header, parent: parent, pickup_point: pickup_point, dropoff_point: dropoff_point, pickup_radius_meters: pickup_radius_meters, count: count, minimum_capacity: minimum_capacity, trip_types: trip_types, maximum_staleness: maximum_staleness, vehicle_types: vehicle_types, required_attributes: required_attributes, required_one_of_attributes: required_one_of_attributes, required_one_of_attribute_sets: required_one_of_attribute_sets, order_by: order_by, include_back_to_back: include_back_to_back, trip_id: trip_id, current_trips_present: current_trips_present, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_vehicles_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::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::Maps::FleetEngine::V1::VehicleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Maps::FleetEngine::V1::VehicleService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb b/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-maps-fleet_engine-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-css-v1/.gitignore b/owl-bot-staging/google-shopping-css-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json deleted file mode 100644 index 4ce57214d802..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "css.googleapis.com", - "api_shortname": "css", - "client_documentation": "https://rubydoc.info/gems/google-shopping-css-v1", - "distribution_name": "google-shopping-css-v1", - "is_cloud": false, - "language": "ruby", - "name": "css", - "name_pretty": "CSS V1 API", - "product_documentation": "https://developers.google.com/comparison-shopping-services/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/comparison-shopping-services/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml b/owl-bot-staging/google-shopping-css-v1/.rubocop.yml deleted file mode 100644 index b53d398f0a64..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-css-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-shopping-css-v1.rb" diff --git a/owl-bot-staging/google-shopping-css-v1/.toys.rb b/owl-bot-staging/google-shopping-css-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/.yardopts b/owl-bot-staging/google-shopping-css-v1/.yardopts deleted file mode 100644 index f293265f462f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="CSS 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-shopping-css-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md deleted file mode 100644 index bd124d2e6f59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-css-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-shopping-css-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/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/css/v1" - -::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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/shopping/css/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-css-v1/Gemfile b/owl-bot-staging/google-shopping-css-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-css-v1/LICENSE.md b/owl-bot-staging/google-shopping-css-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/README.md b/owl-bot-staging/google-shopping-css-v1/README.md deleted file mode 100644 index d415042608c0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the CSS V1 API - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -Programmatically manage your Comparison Shopping Service (CSS) account data at scale. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the CSS V1 API. Most users should consider using -the main client gem, -[google-shopping-css](https://rubygems.org/gems/google-shopping-css). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-css-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/css.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/css/v1" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new -request = ::Google::Shopping::Css::V1::ListChildAccountsRequest.new # (request fields as keyword arguments...) -response = client.list_child_accounts request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-css-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/comparison-shopping-services/api) -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/shopping/css/v1" -require "logger" - -client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-css`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-css-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-shopping-css`. -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-shopping-css-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-shopping-css-v1/Rakefile b/owl-bot-staging/google-shopping-css-v1/Rakefile deleted file mode 100644 index 635d913938d1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-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/shopping/css/v1/accounts_service/credentials" - ::Google::Shopping::Css::V1::AccountsService::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-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-css-v1" - header "google-shopping-css-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-css-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-css-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-shopping-css-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-shopping-css-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-shopping-css-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json deleted file mode 100644 index 752bb921cc5e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/gapic_metadata.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.css.v1", - "libraryPackage": "::Google::Shopping::Css::V1", - "services": { - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountsService::Client", - "rpcs": { - "ListChildAccounts": { - "methods": [ - "list_child_accounts" - ] - }, - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "UpdateLabels": { - "methods": [ - "update_labels" - ] - } - } - } - } - }, - "AccountLabelsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::AccountLabelsService::Client", - "rpcs": { - "ListAccountLabels": { - "methods": [ - "list_account_labels" - ] - }, - "CreateAccountLabel": { - "methods": [ - "create_account_label" - ] - }, - "UpdateAccountLabel": { - "methods": [ - "update_account_label" - ] - }, - "DeleteAccountLabel": { - "methods": [ - "delete_account_label" - ] - } - } - } - } - }, - "CssProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductInputsService::Client", - "rpcs": { - "InsertCssProductInput": { - "methods": [ - "insert_css_product_input" - ] - }, - "UpdateCssProductInput": { - "methods": [ - "update_css_product_input" - ] - }, - "DeleteCssProductInput": { - "methods": [ - "delete_css_product_input" - ] - } - } - } - } - }, - "CssProductsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::CssProductsService::Client", - "rpcs": { - "GetCssProduct": { - "methods": [ - "get_css_product" - ] - }, - "ListCssProducts": { - "methods": [ - "list_css_products" - ] - } - } - } - } - }, - "QuotaService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Css::V1::QuotaService::Client", - "rpcs": { - "ListQuotaGroups": { - "methods": [ - "list_quota_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec b/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec deleted file mode 100644 index 691a6b20a1da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/google-shopping-css-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/css/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-css-v1" - gem.version = Google::Shopping::Css::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale. Note that google-shopping-css-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-css instead. See the readme for more details." - gem.summary = "Programmatically manage your Comparison Shopping Service (CSS) account data at scale." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-v1.rb deleted file mode 100644 index a93e9af0be45..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google-shopping-css-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/shopping/css/v1" diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb deleted file mode 100644 index d1249eab068b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_service" -require "google/shopping/css/v1/account_labels_service" -require "google/shopping/css/v1/css_product_inputs_service" -require "google/shopping/css/v1/css_products_service" -require "google/shopping/css/v1/quota_service" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/css/v1" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/css/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service.rb deleted file mode 100644 index bd9585d09cc4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/client" -require "google/shopping/css/v1/account_labels_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/account_labels_service" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_labels_service", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb deleted file mode 100644 index f12cbcd80856..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/client.rb +++ /dev/null @@ -1,785 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - ## - # Client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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/shopping/css/v1/accounts_labels_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 - - @account_labels_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountLabelsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :list_account_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :create_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_label&.name - header_params["account_label.name"] = request.account_label.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :update_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.call_rpc :delete_account_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountLabelsService API. - # - # This class represents the configuration for AccountLabelsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountLabelsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb deleted file mode 100644 index 0e7c2cfdd5da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Credentials for the AccountLabelsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb deleted file mode 100644 index 2f421e27577b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Path helper methods for the AccountLabelsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountLabel resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/labels/{label}` - # - # @param account [String] - # @param label [String] - # - # @return [::String] - def account_label_path account:, label: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/labels/#{label}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest.rb deleted file mode 100644 index 728b66d6ac46..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_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/shopping/css/v1/version" - -require "google/shopping/css/v1/account_labels_service/credentials" -require "google/shopping/css/v1/account_labels_service/paths" -require "google/shopping/css/v1/account_labels_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Manages Merchant Center and CSS accounts labels. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/account_labels_service/rest" - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - module AccountLabelsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/account_labels_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb deleted file mode 100644 index 0a653f5e9a25..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +++ /dev/null @@ -1,714 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST client for the AccountLabelsService service. - # - # Manages Merchant Center and CSS accounts labels. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_labels_service_stub - - ## - # Configure the AccountLabelsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLabelsService clients - # ::Google::Shopping::Css::V1::AccountLabelsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_account_labels.timeout = 60.0 - default_config.rpcs.list_account_labels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_account_label.timeout = 60.0 - - default_config.rpcs.update_account_label.timeout = 60.0 - - default_config.rpcs.delete_account_label.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLabelsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountLabelsService::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 - @account_labels_service_stub.universe_domain - end - - ## - # Create a new AccountLabelsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLabelsService 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 - - @account_labels_service_stub = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_labels_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 - @account_labels_service_stub.logger - end - - # Service calls - - ## - # Lists the labels owned by an account. - # - # @overload list_account_labels(request, options = nil) - # Pass arguments to `list_account_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::ListAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_labels(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::AccountLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - # - # # Call the list_account_labels method. - # result = client.list_account_labels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - # p item - # end - # - def list_account_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.list_account_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_labels_service_stub, :list_account_labels, "account_labels", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new label, not assigned to any account. - # - # @overload create_account_label(request, options = nil) - # Pass arguments to `create_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::CreateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_account_label(parent: nil, account_label: nil) - # Pass arguments to `create_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The label to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - # - # # Call the create_account_label method. - # result = client.create_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def create_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::CreateAccountLabelRequest - - # Converts hash and nil to an 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_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.create_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a label. - # - # @overload update_account_label(request, options = nil) - # Pass arguments to `update_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_label(account_label: nil) - # Pass arguments to `update_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_label [::Google::Shopping::Css::V1::AccountLabel, ::Hash] - # Required. The updated label. All fields must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - # - # # Call the update_account_label method. - # result = client.update_account_label request - # - # # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - # p result - # - def update_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.update_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a label and removes it from all accounts to which it was assigned. - # - # @overload delete_account_label(request, options = nil) - # Pass arguments to `delete_account_label` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteAccountLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account_label(name: nil) - # Pass arguments to `delete_account_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - # - # # Call the delete_account_label method. - # result = client.delete_account_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteAccountLabelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account_label.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_account_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_labels_service_stub.delete_account_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountLabelsService REST API. - # - # This class represents the configuration for AccountLabelsService 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::Shopping::Css::V1::AccountLabelsService::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_account_labels to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_labels.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountLabelsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_labels - ## - # RPC-specific configuration for `create_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_label - ## - # RPC-specific configuration for `update_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_label - ## - # RPC-specific configuration for `delete_account_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_label - - # @private - def initialize parent_rpcs = nil - list_account_labels_config = parent_rpcs.list_account_labels if parent_rpcs.respond_to? :list_account_labels - @list_account_labels = ::Gapic::Config::Method.new list_account_labels_config - create_account_label_config = parent_rpcs.create_account_label if parent_rpcs.respond_to? :create_account_label - @create_account_label = ::Gapic::Config::Method.new create_account_label_config - update_account_label_config = parent_rpcs.update_account_label if parent_rpcs.respond_to? :update_account_label - @update_account_label = ::Gapic::Config::Method.new update_account_label_config - delete_account_label_config = parent_rpcs.delete_account_label if parent_rpcs.respond_to? :delete_account_label - @delete_account_label = ::Gapic::Config::Method.new delete_account_label_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb deleted file mode 100644 index a9b8cb91fe84..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_labels_pb" - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - module Rest - ## - # REST service stub for the AccountLabelsService 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_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListAccountLabelsResponse] - # A result object deserialized from the server's reply - def list_account_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.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_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def create_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::AccountLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::AccountLabel] - # A result object deserialized from the server's reply - def update_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::AccountLabel.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_account_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_label_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_account_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/labels", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::CreateAccountLabelRequest] - # 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_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/labels", - body: "account_label", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{account_label.name}", - body: "account_label", - matches: [ - ["account_label.name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account_label REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteAccountLabelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/labels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb deleted file mode 100644 index 91f38e92911a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts_labels.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n,google/shopping/css/v1/accounts_labels.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9a\x03\n\x0c\x41\x63\x63ountLabel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08label_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\naccount_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tH\x01\x88\x01\x01\x12G\n\nlabel_type\x18\x06 \x01(\x0e\x32..google.shopping.css.v1.AccountLabel.LabelTypeB\x03\xe0\x41\x03\"B\n\tLabelType\x12\x1a\n\x16LABEL_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:d\xea\x41\x61\n\x1f\x63ss.googleapis.com/AccountLabel\x12!accounts/{account}/labels/{label}*\raccountLabels2\x0c\x61\x63\x63ountLabelB\x0f\n\r_display_nameB\x0e\n\x0c_description\"z\n\x18ListAccountLabelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x19ListAccountLabelsResponse\x12<\n\x0e\x61\x63\x63ount_labels\x18\x01 \x03(\x0b\x32$.google.shopping.css.v1.AccountLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x96\x01\n\x19\x43reateAccountLabelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63ss.googleapis.com/AccountLabel\x12@\n\raccount_label\x18\x02 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"]\n\x19UpdateAccountLabelRequest\x12@\n\raccount_label\x18\x01 \x01(\x0b\x32$.google.shopping.css.v1.AccountLabelB\x03\xe0\x41\x02\"R\n\x19\x44\x65leteAccountLabelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63ss.googleapis.com/AccountLabel2\x97\x06\n\x14\x41\x63\x63ountLabelsService\x12\xa9\x01\n\x11ListAccountLabels\x12\x30.google.shopping.css.v1.ListAccountLabelsRequest\x1a\x31.google.shopping.css.v1.ListAccountLabelsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/labels\x12\xbb\x01\n\x12\x43reateAccountLabel\x12\x31.google.shopping.css.v1.CreateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"L\xda\x41\x14parent,account_label\x82\xd3\xe4\x93\x02/\"\x1e/v1/{parent=accounts/*}/labels:\raccount_label\x12\xc2\x01\n\x12UpdateAccountLabel\x12\x31.google.shopping.css.v1.UpdateAccountLabelRequest\x1a$.google.shopping.css.v1.AccountLabel\"S\xda\x41\raccount_label\x82\xd3\xe4\x93\x02=2,/v1/{account_label.name=accounts/*/labels/*}:\raccount_label\x12\x8e\x01\n\x12\x44\x65leteAccountLabel\x12\x31.google.shopping.css.v1.DeleteAccountLabelRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=accounts/*/labels/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb5\x01\n\x1a\x63om.google.shopping.css.v1B\x13\x41\x63\x63ountsLabelsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - AccountLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel").msgclass - AccountLabel::LabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.AccountLabel.LabelType").enummodule - ListAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsRequest").msgclass - ListAccountLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListAccountLabelsResponse").msgclass - CreateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CreateAccountLabelRequest").msgclass - UpdateAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelRequest").msgclass - DeleteAccountLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteAccountLabelRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb deleted file mode 100644 index 1d0c4f3552e2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts_labels.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_labels_pb' - -module Google - module Shopping - module Css - module V1 - module AccountLabelsService - # Manages Merchant Center and CSS accounts labels. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountLabelsService' - - # Lists the labels owned by an account. - rpc :ListAccountLabels, ::Google::Shopping::Css::V1::ListAccountLabelsRequest, ::Google::Shopping::Css::V1::ListAccountLabelsResponse - # Creates a new label, not assigned to any account. - rpc :CreateAccountLabel, ::Google::Shopping::Css::V1::CreateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Updates a label. - rpc :UpdateAccountLabel, ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, ::Google::Shopping::Css::V1::AccountLabel - # Deletes a label and removes it from all accounts to which it was assigned. - rpc :DeleteAccountLabel, ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb deleted file mode 100644 index 4c0a1eaabeb1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n%google/shopping/css/v1/accounts.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x01\n\x18ListChildAccountsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x15\n\x08label_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tfull_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\t_label_idB\x0c\n\n_full_name\"g\n\x19ListChildAccountsResponse\x12\x31\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1f.google.shopping.css.v1.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x89\x01\n\x11GetAccountRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x37\n\x06parent\x18\x02 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xa5\x01\n\x1aUpdateAccountLabelsRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/Account\x12\x11\n\tlabel_ids\x18\x02 \x03(\x03\x12\x37\n\x06parent\x18\x03 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1a\x63ss.googleapis.com/AccountH\x00\x88\x01\x01\x42\t\n\x07_parent\"\xbb\x04\n\x07\x41\x63\x63ount\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\tfull_name\x18\x02 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x0chomepage_uri\x18\x04 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x13\n\x06parent\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x11\n\tlabel_ids\x18\x06 \x03(\x03\x12\x1b\n\x13\x61utomatic_label_ids\x18\x07 \x03(\x03\x12\x46\n\x0c\x61\x63\x63ount_type\x18\x08 \x01(\x0e\x32+.google.shopping.css.v1.Account.AccountTypeB\x03\xe0\x41\x03\"\xc6\x01\n\x0b\x41\x63\x63ountType\x12\x1c\n\x18\x41\x43\x43OUNT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCSS_GROUP\x10\x01\x12\x0e\n\nCSS_DOMAIN\x10\x02\x12\x16\n\x12MC_PRIMARY_CSS_MCA\x10\x03\x12\x0e\n\nMC_CSS_MCA\x10\x04\x12\x16\n\x12MC_MARKETPLACE_MCA\x10\x05\x12\x10\n\x0cMC_OTHER_MCA\x10\x06\x12\x11\n\rMC_STANDALONE\x10\x07\x12\x15\n\x11MC_MCA_SUBACCOUNT\x10\x08:F\xea\x41\x43\n\x1a\x63ss.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}*\x08\x61\x63\x63ounts2\x07\x61\x63\x63ountB\x0f\n\r_display_nameB\x0f\n\r_homepage_uriB\t\n\x07_parent2\xa5\x04\n\x0f\x41\x63\x63ountsService\x12\xb4\x01\n\x11ListChildAccounts\x12\x30.google.shopping.css.v1.ListChildAccountsRequest\x1a\x31.google.shopping.css.v1.ListChildAccountsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=accounts/*}:listChildAccounts\x12~\n\nGetAccount\x12).google.shopping.css.v1.GetAccountRequest\x1a\x1f.google.shopping.css.v1.Account\"$\xda\x41\x04name\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=accounts/*}\x12\x99\x01\n\x0cUpdateLabels\x12\x32.google.shopping.css.v1.UpdateAccountLabelsRequest\x1a\x1f.google.shopping.css.v1.Account\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=accounts/*}:updateLabels:\x01*\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xaf\x01\n\x1a\x63om.google.shopping.css.v1B\rAccountsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - ListChildAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsRequest").msgclass - ListChildAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListChildAccountsResponse").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetAccountRequest").msgclass - UpdateAccountLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateAccountLabelsRequest").msgclass - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account").msgclass - Account::AccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Account.AccountType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service.rb deleted file mode 100644 index cbe6be04f569..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/client" -require "google/shopping/css/v1/accounts_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/accounts_service" - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/css/v1/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb deleted file mode 100644 index da91d95b8f0c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/client.rb +++ /dev/null @@ -1,709 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - ## - # Client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/css/v1/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::AccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_child_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_labels, request, 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 AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb deleted file mode 100644 index 4584fe4873de..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/paths.rb deleted file mode 100644 index e069680bdb33..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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 Shopping - module Css - module V1 - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest.rb deleted file mode 100644 index 996c51dd8cec..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_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/shopping/css/v1/version" - -require "google/shopping/css/v1/accounts_service/credentials" -require "google/shopping/css/v1/accounts_service/paths" -require "google/shopping/css/v1/accounts_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for managing CSS/MC account information. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/accounts_service/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb deleted file mode 100644 index 8a279b8f7067..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/client.rb +++ /dev/null @@ -1,645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service for managing CSS/MC account information. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Css::V1::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Css::V1::AccountsService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_child_accounts.timeout = 60.0 - default_config.rpcs.list_child_accounts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_account.timeout = 60.0 - default_config.rpcs.get_account.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_labels.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - # - # @overload list_child_accounts(request, options = nil) - # Pass arguments to `list_child_accounts` via a request object, either of type - # {::Google::Shopping::Css::V1::ListChildAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_child_accounts(parent: nil, label_id: nil, full_name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_child_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @param label_id [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @param full_name [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - # - # # Call the list_child_accounts method. - # result = client.list_child_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::Account. - # p item - # end - # - def list_child_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListChildAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_child_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_child_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_child_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_child_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_child_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a single CSS/MC account by ID. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Css::V1::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil, parent: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @param parent [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates labels assigned to CSS/MC accounts by a CSS domain. - # - # @overload update_labels(request, options = nil) - # Pass arguments to `update_labels` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateAccountLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_labels(name: nil, label_ids: nil, parent: nil) - # Pass arguments to `update_labels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @param label_ids [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @param parent [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - # - # # Call the update_labels method. - # result = client.update_labels request - # - # # The returned object is of type Google::Shopping::Css::V1::Account. - # p result - # - def update_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_labels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_labels request, 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 AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Css::V1::AccountsService::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_child_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_child_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_child_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_child_accounts - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `update_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :update_labels - - # @private - def initialize parent_rpcs = nil - list_child_accounts_config = parent_rpcs.list_child_accounts if parent_rpcs.respond_to? :list_child_accounts - @list_child_accounts = ::Gapic::Config::Method.new list_child_accounts_config - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - update_labels_config = parent_rpcs.update_labels if parent_rpcs.respond_to? :update_labels - @update_labels = ::Gapic::Config::Method.new update_labels_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb deleted file mode 100644 index afe5123dbfaa..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_pb" - -module Google - module Shopping - module Css - module V1 - module AccountsService - module Rest - ## - # REST service stub for the AccountsService 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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListChildAccountsResponse] - # A result object deserialized from the server's reply - def list_child_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_child_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_child_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::Account] - # A result object deserialized from the server's reply - def update_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_labels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::Account.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_child_accounts REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListChildAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_child_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:listChildAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_labels REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateAccountLabelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:updateLabels", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb deleted file mode 100644 index 6528ad62148c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/accounts_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/accounts.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/accounts_pb' - -module Google - module Shopping - module Css - module V1 - module AccountsService - # Service for managing CSS/MC account information. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.AccountsService' - - # Lists all the accounts under the specified CSS account ID, and - # optionally filters by label ID and account name. - rpc :ListChildAccounts, ::Google::Shopping::Css::V1::ListChildAccountsRequest, ::Google::Shopping::Css::V1::ListChildAccountsResponse - # Retrieves a single CSS/MC account by ID. - rpc :GetAccount, ::Google::Shopping::Css::V1::GetAccountRequest, ::Google::Shopping::Css::V1::Account - # Updates labels assigned to CSS/MC accounts by a CSS domain. - rpc :UpdateLabels, ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, ::Google::Shopping::Css::V1::Account - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb deleted file mode 100644 index bd5bfbf234cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_common_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_common.proto\x12\x16google.shopping.css.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xbc\x13\n\nAttributes\x12\x15\n\x08\x63pp_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63pp_mobile_link\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x63pp_ads_redirect\x18* \x01(\tH\x02\x88\x01\x01\x12.\n\tlow_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nhigh_price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1d\n\x10number_of_offers\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18headline_offer_condition\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x39\n\x14headline_offer_price\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12 \n\x13headline_offer_link\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\'\n\x1aheadline_offer_mobile_link\x18\t \x01(\tH\x06\x88\x01\x01\x12\x42\n\x1dheadline_offer_shipping_price\x18) \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x12\n\x05title\x18\n \x01(\tH\x07\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x18\n\x0b\x64\x65scription\x18\r \x01(\tH\t\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x0e \x01(\tH\n\x88\x01\x01\x12\x10\n\x03mpn\x18\x0f \x01(\tH\x0b\x88\x01\x01\x12\x11\n\x04gtin\x18\x10 \x01(\tH\x0c\x88\x01\x01\x12\x15\n\rproduct_types\x18$ \x03(\t\x12$\n\x17google_product_category\x18\x11 \x01(\tH\r\x88\x01\x01\x12\x12\n\x05\x61\x64ult\x18\x12 \x01(\x08H\x0e\x88\x01\x01\x12\x16\n\tmultipack\x18\x13 \x01(\x03H\x0f\x88\x01\x01\x12\x16\n\tis_bundle\x18\x14 \x01(\x08H\x10\x88\x01\x01\x12\x16\n\tage_group\x18\x15 \x01(\tH\x11\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x12\x88\x01\x01\x12\x13\n\x06gender\x18\x17 \x01(\tH\x13\x88\x01\x01\x12\x15\n\x08material\x18\x18 \x01(\tH\x14\x88\x01\x01\x12\x14\n\x07pattern\x18\x19 \x01(\tH\x15\x88\x01\x01\x12\x11\n\x04size\x18\x1a \x01(\tH\x16\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x1b \x01(\tH\x17\x88\x01\x01\x12\x12\n\nsize_types\x18\x1c \x03(\t\x12\x1a\n\ritem_group_id\x18\x1d \x01(\tH\x18\x88\x01\x01\x12>\n\x0fproduct_details\x18\x1e \x03(\x0b\x32%.google.shopping.css.v1.ProductDetail\x12=\n\x0eproduct_weight\x18\x1f \x01(\x0b\x32%.google.shopping.css.v1.ProductWeight\x12@\n\x0eproduct_length\x18 \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12?\n\rproduct_width\x18! \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12@\n\x0eproduct_height\x18\" \x01(\x0b\x32(.google.shopping.css.v1.ProductDimension\x12\x1a\n\x12product_highlights\x18# \x03(\t\x12=\n\x0e\x63\x65rtifications\x18\' \x03(\x0b\x32%.google.shopping.css.v1.Certification\x12\x33\n\x0f\x65xpiration_date\x18( \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15included_destinations\x18+ \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18, \x03(\t\x12\x12\n\x05pause\x18- \x01(\tH\x19\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18. \x01(\tH\x1a\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18/ \x01(\tH\x1b\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18\x30 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18\x31 \x01(\tH\x1d\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18\x32 \x01(\tH\x1e\x88\x01\x01\x12T\n\x1aheadline_offer_installment\x18\x33 \x01(\x0b\x32\x30.google.shopping.css.v1.HeadlineOfferInstallment\x12_\n headline_offer_subscription_cost\x18\x34 \x01(\x0b\x32\x35.google.shopping.css.v1.HeadlineOfferSubscriptionCost\x12\x19\n\x0creview_count\x18\x36 \x01(\x03H\x1f\x88\x01\x01\x12\x17\n\nmin_rating\x18\x37 \x01(\x03H \x88\x01\x01\x12\x17\n\nmax_rating\x18\x38 \x01(\x03H!\x88\x01\x01\x12\x13\n\x06rating\x18\x39 \x01(\x01H\"\x88\x01\x01\x42\x0b\n\t_cpp_linkB\x12\n\x10_cpp_mobile_linkB\x13\n\x11_cpp_ads_redirectB\x13\n\x11_number_of_offersB\x1b\n\x19_headline_offer_conditionB\x16\n\x14_headline_offer_linkB\x1d\n\x1b_headline_offer_mobile_linkB\x08\n\x06_titleB\r\n\x0b_image_linkB\x0e\n\x0c_descriptionB\x08\n\x06_brandB\x06\n\x04_mpnB\x07\n\x05_gtinB\x1a\n\x18_google_product_categoryB\x08\n\x06_adultB\x0c\n\n_multipackB\x0c\n\n_is_bundleB\x0c\n\n_age_groupB\x08\n\x06_colorB\t\n\x07_genderB\x0b\n\t_materialB\n\n\x08_patternB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x10\n\x0e_item_group_idB\x08\n\x06_pauseB\x11\n\x0f_custom_label_0B\x11\n\x0f_custom_label_1B\x11\n\x0f_custom_label_2B\x11\n\x0f_custom_label_3B\x11\n\x0f_custom_label_4B\x0f\n\r_review_countB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_rating\">\n\rCertification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tauthority\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"V\n\rProductDetail\x12\x14\n\x0csection_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x02 \x01(\t\x12\x17\n\x0f\x61ttribute_value\x18\x03 \x01(\t\"9\n\x10ProductDimension\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"6\n\rProductWeight\x12\x12\n\x05value\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x05\n\x10\x43ssProductStatus\x12X\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32:.google.shopping.css.v1.CssProductStatus.DestinationStatus\x12R\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x37.google.shopping.css.v1.CssProductStatus.ItemLevelIssue\x12\x31\n\rcreation_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_date\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16google_expiration_date\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x11\x44\x65stinationStatus\x12\x13\n\x0b\x64\x65stination\x18\x01 \x01(\t\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x19\n\x11pending_countries\x18\x03 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x04 \x03(\t\x1a\xc9\x01\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0bservability\x18\x02 \x01(\t\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x07 \x01(\t\x12\x15\n\rdocumentation\x18\x08 \x01(\t\x12\x1c\n\x14\x61pplicable_countries\x18\t \x03(\t\"\x9f\x01\n\x1dHeadlineOfferSubscriptionCost\x12:\n\x06period\x18\x01 \x01(\x0e\x32*.google.shopping.css.v1.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\x89\x01\n\x18HeadlineOfferInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x30\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price*N\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x42\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductCommonProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Attributes").msgclass - Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.Certification").msgclass - ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDetail").msgclass - ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductDimension").msgclass - ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ProductWeight").msgclass - CssProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus").msgclass - CssProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.DestinationStatus").msgclass - CssProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductStatus.ItemLevelIssue").msgclass - HeadlineOfferSubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferSubscriptionCost").msgclass - HeadlineOfferInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.HeadlineOfferInstallment").msgclass - SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.SubscriptionPeriod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb deleted file mode 100644 index 4b67b42e62d4..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_product_inputs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n/google/shopping/css/v1/css_product_inputs.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"\xa7\x03\n\x0f\x43ssProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nfinal_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fraw_provided_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x66reshness_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x36\n\nattributes\x18\x07 \x01(\x0b\x32\".google.shopping.css.v1.Attributes\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:`\xea\x41]\n\"css.googleapis.com/CssProductInput\x12\x37\x61\x63\x63ounts/{account}/cssProductInputs/{css_product_input}\"\xbb\x01\n\x1cInsertCssProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"css.googleapis.com/CssProductInput\x12G\n\x11\x63ss_product_input\x18\x02 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12\x16\n\x07\x66\x65\x65\x64_id\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x01\"\x98\x01\n\x1cUpdateCssProductInputRequest\x12G\n\x11\x63ss_product_input\x18\x01 \x01(\x0b\x32\'.google.shopping.css.v1.CssProductInputB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n\x1c\x44\x65leteCssProductInputRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"css.googleapis.com/CssProductInput\x12!\n\x14supplemental_feed_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x17\n\x15_supplemental_feed_id2\xb0\x05\n\x17\x43ssProductInputsService\x12\xc2\x01\n\x15InsertCssProductInput\x12\x34.google.shopping.css.v1.InsertCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"J\x82\xd3\xe4\x93\x02\x44\"//v1/{parent=accounts/*}/cssProductInputs:insert:\x11\x63ss_product_input\x12\xed\x01\n\x15UpdateCssProductInput\x12\x34.google.shopping.css.v1.UpdateCssProductInputRequest\x1a\'.google.shopping.css.v1.CssProductInput\"u\xda\x41\x1d\x63ss_product_input,update_mask\x82\xd3\xe4\x93\x02O2:/v1/{css_product_input.name=accounts/*/cssProductInputs/*}:\x11\x63ss_product_input\x12\x9e\x01\n\x15\x44\x65leteCssProductInput\x12\x34.google.shopping.css.v1.DeleteCssProductInputRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=accounts/*/cssProductInputs/*}\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb7\x01\n\x1a\x63om.google.shopping.css.v1B\x15\x43ssProductInputsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - CssProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProductInput").msgclass - InsertCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.InsertCssProductInputRequest").msgclass - UpdateCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.UpdateCssProductInputRequest").msgclass - DeleteCssProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.DeleteCssProductInputRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb deleted file mode 100644 index d9b82213398f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/client" -require "google/shopping/css/v1/css_product_inputs_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_product_inputs_service" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_product_inputs_service", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb deleted file mode 100644 index 79c357cee408..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +++ /dev/null @@ -1,716 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - ## - # Client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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/shopping/css/v1/css_product_inputs_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 - - @css_product_inputs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductInputsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :insert_css_product_input, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.css_product_input&.name - header_params["css_product_input.name"] = request.css_product_input.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :update_css_product_input, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.call_rpc :delete_css_product_input, request, 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 CssProductInputsService API. - # - # This class represents the configuration for CssProductInputsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductInputsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb deleted file mode 100644 index 066f5ca9210d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Credentials for the CssProductInputsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb deleted file mode 100644 index b71796db1d3e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Path helper methods for the CssProductInputsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProductInput resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProductInputs/{css_product_input}` - # - # @param account [String] - # @param css_product_input [String] - # - # @return [::String] - def css_product_input_path account:, css_product_input: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProductInputs/#{css_product_input}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb deleted file mode 100644 index 06be63d42390..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_product_inputs_service/credentials" -require "google/shopping/css/v1/css_product_inputs_service/paths" -require "google/shopping/css/v1/css_product_inputs_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_product_inputs_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - module CssProductInputsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb deleted file mode 100644 index 42512d523193..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +++ /dev/null @@ -1,652 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST client for the CssProductInputsService service. - # - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_product_inputs_service_stub - - ## - # Configure the CssProductInputsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductInputsService clients - # ::Google::Shopping::Css::V1::CssProductInputsService::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", "Shopping", "Css", "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.insert_css_product_input.timeout = 60.0 - - default_config.rpcs.update_css_product_input.timeout = 60.0 - - default_config.rpcs.delete_css_product_input.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CssProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductInputsService::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 - @css_product_inputs_service_stub.universe_domain - end - - ## - # Create a new CssProductInputsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductInputsService 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 - - @css_product_inputs_service_stub = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_product_inputs_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 - @css_product_inputs_service_stub.logger - end - - # Service calls - - ## - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - # - # @overload insert_css_product_input(request, options = nil) - # Pass arguments to `insert_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::InsertCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_css_product_input(parent: nil, css_product_input: nil, feed_id: nil) - # Pass arguments to `insert_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS Product Input to insert. - # @param feed_id [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - # - # # Call the insert_css_product_input method. - # result = client.insert_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def insert_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::InsertCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.insert_css_product_input request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - # - # @overload update_css_product_input(request, options = nil) - # Pass arguments to `update_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::UpdateCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_css_product_input(css_product_input: nil, update_mask: nil) - # Pass arguments to `update_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param css_product_input [::Google::Shopping::Css::V1::CssProductInput, ::Hash] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - # - # # Call the update_css_product_input method. - # result = client.update_css_product_input request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - # p result - # - def update_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::UpdateCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.update_css_product_input request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - # - # @overload delete_css_product_input(request, options = nil) - # Pass arguments to `delete_css_product_input` via a request object, either of type - # {::Google::Shopping::Css::V1::DeleteCssProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_css_product_input(name: nil, supplemental_feed_id: nil) - # Pass arguments to `delete_css_product_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @param supplemental_feed_id [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - # - # # Call the delete_css_product_input method. - # result = client.delete_css_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_css_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::DeleteCssProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_css_product_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_css_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_css_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_product_inputs_service_stub.delete_css_product_input request, 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 CssProductInputsService REST API. - # - # This class represents the configuration for CssProductInputsService 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::Shopping::Css::V1::CssProductInputsService::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 - # # insert_css_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_css_product_input.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_css_product_input - ## - # RPC-specific configuration for `update_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_css_product_input - ## - # RPC-specific configuration for `delete_css_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_css_product_input - - # @private - def initialize parent_rpcs = nil - insert_css_product_input_config = parent_rpcs.insert_css_product_input if parent_rpcs.respond_to? :insert_css_product_input - @insert_css_product_input = ::Gapic::Config::Method.new insert_css_product_input_config - update_css_product_input_config = parent_rpcs.update_css_product_input if parent_rpcs.respond_to? :update_css_product_input - @update_css_product_input = ::Gapic::Config::Method.new update_css_product_input_config - delete_css_product_input_config = parent_rpcs.delete_css_product_input if parent_rpcs.respond_to? :delete_css_product_input - @delete_css_product_input = ::Gapic::Config::Method.new delete_css_product_input_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb deleted file mode 100644 index 3eb2aa0f1884..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/css_product_inputs_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - module Rest - ## - # REST service stub for the CssProductInputsService 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def insert_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProductInput] - # A result object deserialized from the server's reply - def update_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_css_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_css_product_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_css_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 insert_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::InsertCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/cssProductInputs:insert", - body: "css_product_input", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::UpdateCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{css_product_input.name}", - body: "css_product_input", - matches: [ - ["css_product_input.name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_css_product_input REST call - # - # @param request_pb [::Google::Shopping::Css::V1::DeleteCssProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_css_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProductInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb deleted file mode 100644 index a872c72a6951..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_product_inputs.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_product_inputs_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductInputsService - # Service to use CssProductInput resource. - # This service helps to insert/update/delete CSS Products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductInputsService' - - # Uploads a CssProductInput to your CSS Center account. If an - # input with the same contentLanguage, identity, feedLabel and feedId already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a CSS Product input, it may - # take several minutes before the processed CSS Product can be retrieved. - rpc :InsertCssProductInput, ::Google::Shopping::Css::V1::InsertCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Updates the existing Css Product input in your CSS Center account. - # - # After inserting, updating, or deleting a CSS Product input, it may take - # several minutes before the processed Css Product can be retrieved. - rpc :UpdateCssProductInput, ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, ::Google::Shopping::Css::V1::CssProductInput - # Deletes a CSS Product input from your CSS Center account. - # - # After a delete it may take several minutes until the input is no longer - # available. - rpc :DeleteCssProductInput, ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb deleted file mode 100644 index b23a373fe93d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/css_products.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/shopping/css/v1/css_product_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n)google/shopping/css/v1/css_products.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/shopping/css/v1/css_product_common.proto\x1a google/shopping/type/types.proto\"K\n\x14GetCssProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63ss.googleapis.com/CssProduct\"\xaa\x03\n\nCssProduct\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fraw_provided_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12;\n\nattributes\x18\x05 \x01(\x0b\x32\".google.shopping.css.v1.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\x06 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12I\n\x12\x63ss_product_status\x18\x08 \x01(\x0b\x32(.google.shopping.css.v1.CssProductStatusB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/CssProduct\x12,accounts/{account}/cssProducts/{css_product}*\x0b\x63ssProducts2\ncssProduct\"v\n\x16ListCssProductsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/CssProduct\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListCssProductsResponse\x12\x38\n\x0c\x63ss_products\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.CssProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x98\x03\n\x12\x43ssProductsService\x12\x95\x01\n\rGetCssProduct\x12,.google.shopping.css.v1.GetCssProductRequest\x1a\".google.shopping.css.v1.CssProduct\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=accounts/*/cssProducts/*}\x12\xa8\x01\n\x0fListCssProducts\x12..google.shopping.css.v1.ListCssProductsRequest\x1a/.google.shopping.css.v1.ListCssProductsResponse\"4\xda\x41\x06parent\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=accounts/*}/cssProducts\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xb2\x01\n\x1a\x63om.google.shopping.css.v1B\x10\x43ssProductsProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - GetCssProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.GetCssProductRequest").msgclass - CssProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.CssProduct").msgclass - ListCssProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsRequest").msgclass - ListCssProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListCssProductsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb deleted file mode 100644 index ace56839641d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/client" -require "google/shopping/css/v1/css_products_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/css_products_service" - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "css_products_service", "helpers.rb" -require "google/shopping/css/v1/css_products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb deleted file mode 100644 index 5f43148a4403..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/client.rb +++ /dev/null @@ -1,606 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - ## - # Client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "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_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.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 CssProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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/shopping/css/v1/css_products_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 - - @css_products_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::CssProductsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_css_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :get_css_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_css_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.call_rpc :list_css_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @css_products_service_stub, :list_css_products, request, response, 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 CssProductsService API. - # - # This class represents the configuration for CssProductsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::CssProductsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb deleted file mode 100644 index 5656f955c92c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Credentials for the CssProductsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb deleted file mode 100644 index e311ef6467e0..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/paths.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Path helper methods for the CssProductsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified CssProduct resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/cssProducts/{css_product}` - # - # @param account [String] - # @param css_product [String] - # - # @return [::String] - def css_product_path account:, css_product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/cssProducts/#{css_product}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb deleted file mode 100644 index 6c5a8ef0a46d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/css/v1/version" - -require "google/shopping/css/v1/css_products_service/credentials" -require "google/shopping/css/v1/css_products_service/paths" -require "google/shopping/css/v1/css_products_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/css_products_service/rest" - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - module CssProductsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/css_products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb deleted file mode 100644 index ca2c12860121..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/client.rb +++ /dev/null @@ -1,549 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST client for the CssProductsService service. - # - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :css_products_service_stub - - ## - # Configure the CssProductsService Client class. - # - # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CssProductsService clients - # ::Google::Shopping::Css::V1::CssProductsService::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", "Shopping", "Css", "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_css_product.timeout = 60.0 - default_config.rpcs.get_css_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_css_products.timeout = 60.0 - default_config.rpcs.list_css_products.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 CssProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::CssProductsService::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 - @css_products_service_stub.universe_domain - end - - ## - # Create a new CssProductsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CssProductsService 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 - - @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @css_products_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 - @css_products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - # - # @overload get_css_product(request, options = nil) - # Pass arguments to `get_css_product` via a request object, either of type - # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_css_product(name: nil) - # Pass arguments to `get_css_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::GetCssProductRequest.new - # - # # Call the get_css_product method. - # result = client.get_css_product request - # - # # The returned object is of type Google::Shopping::Css::V1::CssProduct. - # p result - # - def get_css_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_css_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_css_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_css_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.get_css_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - # - # @overload list_css_products(request, options = nil) - # Pass arguments to `list_css_products` via a request object, either of type - # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_css_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_css_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListCssProductsRequest.new - # - # # Call the list_css_products method. - # result = client.list_css_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - # p item - # end - # - def list_css_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_css_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_css_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_css_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @css_products_service_stub.list_css_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_products", request, result, 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 CssProductsService REST API. - # - # This class represents the configuration for CssProductsService 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::Shopping::Css::V1::CssProductsService::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_css_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_css_product.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 CssProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_css_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_css_product - ## - # RPC-specific configuration for `list_css_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_css_products - - # @private - def initialize parent_rpcs = nil - get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product - @get_css_product = ::Gapic::Config::Method.new get_css_product_config - list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products - @list_css_products = ::Gapic::Config::Method.new list_css_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb deleted file mode 100644 index d7eea4bfc0da..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/css_products_pb" - -module Google - module Shopping - module Css - module V1 - module CssProductsService - module Rest - ## - # REST service stub for the CssProductsService 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_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::CssProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::CssProduct] - # A result object deserialized from the server's reply - def get_css_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_css_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_css_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::CssProduct.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListCssProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListCssProductsResponse] - # A result object deserialized from the server's reply - def list_css_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_css_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_css_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListCssProductsResponse.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_css_product REST call - # - # @param request_pb [::Google::Shopping::Css::V1::GetCssProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_css_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/cssProducts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_css_products REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListCssProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_css_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cssProducts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb deleted file mode 100644 index 50ec396539bb..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/css_products_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/css_products.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/css_products_pb' - -module Google - module Shopping - module Css - module V1 - module CssProductsService - # Service for doing get and list on Css Products(a.k.a Aggregate Offers - # internally). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.CssProductsService' - - # Retrieves the processed CSS Product from your CSS Center account. After - # inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - rpc :GetCssProduct, ::Google::Shopping::Css::V1::GetCssProductRequest, ::Google::Shopping::Css::V1::CssProduct - # Lists the processed CSS Products in your CSS Center account. The response - # might contain fewer items than specified by pageSize. Rely on pageToken to - # determine if there are more items to be requested. - # - # After inserting, updating, or deleting a CSS product input, it may - # take several minutes before the updated processed CSS product can be - # retrieved. - rpc :ListCssProducts, ::Google::Shopping::Css::V1::ListCssProductsRequest, ::Google::Shopping::Css::V1::ListCssProductsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb deleted file mode 100644 index 6f35b13b6859..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/css/v1/quota.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n\"google/shopping/css/v1/quota.proto\x12\x16google.shopping.css.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa3\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x0emethod_details\x18\x04 \x03(\x0b\x32%.google.shopping.css.v1.MethodDetailsB\x03\xe0\x41\x03:i\xea\x41\x66\n\x1d\x63ss.googleapis.com/QuotaGroup\x12,accounts/{account}/quotaGroups/{quota_group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x80\x01\n\x16ListQuotaGroupsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63ss.googleapis.com/QuotaGroup\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\"l\n\x17ListQuotaGroupsResponse\x12\x38\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\".google.shopping.css.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf5\x01\n\x0cQuotaService\x12\xa3\x01\n\x0fListQuotaGroups\x12..google.shopping.css.v1.ListQuotaGroupsRequest\x1a/.google.shopping.css.v1.ListQuotaGroupsResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=accounts/*}/quotas\x1a?\xca\x41\x12\x63ss.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xac\x01\n\x1a\x63om.google.shopping.css.v1B\nQuotaProtoP\x01Z2cloud.google.com/go/shopping/css/apiv1/csspb;csspb\xaa\x02\x16Google.Shopping.Css.V1\xca\x02\x16Google\\Shopping\\Css\\V1\xea\x02\x19Google::Shopping::Css::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Css - module V1 - QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.QuotaGroup").msgclass - MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.MethodDetails").msgclass - ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsRequest").msgclass - ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.css.v1.ListQuotaGroupsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service.rb deleted file mode 100644 index 8318f2e1b7a3..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/client" -require "google/shopping/css/v1/quota_service/rest" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/css/v1/quota_service" - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_service", "helpers.rb" -require "google/shopping/css/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb deleted file mode 100644 index cb7d6d1fe847..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/client.rb +++ /dev/null @@ -1,495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - ## - # Client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService 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/shopping/css/v1/quota_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Css::V1::QuotaService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService API. - # - # This class represents the configuration for QuotaService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Css::V1::QuotaService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb deleted file mode 100644 index 300c3137cdf6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Credentials for the QuotaService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - 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-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/paths.rb deleted file mode 100644 index d6952334dd8d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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 Shopping - module Css - module V1 - module QuotaService - # Path helper methods for the QuotaService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest.rb deleted file mode 100644 index d008263afad8..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_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/shopping/css/v1/version" - -require "google/shopping/css/v1/quota_service/credentials" -require "google/shopping/css/v1/quota_service/paths" -require "google/shopping/css/v1/quota_service/rest/client" - -module Google - module Shopping - module Css - module V1 - ## - # Service to get method call quota information per CSS API method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/css/v1/quota_service/rest" - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - module QuotaService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/css/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb deleted file mode 100644 index becee6c58f15..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/client.rb +++ /dev/null @@ -1,445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest/service_stub" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST client for the QuotaService service. - # - # Service to get method call quota information per CSS API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Css::V1::QuotaService::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", "Shopping", "Css", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_quota_groups.timeout = 60.0 - default_config.rpcs.list_quota_groups.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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Css::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_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 - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your CSS Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Css::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/css/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Css::V1::QuotaService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Css::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.list_quota_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService REST API. - # - # This class represents the configuration for QuotaService 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::Shopping::Css::V1::QuotaService::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_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Css::V1::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "css.googleapis.com" - - config_attr :endpoint, nil, ::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 QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb deleted file mode 100644 index 0104aec48d94..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/quota_pb" - -module Google - module Shopping - module Css - module V1 - module QuotaService - module Rest - ## - # REST service stub for the QuotaService 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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Css::V1::ListQuotaGroupsResponse] - # A result object deserialized from the server's reply - def list_quota_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_quota_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.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_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Css::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_quota_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/quotas", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb deleted file mode 100644 index 2176f57358bf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/quota_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/css/v1/quota.proto for package 'Google.Shopping.Css.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/css/v1/quota_pb' - -module Google - module Shopping - module Css - module V1 - module QuotaService - # Service to get method call quota information per CSS API method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.css.v1.QuotaService' - - # Lists the daily call quota and usage per group for your CSS Center account. - rpc :ListQuotaGroups, ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, ::Google::Shopping::Css::V1::ListQuotaGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb deleted file mode 100644 index 2cc3b855b50d..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/rest.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/css/v1/accounts_service/rest" -require "google/shopping/css/v1/account_labels_service/rest" -require "google/shopping/css/v1/css_product_inputs_service/rest" -require "google/shopping/css/v1/css_products_service/rest" -require "google/shopping/css/v1/quota_service/rest" -require "google/shopping/css/v1/version" - -module Google - module Shopping - module Css - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/css/v1/rest" - # client = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb b/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/v1/version.rb deleted file mode 100644 index d1011ac40878..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/lib/google/shopping/css/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 Shopping - module Css - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md deleted file mode 100644 index d5bb47472267..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# CSS 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-shopping-css-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb deleted file mode 100644 index eba13c9a7aad..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # The request message for the `ListChildAccounts` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. Must be a CSS group or domain. - # Format: accounts/\\{account} - # @!attribute [rw] label_id - # @return [::Integer] - # If set, only the MC accounts with the given label ID will be returned. - # @!attribute [rw] full_name - # @return [::String] - # If set, only the MC accounts with the given name (case sensitive) will be - # returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 50 accounts will be - # returned. The maximum value is 100; values above 100 will be coerced to - # 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListChildAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChildAccounts` must - # match the call that provided the page token. - class ListChildAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListChildAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Css::V1::Account>] - # The CSS/MC accounts returned for the specified CSS parent account. - # @!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 ListChildAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the managed CSS/MC account. - # Format: accounts/\\{account} - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when retrieving MC account information. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `UpdateLabels` method. - # @!attribute [rw] name - # @return [::String] - # Required. The label resource name. - # Format: accounts/\\{account} - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # The list of label IDs to overwrite the existing account label IDs. - # If the list is empty, all currently assigned label IDs will be deleted. - # @!attribute [rw] parent - # @return [::String] - # Optional. Only required when updating MC account labels. - # The CSS domain that is the parent resource of the MC account. - # Format: accounts/\\{account} - class UpdateAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about CSS/MC account. - # @!attribute [rw] name - # @return [::String] - # The label resource name. - # Format: accounts/\\{account} - # @!attribute [r] full_name - # @return [::String] - # Output only. Immutable. The CSS/MC account's full name. - # @!attribute [rw] display_name - # @return [::String] - # The CSS/MC account's short display name. - # @!attribute [r] homepage_uri - # @return [::String] - # Output only. Immutable. The CSS/MC account's homepage. - # @!attribute [rw] parent - # @return [::String] - # The CSS/MC account's parent resource. CSS group for CSS domains; CSS - # domain for MC accounts. Returned only if the user has access to the - # parent account. - # Note: For MC sub-accounts, this is also the CSS domain that is the parent - # resource of the MCA account, since we are effectively flattening the - # hierarchy." - # @!attribute [rw] label_ids - # @return [::Array<::Integer>] - # Manually created label IDs assigned to the CSS/MC account by a CSS parent - # account. - # @!attribute [rw] automatic_label_ids - # @return [::Array<::Integer>] - # Automatically created label IDs assigned to the MC account by - # CSS Center. - # @!attribute [r] account_type - # @return [::Google::Shopping::Css::V1::Account::AccountType] - # Output only. The type of this account. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The account type. - module AccountType - # Unknown account type. - ACCOUNT_TYPE_UNSPECIFIED = 0 - - # CSS group account. - CSS_GROUP = 1 - - # CSS domain account. - CSS_DOMAIN = 2 - - # MC Primary CSS MCA account. - MC_PRIMARY_CSS_MCA = 3 - - # MC CSS MCA account. - MC_CSS_MCA = 4 - - # MC Marketplace MCA account. - MC_MARKETPLACE_MCA = 5 - - # MC Other MCA account. - MC_OTHER_MCA = 6 - - # MC Standalone account. - MC_STANDALONE = 7 - - # MC MCA sub-account. - MC_MCA_SUBACCOUNT = 8 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb deleted file mode 100644 index 055f23e04511..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/accounts_labels.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Label assigned by CSS domain or CSS group to one of its sub-accounts. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the label. - # Format: accounts/\\{account}/labels/\\{label} - # @!attribute [r] label_id - # @return [::Integer] - # Output only. The ID of the label. - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of account this label belongs to. - # @!attribute [rw] display_name - # @return [::String] - # The display name of this label. - # @!attribute [rw] description - # @return [::String] - # The description of this label. - # @!attribute [r] label_type - # @return [::Google::Shopping::Css::V1::AccountLabel::LabelType] - # Output only. The type of this label. - class AccountLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The label type. - module LabelType - # Unknown label type. - LABEL_TYPE_UNSPECIFIED = 0 - - # Indicates that the label was created manually. - MANUAL = 1 - - # Indicates that the label was created automatically by CSS Center. - AUTOMATIC = 2 - end - end - - # Request message for the `ListAccountLabels` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of labels to return. The service may return fewer than - # this value. - # If unspecified, at most 50 labels will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListAccountLabels` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLabels` must - # match the call that provided the page token. - class ListAccountLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountLabels` method. - # @!attribute [rw] account_labels - # @return [::Array<::Google::Shopping::Css::V1::AccountLabel>] - # The labels from the specified account. - # @!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 ListAccountLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'CreateAccountLanel' method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: accounts/\\{account} - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The label to create. - class CreateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccountLabel` method. - # @!attribute [rw] account_label - # @return [::Google::Shopping::Css::V1::AccountLabel] - # Required. The updated label. All fields must be provided. - class UpdateAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the 'DeleteAccountLabel' method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the label to delete. - # Format: accounts/\\{account}/labels/\\{label} - class DeleteAccountLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb deleted file mode 100644 index c00f0c3460d5..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_common.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # Attributes for CSS Product. - # @!attribute [rw] cpp_link - # @return [::String] - # URL directly linking to your the Product Detail Page of the CSS. - # @!attribute [rw] cpp_mobile_link - # @return [::String] - # URL for the mobile-optimized version of the Product Detail Page of the CSS. - # @!attribute [rw] cpp_ads_redirect - # @return [::String] - # Allows advertisers to override the item URL when the product is shown - # within the context of Product Ads. - # @!attribute [rw] low_price - # @return [::Google::Shopping::Type::Price] - # Low Price of the CSS Product. - # @!attribute [rw] high_price - # @return [::Google::Shopping::Type::Price] - # High Price of the CSS Product. - # @!attribute [rw] number_of_offers - # @return [::Integer] - # The number of CSS Products. - # @!attribute [rw] headline_offer_condition - # @return [::String] - # Condition of the headline offer. - # @!attribute [rw] headline_offer_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] headline_offer_link - # @return [::String] - # Link to the headline offer. - # @!attribute [rw] headline_offer_mobile_link - # @return [::String] - # Mobile Link to the headline offer. - # @!attribute [rw] headline_offer_shipping_price - # @return [::Google::Shopping::Type::Price] - # Headline Price of the CSS Product. - # @!attribute [rw] title - # @return [::String] - # Title of the item. - # @!attribute [rw] image_link - # @return [::String] - # URL of an image of the item. - # @!attribute [rw] additional_image_links - # @return [::Array<::String>] - # Additional URL of images of the item. - # @!attribute [rw] description - # @return [::String] - # Description of the item. - # @!attribute [rw] brand - # @return [::String] - # Product Related Attributes.[14-36] - # Brand of the item. - # @!attribute [rw] mpn - # @return [::String] - # Manufacturer Part Number - # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the - # item. - # @!attribute [rw] gtin - # @return [::String] - # Global Trade Item Number - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # @!attribute [rw] product_types - # @return [::Array<::String>] - # Categories of the item (formatted as in [products data - # specification](https://support.google.com/merchants/answer/6324406)). - # @!attribute [rw] google_product_category - # @return [::String] - # Google's category of the item (see [Google product - # taxonomy](https://support.google.com/merchants/answer/1705911)). When - # querying products, this field will contain the user provided value. There - # is currently no way to get back the auto assigned google product - # categories through the API. - # @!attribute [rw] adult - # @return [::Boolean] - # Set to true if the item is targeted towards adults. - # @!attribute [rw] multipack - # @return [::Integer] - # The number of identical products in a merchant-defined multipack. - # @!attribute [rw] is_bundle - # @return [::Boolean] - # Whether the item is a merchant-defined bundle. A bundle is a custom - # grouping of different products sold by a merchant for a single price. - # @!attribute [rw] age_group - # @return [::String] - # Target age group of the item. - # @!attribute [rw] color - # @return [::String] - # Color of the item. - # @!attribute [rw] gender - # @return [::String] - # Target gender of the item. - # @!attribute [rw] material - # @return [::String] - # The material of which the item is made. - # @!attribute [rw] pattern - # @return [::String] - # The item's pattern (e.g. polka dots). - # @!attribute [rw] size - # @return [::String] - # Size of the item. Only one value is allowed. For variants with different - # sizes, insert a separate product for each size with the same - # `itemGroupId` value (see - # [https://support.google.com/merchants/answer/6324492](size definition)). - # @!attribute [rw] size_system - # @return [::String] - # System in which the size is specified. Recommended for apparel items. - # @!attribute [rw] size_types - # @return [::Array<::String>] - # The cut of the item. It can be used to represent combined size types for - # apparel items. Maximum two of size types can be provided (see - # [size type](https://support.google.com/merchants/answer/6324497). - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] product_details - # @return [::Array<::Google::Shopping::Css::V1::ProductDetail>] - # Technical specification or additional product details. - # @!attribute [rw] product_weight - # @return [::Google::Shopping::Css::V1::ProductWeight] - # The weight of the product in the units provided. The value must be - # between 0 (exclusive) and 2000 (inclusive). - # @!attribute [rw] product_length - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The length of the product in the units provided. The value must be - # between 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_width - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The width of the product in the units provided. The value must be between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_height - # @return [::Google::Shopping::Css::V1::ProductDimension] - # The height of the product in the units provided. The value must be - # between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_highlights - # @return [::Array<::String>] - # Bullet points describing the most relevant highlights of a product. - # @!attribute [rw] certifications - # @return [::Array<::Google::Shopping::Css::V1::Certification>] - # A list of certificates claimed by the CSS for the given product. - # @!attribute [rw] expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item should expire, as specified upon insertion, in - # [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual - # expiration date is exposed in `productstatuses` as - # [googleExpirationDate](https://support.google.com/merchants/answer/6324499) - # and might be earlier if `expirationDate` is too far in the future. - # Note: It may take 2+ days from the expiration date for the item to - # actually get deleted. - # @!attribute [rw] included_destinations - # @return [::Array<::String>] - # The list of destinations to include for this target (corresponds to - # checked check boxes in Merchant Center). Default destinations are always - # included unless provided in `excludedDestinations`. - # @!attribute [rw] excluded_destinations - # @return [::Array<::String>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # @!attribute [rw] pause - # @return [::String] - # Publication of this item will be temporarily paused. - # @!attribute [rw] custom_label_0 - # @return [::String] - # Custom label 0 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # Custom label 1 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # Custom label 2 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # Custom label 3 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # Custom label 4 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] headline_offer_installment - # @return [::Google::Shopping::Css::V1::HeadlineOfferInstallment] - # Number and amount of installments to pay for an item. - # @!attribute [rw] headline_offer_subscription_cost - # @return [::Google::Shopping::Css::V1::HeadlineOfferSubscriptionCost] - # Number of periods (months or years) and amount of payment per period - # for an item with an associated subscription contract. - # @!attribute [rw] review_count - # @return [::Integer] - # Number of reviews of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] min_rating - # @return [::Integer] - # Minimum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] max_rating - # @return [::Integer] - # Maximum rating score of the product. Required if - # {::Google::Shopping::Css::V1::Attributes#rating `rating`} is provided. - # This field is for an upcoming feature and is not yet used. - # @!attribute [rw] rating - # @return [::Float] - # Average rating score of the product. The value must be within the - # range of [`min_rating`, `max_rating`], inclusive. When displayed on the - # product page, this rating is normalized to a scale of [1, 5] with one - # decimal place. If provided, - # {::Google::Shopping::Css::V1::Attributes#review_count `review_count`}, - # {::Google::Shopping::Css::V1::Attributes#min_rating `min_rating`}, and - # {::Google::Shopping::Css::V1::Attributes#max_rating `max_rating`} are also - # required. This field is for an upcoming feature and is not yet used. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The certification for the product. Use the this attribute to describe - # certifications, such as energy efficiency ratings, associated with a product. - # @!attribute [rw] name - # @return [::String] - # The name of the certification. At this time, the most common value is - # "EPREL", which represents energy efficiency certifications in the EU - # European Registry for Energy Labeling (EPREL) database. - # @!attribute [rw] authority - # @return [::String] - # The authority or certification body responsible for issuing the - # certification. At this time, the most common value is "EC" or - # “European_Commission” for energy labels in the EU. - # @!attribute [rw] code - # @return [::String] - # The code of the certification. For example, for the EPREL certificate with - # the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 - # the code is 123456. The code is required for European Energy Labels. - class Certification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product details. - # @!attribute [rw] section_name - # @return [::String] - # The section header used to group a set of product details. - # @!attribute [rw] attribute_name - # @return [::String] - # The name of the product detail. - # @!attribute [rw] attribute_value - # @return [::String] - # The value of the product detail. - class ProductDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dimension of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The dimension value represented as a number. The value can have a - # maximum precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The dimension units. - # Acceptable values are: - # * "`in`" - # * "`cm`" - class ProductDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The weight of the product. - # @!attribute [rw] value - # @return [::Float] - # Required. The weight represented as a number. The weight can have a maximum - # precision of four decimal places. - # @!attribute [rw] unit - # @return [::String] - # Required. The weight unit. - # Acceptable values are: - # * "`g`" - # * "`kg`" - # * "`oz`" - # * "`lb`" - class ProductWeight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the Css Product, data validation issues, that is, - # information about the Css Product computed asynchronously. - # @!attribute [rw] destination_statuses - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::DestinationStatus>] - # The intended destinations for the product. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Css::V1::CssProductStatus::ItemLevelIssue>] - # A list of all issues associated with the product. - # @!attribute [rw] creation_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been created, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] last_update_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item has been last updated, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] google_expiration_date - # @return [::Google::Protobuf::Timestamp] - # Date on which the item expires, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - class CssProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product status. - # @!attribute [rw] destination - # @return [::String] - # The name of the destination - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # approved. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # pending approval. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the CSS Product is - # disapproved. - class DestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product status. - # @!attribute [rw] code - # @return [::String] - # The error code of the issue. - # @!attribute [rw] servability - # @return [::String] - # How this issue affects serving of the CSS Product. - # @!attribute [rw] resolution - # @return [::String] - # Whether the issue can be resolved by the merchant. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] destination - # @return [::String] - # The destination the issue applies to. - # @!attribute [rw] description - # @return [::String] - # A short issue description in English. - # @!attribute [rw] detail - # @return [::String] - # A detailed issue description in English. - # @!attribute [rw] documentation - # @return [::String] - # The URL of a web page to help with resolving this issue. - # @!attribute [rw] applicable_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where issue applies to the - # CSS Product. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The SubscriptionCost of the product. - # @!attribute [rw] period - # @return [::Google::Shopping::Css::V1::SubscriptionPeriod] - # The type of subscription period. - # Supported values are: - # * "`month`" - # * "`year`" - # @!attribute [rw] period_length - # @return [::Integer] - # The number of subscription periods the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per subscription period. - class HeadlineOfferSubscriptionCost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents installment. - # @!attribute [rw] months - # @return [::Integer] - # The number of installments the buyer has to pay. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount the buyer has to pay per month. - # @!attribute [rw] downpayment - # @return [::Google::Shopping::Type::Price] - # The up-front down payment amount the buyer has to pay. - class HeadlineOfferInstallment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The subscription period of the product. - module SubscriptionPeriod - # Indicates that the subscription period is unspecified. - SUBSCRIPTION_PERIOD_UNSPECIFIED = 0 - - # Indicates that the subscription period is month. - MONTH = 1 - - # Indicates that the subscription period is year. - YEAR = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb deleted file mode 100644 index c6945a0046a9..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_product_inputs.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Css - module V1 - # This resource represents input data you submit for a CSS Product, not - # the processed CSS Product that you see in CSS Center, in Shopping Ads, or - # across Google surfaces. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the CSS Product input. - # Format: - # `accounts/{account}/cssProductInputs/{css_product_input}`, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [r] final_name - # @return [::String] - # Output only. The name of the processed CSS Product. - # Format: - # `accounts/{account}/cssProducts/{css_product}` - # " - # @!attribute [rw] raw_provided_id - # @return [::String] - # Required. Your unique identifier for the CSS Product. This is the same for - # the CSS Product input and processed CSS Product. We only allow ids with - # alphanumerics, underscores and dashes. See the [products feed - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the CSS - # Product. - # @!attribute [rw] feed_label - # @return [::String] - # Required. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the CSS Product. - # Feed Label is synonymous to "target country" and hence should always be a - # valid region code. For example: 'DE' for Germany, 'FR' for France. - # @!attribute [rw] freshness_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # DEPRECATED. Use expiration_date instead. - # Represents the existing version (freshness) of the CSS Product, which - # can be used to preserve the right order when multiple updates are done at - # the same time. - # - # This field must not be set to the future time. - # - # If set, the update is prevented if a newer version of the item already - # exists in our system (that is the last update time of the existing - # CSS products is later than the freshness time set in the update). If - # the update happens, the last update time is then set to this freshness - # time. - # - # If not set, the update will not be prevented and the last update time will - # default to when this request was received by the CSS API. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # A list of CSS Product attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (CSS-provided) attributes. It can also be used for - # submitting any attribute of the feed specification in its generic - # form (for example: - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - class CssProductInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertCssProductInput method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this CSS Product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS Product Input to insert. - # @!attribute [rw] feed_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Optional. DEPRECATED. Feed id is not required for CSS Products. - # The primary or supplemental feed id. If CSS Product already exists and - # feed id provided is different, then the CSS Product will be moved to a - # new feed. - # Note: For now, CSSs do not need to provide feed ids as we create - # feeds on the fly. - # We do not have supplemental feed support for CSS Products yet. - class InsertCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateCssProductInput method. - # @!attribute [rw] css_product_input - # @return [::Google::Shopping::Css::V1::CssProductInput] - # Required. The CSS product input resource to update. Information you submit - # will be applied to the processed CSS product as well. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of CSS product attributes to be updated. - # - # If the update mask is omitted, then it is treated as implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # Attributes specified in the update mask without a value specified in the - # body will be deleted from the CSS product. - # - # Update mask can only be specified for top level fields in - # attributes and custom attributes. - # - # To specify the update mask for custom attributes you need to add the - # `custom_attribute.` prefix. - # - # Providing special "*" value for full CSS product replacement is not - # supported. - class UpdateCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteCssProductInput method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product input resource to delete. - # Format: accounts/\\{account}/cssProductInputs/\\{css_product_input}, where the - # last section `css_product_input` consists of 3 parts: - # contentLanguage~feedLabel~offerId. Example: - # accounts/123/cssProductInputs/de~DE~rawProvidedId123 - # @!attribute [rw] supplemental_feed_id - # @return [::Integer] - # The Content API Supplemental Feed ID. - # The field must not be set if the action applies to a primary feed. - # If the field is set, then product action applies to a supplemental feed - # instead of primary Content API feed. - class DeleteCssProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.rb deleted file mode 100644 index d61414008787..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/css_products.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 Shopping - module Css - module V1 - # The request message for the `GetCssProduct` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CSS product to retrieve. - # Format: `accounts/{account}/cssProducts/{css_product}` - class GetCssProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The processed CSS Product. - # @!attribute [rw] name - # @return [::String] - # The name of the CSS Product. - # Format: - # `"accounts/{account}/cssProducts/{css_product}"` - # @!attribute [r] raw_provided_id - # @return [::String] - # Output only. Your unique raw identifier for the product. - # @!attribute [r] content_language - # @return [::String] - # Output only. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the - # product. - # @!attribute [r] feed_label - # @return [::String] - # Output only. The feed label for the product. - # @!attribute [r] attributes - # @return [::Google::Shopping::Css::V1::Attributes] - # Output only. A list of product attributes. - # @!attribute [r] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Output only. A list of custom (CSS-provided) attributes. It can also be - # used to submit any attribute of the feed specification in its generic form - # (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API, such as additional attributes used for Buy on Google. - # @!attribute [r] css_product_status - # @return [::Google::Shopping::Css::V1::CssProductStatus] - # Output only. The status of a product, data validation issues, that is, - # information about a product computed asynchronously. - class CssProduct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListCssProducts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account/domain to list processed CSS Products for. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of CSS Products to return. The service may return - # fewer than this value. - # The maximum value is 1000; values above 1000 will be coerced to 1000. If - # unspecified, the maximum number of CSS products will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCssProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCssProducts` - # must match the call that provided the page token. - class ListCssProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListCssProducts method. - # @!attribute [rw] css_products - # @return [::Array<::Google::Shopping::Css::V1::CssProduct>] - # The processed CSS products from the specified account. These are your - # processed CSS products after applying rules and supplemental feeds. - # @!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 ListCssProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.rb deleted file mode 100644 index d0d83c380b21..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/css/v1/quota.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 Shopping - module Css - module V1 - # The group information for methods in the CSS API. The quota is shared - # between all methods in the group. Even if none of the methods within the - # group have usage the information for the group is returned. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the quota group. - # Format: accounts/\\{account}/quotas/\\{group} - # Example: `accounts/12345678/quotas/css-products-insert` - # Note: The \\{group} part is not guaranteed to follow a specific pattern. - # @!attribute [r] quota_usage - # @return [::Integer] - # Output only. The current quota usage, meaning the number of calls already - # made on a given day to the methods in the group. The daily quota limits - # reset at at 12:00 PM midday UTC. - # @!attribute [r] quota_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per day for the group. - # @!attribute [r] quota_minute_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per minute for the group. - # @!attribute [r] method_details - # @return [::Array<::Google::Shopping::Css::V1::MethodDetails>] - # Output only. List of all methods group quota applies to. - class QuotaGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The method details per method in the CSS API. - # @!attribute [r] method - # @return [::String] - # Output only. The name of the method for example - # `cssproductsservice.listcssproducts`. - # @!attribute [r] version - # @return [::String] - # Output only. The API version that the method belongs to. - # @!attribute [r] subapi - # @return [::String] - # Output only. The sub-API that the method belongs to. In the CSS API, this - # is always `css`. - # @!attribute [r] path - # @return [::String] - # Output only. The path for the method such as - # `v1/cssproductsservice.listcssproducts`. - class MethodDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListQuotaGroups method. - # @!attribute [rw] parent - # @return [::String] - # Required. The CSS account that owns the collection of method quotas and - # resources. In most cases, this is the CSS domain. Format: - # accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - class ListQuotaGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListMethodGroups method. - # @!attribute [rw] quota_groups - # @return [::Array<::Google::Shopping::Css::V1::QuotaGroup>] - # The methods, current quota usage and limits per each group. The quota is - # shared between all methods in the group. The groups are sorted in - # descending order based on - # {::Google::Shopping::Css::V1::QuotaGroup#quota_usage quota_usage}. - # @!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 ListQuotaGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-css-v1/snippets/Gemfile deleted file mode 100644 index 64af0f406f42..000000000000 --- a/owl-bot-staging/google-shopping-css-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-shopping-css-v1", path: "../" -else - gem "google-shopping-css-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-shopping-css-v1/snippets/account_labels_service/create_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb deleted file mode 100644 index 3e0da7936320..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/create_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the create_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label. -# -def create_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::CreateAccountLabelRequest.new - - # Call the create_account_label method. - result = client.create_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_CreateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb deleted file mode 100644 index 37acf2da6b88..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/delete_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label. -# -def delete_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteAccountLabelRequest.new - - # Call the delete_account_label method. - result = client.delete_account_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb deleted file mode 100644 index b6e45b80ec3f..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/list_account_labels.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_ListAccountLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_account_labels call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels. -# -def list_account_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListAccountLabelsRequest.new - - # Call the list_account_labels method. - result = client.list_account_labels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::AccountLabel. - p item - end -end -# [END css_v1_generated_AccountLabelsService_ListAccountLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb b/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb deleted file mode 100644 index 3a87e7d4688c..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/account_labels_service/update_account_label.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_account_label call in the AccountLabelsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label. -# -def update_account_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountLabelsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelRequest.new - - # Call the update_account_label method. - result = client.update_account_label request - - # The returned object is of type Google::Shopping::Css::V1::AccountLabel. - p result -end -# [END css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb deleted file mode 100644 index 99a758913d47..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_GetAccount_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb deleted file mode 100644 index 56b92aa4cccf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/list_child_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_ListChildAccounts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_child_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts. -# -def list_child_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListChildAccountsRequest.new - - # Call the list_child_accounts method. - result = client.list_child_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::Account. - p item - end -end -# [END css_v1_generated_AccountsService_ListChildAccounts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb b/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb deleted file mode 100644 index d5f667ab066e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/accounts_service/update_labels.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_AccountsService_UpdateLabels_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_labels call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::AccountsService::Client#update_labels. -# -def update_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new - - # Call the update_labels method. - result = client.update_labels request - - # The returned object is of type Google::Shopping::Css::V1::Account. - p result -end -# [END css_v1_generated_AccountsService_UpdateLabels_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb deleted file mode 100644 index 006857df17cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/delete_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the delete_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input. -# -def delete_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::DeleteCssProductInputRequest.new - - # Call the delete_css_product_input method. - result = client.delete_css_product_input request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb deleted file mode 100644 index 1acf0e41e05a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/insert_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the insert_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input. -# -def insert_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::InsertCssProductInputRequest.new - - # Call the insert_css_product_input method. - result = client.insert_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_InsertCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb deleted file mode 100644 index b0f42257db06..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_product_inputs_service/update_css_product_input.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] -require "google/shopping/css/v1" - -## -# Snippet for the update_css_product_input call in the CssProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input. -# -def update_css_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::UpdateCssProductInputRequest.new - - # Call the update_css_product_input method. - result = client.update_css_product_input request - - # The returned object is of type Google::Shopping::Css::V1::CssProductInput. - p result -end -# [END css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb deleted file mode 100644 index 859163887d62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/get_css_product.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductsService_GetCssProduct_sync] -require "google/shopping/css/v1" - -## -# Snippet for the get_css_product call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#get_css_product. -# -def get_css_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::GetCssProductRequest.new - - # Call the get_css_product method. - result = client.get_css_product request - - # The returned object is of type Google::Shopping::Css::V1::CssProduct. - p result -end -# [END css_v1_generated_CssProductsService_GetCssProduct_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb b/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb deleted file mode 100644 index e65a9a1d0a0a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/css_products_service/list_css_products.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_CssProductsService_ListCssProducts_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_css_products call in the CssProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::CssProductsService::Client#list_css_products. -# -def list_css_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::CssProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListCssProductsRequest.new - - # Call the list_css_products method. - result = client.list_css_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::CssProduct. - p item - end -end -# [END css_v1_generated_CssProductsService_ListCssProducts_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb deleted file mode 100644 index 3efd74d00a2a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/quota_service/list_quota_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START css_v1_generated_QuotaService_ListQuotaGroups_sync] -require "google/shopping/css/v1" - -## -# Snippet for the list_quota_groups call in the QuotaService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups. -# -def list_quota_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Css::V1::QuotaService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Css::V1::ListQuotaGroupsRequest.new - - # Call the list_quota_groups method. - result = client.list_quota_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Css::V1::QuotaGroup. - p item - end -end -# [END css_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json b/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json deleted file mode 100644 index eef1fd62fe59..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/snippets/snippet_metadata_google.shopping.css.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-css-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.css.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "css_v1_generated_AccountsService_ListChildAccounts_sync", - "title": "Snippet for the list_child_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts.", - "file": "accounts_service/list_child_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_child_accounts", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#list_child_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListChildAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListChildAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "ListChildAccounts", - "full_name": "google.shopping.css.v1.AccountsService.ListChildAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.css.v1.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountsService_UpdateLabels_sync", - "title": "Snippet for the update_labels call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountsService::Client#update_labels.", - "file": "accounts_service/update_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_labels", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client#update_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountsService::Client" - }, - "method": { - "short_name": "UpdateLabels", - "full_name": "google.shopping.css.v1.AccountsService.UpdateLabels", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.css.v1.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_ListAccountLabels_sync", - "title": "Snippet for the list_account_labels call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels.", - "file": "account_labels_service/list_account_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_labels", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#list_account_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListAccountLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListAccountLabelsResponse", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "ListAccountLabels", - "full_name": "google.shopping.css.v1.AccountLabelsService.ListAccountLabels", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_CreateAccountLabel_sync", - "title": "Snippet for the create_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label.", - "file": "account_labels_service/create_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#create_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::CreateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "CreateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.CreateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_UpdateAccountLabel_sync", - "title": "Snippet for the update_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label.", - "file": "account_labels_service/update_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#update_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::AccountLabel", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "UpdateAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.UpdateAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_AccountLabelsService_DeleteAccountLabel_sync", - "title": "Snippet for the delete_account_label call in the AccountLabelsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label.", - "file": "account_labels_service/delete_account_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account_label", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client#delete_account_label", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteAccountLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountLabelsService::Client", - "full_name": "::Google::Shopping::Css::V1::AccountLabelsService::Client" - }, - "method": { - "short_name": "DeleteAccountLabel", - "full_name": "google.shopping.css.v1.AccountLabelsService.DeleteAccountLabel", - "service": { - "short_name": "AccountLabelsService", - "full_name": "google.shopping.css.v1.AccountLabelsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_InsertCssProductInput_sync", - "title": "Snippet for the insert_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input.", - "file": "css_product_inputs_service/insert_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#insert_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::InsertCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "InsertCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.InsertCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_UpdateCssProductInput_sync", - "title": "Snippet for the update_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input.", - "file": "css_product_inputs_service/update_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#update_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::UpdateCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProductInput", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "UpdateCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.UpdateCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductInputsService_DeleteCssProductInput_sync", - "title": "Snippet for the delete_css_product_input call in the CssProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input.", - "file": "css_product_inputs_service/delete_css_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_css_product_input", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client#delete_css_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::DeleteCssProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CssProductInputsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductInputsService::Client" - }, - "method": { - "short_name": "DeleteCssProductInput", - "full_name": "google.shopping.css.v1.CssProductInputsService.DeleteCssProductInput", - "service": { - "short_name": "CssProductInputsService", - "full_name": "google.shopping.css.v1.CssProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_GetCssProduct_sync", - "title": "Snippet for the get_css_product call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#get_css_product.", - "file": "css_products_service/get_css_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_css_product", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#get_css_product", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::GetCssProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::CssProduct", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "GetCssProduct", - "full_name": "google.shopping.css.v1.CssProductsService.GetCssProduct", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_CssProductsService_ListCssProducts_sync", - "title": "Snippet for the list_css_products call in the CssProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::CssProductsService::Client#list_css_products.", - "file": "css_products_service/list_css_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_css_products", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client#list_css_products", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListCssProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListCssProductsResponse", - "client": { - "short_name": "CssProductsService::Client", - "full_name": "::Google::Shopping::Css::V1::CssProductsService::Client" - }, - "method": { - "short_name": "ListCssProducts", - "full_name": "google.shopping.css.v1.CssProductsService.ListCssProducts", - "service": { - "short_name": "CssProductsService", - "full_name": "google.shopping.css.v1.CssProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "css_v1_generated_QuotaService_ListQuotaGroups_sync", - "title": "Snippet for the list_quota_groups call in the QuotaService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups.", - "file": "quota_service/list_quota_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_quota_groups", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client#list_quota_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Css::V1::ListQuotaGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Css::V1::ListQuotaGroupsResponse", - "client": { - "short_name": "QuotaService::Client", - "full_name": "::Google::Shopping::Css::V1::QuotaService::Client" - }, - "method": { - "short_name": "ListQuotaGroups", - "full_name": "google.shopping.css.v1.QuotaService.ListQuotaGroups", - "service": { - "short_name": "QuotaService", - "full_name": "google.shopping.css.v1.QuotaService" - } - } - }, - "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-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_paths_test.rb deleted file mode 100644 index 06be5bd23520..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_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/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_label_path account: "value0", label: "value1" - assert_equal "accounts/value0/labels/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb deleted file mode 100644 index 0b1bb88d645a..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_rest_test.rb +++ /dev/null @@ -1,318 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service/rest" - - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - http_response = OpenStruct.new 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_account_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_list_account_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_count - end - end - end - - def test_create_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_create_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_account_label({ parent: parent, account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_account_label parent: parent, account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_account_label({ parent: parent, account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_count - end - end - end - - def test_update_account_label - # Create test objects. - client_result = ::Google::Shopping::Css::V1::AccountLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_update_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account_label({ account_label: account_label }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account_label account_label: account_label do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account_label({ account_label: account_label }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_count - end - end - end - - def test_delete_account_label - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_account_label_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountLabelsService::Rest::ServiceStub.stub :transcode_delete_account_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_account_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_account_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_account_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_label_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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb deleted file mode 100644 index 309bc3a0ae62..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/account_labels_service_test.rb +++ /dev/null @@ -1,347 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/accounts_labels_pb" -require "google/shopping/css/v1/account_labels_service" - -class ::Google::Shopping::Css::V1::AccountLabelsService::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_account_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListAccountLabelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_labels, name - assert_kind_of ::Google::Shopping::Css::V1::ListAccountLabelsRequest, 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_account_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_labels parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_labels ::Google::Shopping::Css::V1::ListAccountLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_labels({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_labels(::Google::Shopping::Css::V1::ListAccountLabelsRequest.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_account_labels_client_stub.call_rpc_count - end - end - - def test_create_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_label = {} - - create_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::CreateAccountLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_account_label({ parent: parent, account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_account_label parent: parent, account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_account_label ::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_account_label({ parent: parent, account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_account_label(::Google::Shopping::Css::V1::CreateAccountLabelRequest.new(parent: parent, account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_account_label_client_stub.call_rpc_count - end - end - - def test_update_account_label - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::AccountLabel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_label = {} - - update_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::AccountLabel), request["account_label"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account_label({ account_label: account_label }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account_label account_label: account_label do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account_label ::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account_label({ account_label: account_label }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account_label(::Google::Shopping::Css::V1::UpdateAccountLabelRequest.new(account_label: account_label), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_label_client_stub.call_rpc_count - end - end - - def test_delete_account_label - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_account_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account_label, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteAccountLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_label_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_account_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_account_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_account_label ::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_account_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_account_label(::Google::Shopping::Css::V1::DeleteAccountLabelRequest.new(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_account_label_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::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::Shopping::Css::V1::AccountLabelsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountLabelsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_paths_test.rb deleted file mode 100644 index 5958f212e0cf..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_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/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb deleted file mode 100644 index 292ecc543790..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_rest_test.rb +++ /dev/null @@ -1,268 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service/rest" - - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_list_child_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_child_accounts_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_count - end - end - end - - def test_get_account - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account({ name: name, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account name: name, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account({ name: name, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_update_labels - # Create test objects. - client_result = ::Google::Shopping::Css::V1::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::AccountsService::Rest::ServiceStub.stub :transcode_update_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_labels name: name, label_ids: label_ids, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_labels({ name: name, label_ids: label_ids, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_labels_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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb deleted file mode 100644 index 6abde8ec7b17..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/accounts_service_test.rb +++ /dev/null @@ -1,301 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/accounts_pb" -require "google/shopping/css/v1/accounts_service" - -class ::Google::Shopping::Css::V1::AccountsService::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_child_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListChildAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - label_id = 42 - full_name = "hello world" - page_size = 42 - page_token = "hello world" - - list_child_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_child_accounts, name - assert_kind_of ::Google::Shopping::Css::V1::ListChildAccountsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["label_id"] - assert request.has_label_id? - assert_equal "hello world", request["full_name"] - assert request.has_full_name? - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_child_accounts_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_child_accounts parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_child_accounts ::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_child_accounts({ parent: parent, label_id: label_id, full_name: full_name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_child_accounts(::Google::Shopping::Css::V1::ListChildAccountsRequest.new(parent: parent, label_id: label_id, full_name: full_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_child_accounts_client_stub.call_rpc_count - end - end - - def test_get_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parent = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Css::V1::GetAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account({ name: name, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account name: name, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account ::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account({ name: name, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Css::V1::GetAccountRequest.new(name: name, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_update_labels - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - label_ids = [42] - parent = "hello world" - - update_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_labels, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest, request - assert_equal "hello world", request["name"] - assert_equal [42], request["label_ids"] - assert_equal "hello world", request["parent"] - assert request.has_parent? - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_labels_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_labels({ name: name, label_ids: label_ids, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_labels name: name, label_ids: label_ids, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_labels ::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_labels({ name: name, label_ids: label_ids, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_labels(::Google::Shopping::Css::V1::UpdateAccountLabelsRequest.new(name: name, label_ids: label_ids, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_labels_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::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::Shopping::Css::V1::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_paths_test.rb deleted file mode 100644 index 6f08e5fdf404..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_input_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_input_path account: "value0", css_product_input: "value1" - assert_equal "accounts/value0/cssProductInputs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_rest_test.rb deleted file mode 100644 index 2e9aedae5c1b..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_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/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_insert_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_count - end - end - end - - def test_update_css_product_input - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_update_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_css_product_input_client_stub.call_count - end - end - end - - def test_delete_css_product_input - # 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" - supplemental_feed_id = 42 - - delete_css_product_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductInputsService::Rest::ServiceStub.stub :transcode_delete_css_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_css_product_input_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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb deleted file mode 100644 index cae9bfab46aa..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_product_inputs_service_test.rb +++ /dev/null @@ -1,287 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_product_inputs_pb" -require "google/shopping/css/v1/css_product_inputs_service" - -class ::Google::Shopping::Css::V1::CssProductInputsService::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_insert_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - css_product_input = {} - feed_id = 42 - - insert_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::InsertCssProductInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal 42, request["feed_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_css_product_input parent: parent, css_product_input: css_product_input, feed_id: feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_css_product_input ::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_css_product_input({ parent: parent, css_product_input: css_product_input, feed_id: feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.insert_css_product_input(::Google::Shopping::Css::V1::InsertCssProductInputRequest.new(parent: parent, css_product_input: css_product_input, feed_id: feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_css_product_input_client_stub.call_rpc_count - end - end - - def test_update_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - css_product_input = {} - update_mask = {} - - update_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::UpdateCssProductInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Css::V1::CssProductInput), request["css_product_input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_css_product_input css_product_input: css_product_input, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_css_product_input ::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_css_product_input({ css_product_input: css_product_input, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_css_product_input(::Google::Shopping::Css::V1::UpdateCssProductInputRequest.new(css_product_input: css_product_input, 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_css_product_input_client_stub.call_rpc_count - end - end - - def test_delete_css_product_input - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - supplemental_feed_id = 42 - - delete_css_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_css_product_input, name - assert_kind_of ::Google::Shopping::Css::V1::DeleteCssProductInputRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["supplemental_feed_id"] - assert request.has_supplemental_feed_id? - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_css_product_input_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_css_product_input name: name, supplemental_feed_id: supplemental_feed_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_css_product_input ::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_css_product_input({ name: name, supplemental_feed_id: supplemental_feed_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_css_product_input(::Google::Shopping::Css::V1::DeleteCssProductInputRequest.new(name: name, supplemental_feed_id: supplemental_feed_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_css_product_input_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::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::Shopping::Css::V1::CssProductInputsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductInputsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_paths_test.rb deleted file mode 100644 index 7e9ac41a013e..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_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/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_css_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.css_product_path account: "value0", css_product: "value1" - assert_equal "accounts/value0/cssProducts/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb deleted file mode 100644 index 8482e96080f6..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_rest_test.rb +++ /dev/null @@ -1,209 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service/rest" - - -class ::Google::Shopping::Css::V1::CssProductsService::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_css_product - # Create test objects. - client_result = ::Google::Shopping::Css::V1::CssProduct.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_get_css_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_css_product_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_css_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_css_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_css_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_count - end - end - end - - def test_list_css_products - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - http_response = OpenStruct.new 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_css_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.stub :transcode_list_css_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_css_products_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb deleted file mode 100644 index 693ba1506589..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/css_products_service_test.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/css_products_pb" -require "google/shopping/css/v1/css_products_service" - -class ::Google::Shopping::Css::V1::CssProductsService::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_css_product - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::CssProduct.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_css_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_css_product, name - assert_kind_of ::Google::Shopping::Css::V1::GetCssProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_css_product_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_css_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_css_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_css_product ::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_css_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_css_product(::Google::Shopping::Css::V1::GetCssProductRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_css_product_client_stub.call_rpc_count - end - end - - def test_list_css_products - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListCssProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_css_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_css_products, name - assert_kind_of ::Google::Shopping::Css::V1::ListCssProductsRequest, 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_css_products_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_css_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_css_products ::Google::Shopping::Css::V1::ListCssProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_css_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_css_products(::Google::Shopping::Css::V1::ListCssProductsRequest.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_css_products_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::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::Shopping::Css::V1::CssProductsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::CssProductsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_paths_test.rb deleted file mode 100644 index ebdbed9d44c1..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_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/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb deleted file mode 100644 index a8c80cc10365..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service/rest" - - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create test objects. - client_result = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - http_response = OpenStruct.new 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_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Css::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::QuotaService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb deleted file mode 100644 index 5454c9c25375..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/google/shopping/css/v1/quota_service_test.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/css/v1/quota_pb" -require "google/shopping/css/v1/quota_service" - -class ::Google::Shopping::Css::V1::QuotaService::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_quota_groups - # Create GRPC objects. - grpc_response = ::Google::Shopping::Css::V1::ListQuotaGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_quota_groups, name - assert_kind_of ::Google::Shopping::Css::V1::ListQuotaGroupsRequest, 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_quota_groups_client_stub do - # Create client - c = ::Google::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_quota_groups ::Google::Shopping::Css::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_quota_groups(::Google::Shopping::Css::V1::ListQuotaGroupsRequest.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_quota_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::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::Shopping::Css::V1::QuotaService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Css::V1::QuotaService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-css-v1/test/helper.rb b/owl-bot-staging/google-shopping-css-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-css-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json deleted file mode 100644 index 788a554a5593..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta", - "distribution_name": "google-shopping-merchant-accounts-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml deleted file mode 100644 index 5fa9eb10ddf1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-accounts-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md deleted file mode 100644 index 456fb36054bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md deleted file mode 100644 index be41cd32e2eb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-accounts](https://rubygems.org/gems/google-shopping-merchant-accounts). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-accounts-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/accounts/v1beta" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new -request = ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new # (request fields as keyword arguments...) -response = client.get_account_tax request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/accounts/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-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-shopping-merchant-accounts`. -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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/Rakefile deleted file mode 100644 index dc4519177094..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta/account_tax_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts-v1beta" - header "google-shopping-merchant-accounts-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json deleted file mode 100644 index c3348ff56d9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/gapic_metadata.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.accounts.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Accounts::V1beta", - "services": { - "AccountTaxService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client", - "rpcs": { - "GetAccountTax": { - "methods": [ - "get_account_tax" - ] - }, - "ListAccountTax": { - "methods": [ - "list_account_tax" - ] - }, - "UpdateAccountTax": { - "methods": [ - "update_account_tax" - ] - } - } - } - } - }, - "AccountIssueService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client", - "rpcs": { - "ListAccountIssues": { - "methods": [ - "list_account_issues" - ] - } - } - } - } - }, - "UserService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client", - "rpcs": { - "GetUser": { - "methods": [ - "get_user" - ] - }, - "CreateUser": { - "methods": [ - "create_user" - ] - }, - "DeleteUser": { - "methods": [ - "delete_user" - ] - }, - "UpdateUser": { - "methods": [ - "update_user" - ] - }, - "ListUsers": { - "methods": [ - "list_users" - ] - } - } - } - } - }, - "AccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client", - "rpcs": { - "GetAccount": { - "methods": [ - "get_account" - ] - }, - "CreateAndConfigureAccount": { - "methods": [ - "create_and_configure_account" - ] - }, - "DeleteAccount": { - "methods": [ - "delete_account" - ] - }, - "UpdateAccount": { - "methods": [ - "update_account" - ] - }, - "ListAccounts": { - "methods": [ - "list_accounts" - ] - }, - "ListSubAccounts": { - "methods": [ - "list_sub_accounts" - ] - } - } - } - } - }, - "AutofeedSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client", - "rpcs": { - "GetAutofeedSettings": { - "methods": [ - "get_autofeed_settings" - ] - }, - "UpdateAutofeedSettings": { - "methods": [ - "update_autofeed_settings" - ] - } - } - } - } - }, - "AutomaticImprovementsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client", - "rpcs": { - "GetAutomaticImprovements": { - "methods": [ - "get_automatic_improvements" - ] - }, - "UpdateAutomaticImprovements": { - "methods": [ - "update_automatic_improvements" - ] - } - } - } - } - }, - "BusinessIdentityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client", - "rpcs": { - "GetBusinessIdentity": { - "methods": [ - "get_business_identity" - ] - }, - "UpdateBusinessIdentity": { - "methods": [ - "update_business_identity" - ] - } - } - } - } - }, - "BusinessInfoService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client", - "rpcs": { - "GetBusinessInfo": { - "methods": [ - "get_business_info" - ] - }, - "UpdateBusinessInfo": { - "methods": [ - "update_business_info" - ] - } - } - } - } - }, - "CheckoutSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client", - "rpcs": { - "GetCheckoutSettings": { - "methods": [ - "get_checkout_settings" - ] - }, - "CreateCheckoutSettings": { - "methods": [ - "create_checkout_settings" - ] - }, - "UpdateCheckoutSettings": { - "methods": [ - "update_checkout_settings" - ] - }, - "DeleteCheckoutSettings": { - "methods": [ - "delete_checkout_settings" - ] - } - } - } - } - }, - "EmailPreferencesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client", - "rpcs": { - "GetEmailPreferences": { - "methods": [ - "get_email_preferences" - ] - }, - "UpdateEmailPreferences": { - "methods": [ - "update_email_preferences" - ] - } - } - } - } - }, - "GbpAccountsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client", - "rpcs": { - "ListGbpAccounts": { - "methods": [ - "list_gbp_accounts" - ] - }, - "LinkGbpAccount": { - "methods": [ - "link_gbp_account" - ] - } - } - } - } - }, - "HomepageService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client", - "rpcs": { - "GetHomepage": { - "methods": [ - "get_homepage" - ] - }, - "UpdateHomepage": { - "methods": [ - "update_homepage" - ] - }, - "ClaimHomepage": { - "methods": [ - "claim_homepage" - ] - }, - "UnclaimHomepage": { - "methods": [ - "unclaim_homepage" - ] - } - } - } - } - }, - "LfpProvidersService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client", - "rpcs": { - "FindLfpProviders": { - "methods": [ - "find_lfp_providers" - ] - }, - "LinkLfpProvider": { - "methods": [ - "link_lfp_provider" - ] - } - } - } - } - }, - "OmnichannelSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client", - "rpcs": { - "GetOmnichannelSetting": { - "methods": [ - "get_omnichannel_setting" - ] - }, - "ListOmnichannelSettings": { - "methods": [ - "list_omnichannel_settings" - ] - }, - "CreateOmnichannelSetting": { - "methods": [ - "create_omnichannel_setting" - ] - }, - "UpdateOmnichannelSetting": { - "methods": [ - "update_omnichannel_setting" - ] - }, - "RequestInventoryVerification": { - "methods": [ - "request_inventory_verification" - ] - } - } - } - } - }, - "OnlineReturnPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client", - "rpcs": { - "GetOnlineReturnPolicy": { - "methods": [ - "get_online_return_policy" - ] - }, - "ListOnlineReturnPolicies": { - "methods": [ - "list_online_return_policies" - ] - }, - "CreateOnlineReturnPolicy": { - "methods": [ - "create_online_return_policy" - ] - }, - "UpdateOnlineReturnPolicy": { - "methods": [ - "update_online_return_policy" - ] - }, - "DeleteOnlineReturnPolicy": { - "methods": [ - "delete_online_return_policy" - ] - } - } - } - } - }, - "ProgramsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client", - "rpcs": { - "GetProgram": { - "methods": [ - "get_program" - ] - }, - "ListPrograms": { - "methods": [ - "list_programs" - ] - }, - "EnableProgram": { - "methods": [ - "enable_program" - ] - }, - "DisableProgram": { - "methods": [ - "disable_program" - ] - } - } - } - } - }, - "RegionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client", - "rpcs": { - "GetRegion": { - "methods": [ - "get_region" - ] - }, - "CreateRegion": { - "methods": [ - "create_region" - ] - }, - "UpdateRegion": { - "methods": [ - "update_region" - ] - }, - "DeleteRegion": { - "methods": [ - "delete_region" - ] - }, - "ListRegions": { - "methods": [ - "list_regions" - ] - } - } - } - } - }, - "ShippingSettingsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client", - "rpcs": { - "GetShippingSettings": { - "methods": [ - "get_shipping_settings" - ] - }, - "InsertShippingSettings": { - "methods": [ - "insert_shipping_settings" - ] - } - } - } - } - }, - "TermsOfServiceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client", - "rpcs": { - "GetTermsOfService": { - "methods": [ - "get_terms_of_service" - ] - }, - "RetrieveLatestTermsOfService": { - "methods": [ - "retrieve_latest_terms_of_service" - ] - }, - "AcceptTermsOfService": { - "methods": [ - "accept_terms_of_service" - ] - } - } - } - } - }, - "TermsOfServiceAgreementStateService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client", - "rpcs": { - "GetTermsOfServiceAgreementState": { - "methods": [ - "get_terms_of_service_agreement_state" - ] - }, - "RetrieveForApplicationTermsOfServiceAgreementState": { - "methods": [ - "retrieve_for_application_terms_of_service_agreement_state" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec deleted file mode 100644 index b151765b5d27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/google-shopping-merchant-accounts-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts-v1beta" - gem.version = Google::Shopping::Merchant::Accounts::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-accounts-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-accounts instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-v1beta.rb deleted file mode 100644 index c0b2d7879e0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google-shopping-merchant-accounts-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/shopping/merchant/accounts/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb deleted file mode 100644 index e10eb5ebc89c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_service" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" -require "google/shopping/merchant/accounts/v1beta/user_service" -require "google/shopping/merchant/accounts/v1beta/accounts_service" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" -require "google/shopping/merchant/accounts/v1beta/business_info_service" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" -require "google/shopping/merchant/accounts/v1beta/homepage_service" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" -require "google/shopping/merchant/accounts/v1beta/programs_service" -require "google/shopping/merchant/accounts/v1beta/regions_service" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/accounts/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb deleted file mode 100644 index 49903c0040db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accessright.proto - -require 'google/protobuf' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/accessright.proto\x12(google.shopping.merchant.accounts.v1beta*_\n\x0b\x41\x63\x63\x65ssRight\x12\x1c\n\x18\x41\x43\x43\x45SS_RIGHT_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\x12\x19\n\x15PERFORMANCE_REPORTING\x10\x03\x42\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10\x41\x63\x63\x65ssRightProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccessRight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccessRight").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb deleted file mode 100644 index b613248a4cd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/client" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_issue_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb deleted file mode 100644 index 43a790ecc274..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +++ /dev/null @@ -1,509 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - ## - # Client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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/shopping/merchant/accounts/v1beta/accountissue_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 - - @account_issue_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.call_rpc :list_account_issues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountIssueService API. - # - # This class represents the configuration for AccountIssueService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb deleted file mode 100644 index bec671601e38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Credentials for the AccountIssueService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb deleted file mode 100644 index 71d24f829fad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Path helper methods for the AccountIssueService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb deleted file mode 100644 index 3b76683c97dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_issue_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `AccountIssueService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - module AccountIssueService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb deleted file mode 100644 index 83ae8b227f30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +++ /dev/null @@ -1,459 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST client for the AccountIssueService service. - # - # Service to support `AccountIssueService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_issue_service_stub - - ## - # Configure the AccountIssueService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountIssueService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountIssueService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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 - @account_issue_service_stub.universe_domain - end - - ## - # Create a new AccountIssueService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountIssueService 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 - - @account_issue_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_issue_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 - @account_issue_service_stub.logger - end - - # Service calls - - ## - # Lists all account issues of a Merchant Center account. - # - # @overload list_account_issues(request, options = nil) - # Pass arguments to `list_account_issues` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_issues(parent: nil, page_size: nil, page_token: nil, language_code: nil, time_zone: nil) - # Pass arguments to `list_account_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @param language_code [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @param time_zone [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - # - # # Call the list_account_issues method. - # result = client.list_account_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - # p item - # end - # - def list_account_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_issue_service_stub.list_account_issues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_issue_service_stub, :list_account_issues, "account_issues", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountIssueService REST API. - # - # This class represents the configuration for AccountIssueService 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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_account_issues.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountIssueService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_account_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_issues - - # @private - def initialize parent_rpcs = nil - list_account_issues_config = parent_rpcs.list_account_issues if parent_rpcs.respond_to? :list_account_issues - @list_account_issues = ::Gapic::Config::Method.new list_account_issues_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb deleted file mode 100644 index 625c0f5e9a9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - module Rest - ## - # REST service stub for the AccountIssueService 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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse] - # A result object deserialized from the server's reply - def list_account_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.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_account_issues REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/issues", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb deleted file mode 100644 index 45fafd29eba8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/account_tax.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/tax_rule_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/account_tax.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x37google/shopping/merchant/accounts/v1beta/tax_rule.proto\"\xe6\x01\n\nAccountTax\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\ttax_rules\x18\x03 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.TaxRule:i\xea\x41\x66\n%merchantapi.googleapis.com/AccountTax\x12#accounts/{account}/accounttax/{tax}*\x0c\x61\x63\x63ountTaxes2\naccountTax\"S\n\x14GetAccountTaxRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%merchantapi.googleapis.com/AccountTax\"\x9a\x01\n\x17UpdateAccountTaxRequest\x12N\n\x0b\x61\x63\x63ount_tax\x18\x01 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTaxB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"}\n\x15ListAccountTaxRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/AccountTax\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x16ListAccountTaxResponse\x12K\n\raccount_taxes\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.AccountTax\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x84\x06\n\x11\x41\x63\x63ountTaxService\x12\xc5\x01\n\rGetAccountTax\x12>.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/accounttax/*}\x12\xd5\x01\n\x0eListAccountTax\x12?.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest\x1a@.google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{parent=accounts/*}/accounttax\x12\x85\x02\n\x10UpdateAccountTax\x12\x41.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest\x1a\x34.google.shopping.merchant.accounts.v1beta.AccountTax\"x\xda\x41\x17\x61\x63\x63ount_tax,update_mask\xda\x41\x0b\x61\x63\x63ount_tax\x82\xd3\xe4\x93\x02J2;/accounts/v1beta/{account_tax.name=accounts/*/accounttax/*}:\x0b\x61\x63\x63ount_tax\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x91\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0f\x41\x63\x63ountTaxProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountTax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountTax").msgclass - GetAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest").msgclass - UpdateAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest").msgclass - ListAccountTaxRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest").msgclass - ListAccountTaxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountTaxResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb deleted file mode 100644 index fe883ee6aa6c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/client" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_tax_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb deleted file mode 100644 index e854d0f8fc83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +++ /dev/null @@ -1,688 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - ## - # Client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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/shopping/merchant/accounts/v1beta/account_tax_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 - - @account_tax_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :get_account_tax, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :list_account_tax, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.account_tax&.name - header_params["account_tax.name"] = request.account_tax.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account_tax.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.call_rpc :update_account_tax, request, 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 AccountTaxService API. - # - # This class represents the configuration for AccountTaxService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb deleted file mode 100644 index fdecfb93cd56..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Credentials for the AccountTaxService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb deleted file mode 100644 index 327a514a749b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Path helper methods for the AccountTaxService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified AccountTax resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/accounttax/{tax}` - # - # @param account [String] - # @param tax [String] - # - # @return [::String] - def account_tax_path account:, tax: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/accounttax/#{tax}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb deleted file mode 100644 index 539c364b6e47..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/paths" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module AccountTaxService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb deleted file mode 100644 index 82f756ae1010..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +++ /dev/null @@ -1,624 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST client for the AccountTaxService service. - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_tax_service_stub - - ## - # Configure the AccountTaxService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountTaxService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountTaxService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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 - @account_tax_service_stub.universe_domain - end - - ## - # Create a new AccountTaxService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountTaxService 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 - - @account_tax_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_tax_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 - @account_tax_service_stub.logger - end - - # Service calls - - ## - # Returns the tax rules that match the conditions of GetAccountTaxRequest - # - # @overload get_account_tax(request, options = nil) - # Pass arguments to `get_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_tax(name: nil) - # Pass arguments to `get_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name from which tax settings will be retrieved - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - # - # # Call the get_account_tax method. - # result = client.get_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def get_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.get_account_tax request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # - # @overload list_account_tax(request, options = nil) - # Pass arguments to `list_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_tax(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @param page_token [::String] - # The token returned by the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - # - # # Call the list_account_tax method. - # result = client.list_account_tax request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p item - # end - # - def list_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.list_account_tax request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_tax_service_stub, :list_account_tax, "account_taxes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the tax settings of the account. - # - # @overload update_account_tax(request, options = nil) - # Pass arguments to `update_account_tax` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_tax(account_tax: nil, update_mask: nil) - # Pass arguments to `update_account_tax` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_tax [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax, ::Hash] - # Required. The tax setting that will be updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - # - # # Call the update_account_tax method. - # result = client.update_account_tax request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - # p result - # - def update_account_tax request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account_tax.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account_tax.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_tax.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_tax_service_stub.update_account_tax request, 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 AccountTaxService REST API. - # - # This class represents the configuration for AccountTaxService 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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_tax.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountTaxService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_tax - ## - # RPC-specific configuration for `list_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_tax - ## - # RPC-specific configuration for `update_account_tax` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_tax - - # @private - def initialize parent_rpcs = nil - get_account_tax_config = parent_rpcs.get_account_tax if parent_rpcs.respond_to? :get_account_tax - @get_account_tax = ::Gapic::Config::Method.new get_account_tax_config - list_account_tax_config = parent_rpcs.list_account_tax if parent_rpcs.respond_to? :list_account_tax - @list_account_tax = ::Gapic::Config::Method.new list_account_tax_config - update_account_tax_config = parent_rpcs.update_account_tax if parent_rpcs.respond_to? :update_account_tax - @update_account_tax = ::Gapic::Config::Method.new update_account_tax_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb deleted file mode 100644 index 1793880416fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - module Rest - ## - # REST service stub for the AccountTaxService 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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def get_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse] - # A result object deserialized from the server's reply - def list_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # A result object deserialized from the server's reply - def update_account_tax request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_tax_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account_tax", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.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_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/accounttax", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_tax REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_tax_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account_tax.name}", - body: "account_tax", - matches: [ - ["account_tax.name", %r{^accounts/[^/]+/accounttax/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb deleted file mode 100644 index 91544da451e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/account_tax.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/account_tax_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountTaxService - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountTaxService' - - # Returns the tax rules that match the conditions of GetAccountTaxRequest - rpc :GetAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - # Lists the tax settings of the sub-accounts only in your - # Merchant Center account. - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - rpc :ListAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse - # Updates the tax settings of the account. - rpc :UpdateAccountTax, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb deleted file mode 100644 index 1221df9fb2c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountissue.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/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/accountissue.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xb7\x06\n\x0c\x41\x63\x63ountIssue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12Q\n\x08severity\x18\x03 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.Severity\x12i\n\x15impacted_destinations\x18\x04 \x03(\x0b\x32J.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x06 \x01(\t\x1a\xde\x02\n\x13ImpactedDestination\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x62\n\x07impacts\x18\x02 \x03(\x0b\x32Q.google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact\x1ap\n\x06Impact\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12Q\n\x08severity\x18\x02 \x01(\x0e\x32?.google.shopping.merchant.accounts.v1beta.AccountIssue.SeverityB\x14\n\x12_reporting_context\"M\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x0e\n\nSUGGESTION\x10\x03:l\xea\x41i\n\'merchantapi.googleapis.com/AccountIssue\x12!accounts/{account}/issues/{issue}*\raccountIssues2\x0c\x61\x63\x63ountIssue\"\xbb\x01\n\x18ListAccountIssuesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x19ListAccountIssuesResponse\x12N\n\x0e\x61\x63\x63ount_issues\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.AccountIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbb\x02\n\x13\x41\x63\x63ountIssueService\x12\xda\x01\n\x11ListAccountIssues\x12\x42.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest\x1a\x43.google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{parent=accounts/*}/issues\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x41\x63\x63ountIssueProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue").msgclass - AccountIssue::ImpactedDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination").msgclass - AccountIssue::ImpactedDestination::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.ImpactedDestination.Impact").msgclass - AccountIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountIssue.Severity").enummodule - ListAccountIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest").msgclass - ListAccountIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountIssuesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb deleted file mode 100644 index c925c068fe0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accountissue.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accountissue_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountIssueService - # Service to support `AccountIssueService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountIssueService' - - # Lists all account issues of a Merchant Center account. - rpc :ListAccountIssues, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb deleted file mode 100644 index ea1e691e4169..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accountservices_pb' -require 'google/shopping/merchant/accounts/v1beta/user_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/accounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/accountservices.proto\x1a\x33google/shopping/merchant/accounts/v1beta/user.proto\x1a\x1agoogle/type/datetime.proto\"\x8a\x02\n\x07\x41\x63\x63ount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\naccount_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\radult_content\x18\x04 \x01(\x08\x12\x19\n\x0ctest_account\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12-\n\ttime_zone\x18\x06 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02:;\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}\"M\n\x11GetAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\"\x9f\x06\n CreateAndConfigureAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12O\n\x05users\x18\x02 \x03(\x0b\x32;.google.shopping.merchant.accounts.v1beta.CreateUserRequestB\x03\xe0\x41\x01\x12\x8a\x01\n\x17\x61\x63\x63\x65pt_terms_of_service\x18\x03 \x01(\x0b\x32_.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfServiceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12r\n\x07service\x18\x04 \x03(\x0b\x32\\.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountServiceB\x03\xe0\x41\x02\x1aq\n\x14\x41\x63\x63\x65ptTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xd0\x01\n\x11\x41\x64\x64\x41\x63\x63ountService\x12[\n\x13\x61\x63\x63ount_aggregation\x18g \x01(\x0b\x32<.google.shopping.merchant.accounts.v1beta.AccountAggregationH\x00\x12\x41\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"merchantapi.googleapis.com/AccountH\x01\x88\x01\x01\x42\x0e\n\x0cservice_typeB\x0b\n\t_providerB\x1a\n\x18_accept_terms_of_service\"d\n\x14\x44\x65leteAccountRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x95\x01\n\x14UpdateAccountRequest\x12G\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AccountB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"[\n\x13ListAccountsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x87\x01\n\x16ListSubAccountsRequest\x12<\n\x08provider\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"w\n\x17ListSubAccountsResponse\x12\x43\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Account\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\t\n\x0f\x41\x63\x63ountsService\x12\xaf\x01\n\nGetAccount\x12;.google.shopping.merchant.accounts.v1beta.GetAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/accounts/v1beta/{name=accounts/*}\x12\xd3\x01\n\x19\x43reateAndConfigureAccount\x12J.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"7\x82\xd3\xe4\x93\x02\x31\",/accounts/v1beta/accounts:createAndConfigure:\x01*\x12\x9a\x01\n\rDeleteAccount\x12>.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest\x1a\x16.google.protobuf.Empty\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$*\"/accounts/v1beta/{name=accounts/*}\x12\xd5\x01\n\rUpdateAccount\x12>.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Account\"Q\xda\x41\x13\x61\x63\x63ount,update_mask\x82\xd3\xe4\x93\x02\x35\x32*/accounts/v1beta/{account.name=accounts/*}:\x07\x61\x63\x63ount\x12\xb0\x01\n\x0cListAccounts\x12=.google.shopping.merchant.accounts.v1beta.ListAccountsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListAccountsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/accounts/v1beta/accounts\x12\xe1\x01\n\x0fListSubAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse\"I\xda\x41\x08provider\x82\xd3\xe4\x93\x02\x38\x12\x36/accounts/v1beta/{provider=accounts/*}:listSubaccounts\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Account").msgclass - GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAccountRequest").msgclass - CreateAndConfigureAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest").msgclass - CreateAndConfigureAccountRequest::AcceptTermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AcceptTermsOfService").msgclass - CreateAndConfigureAccountRequest::AddAccountService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest.AddAccountService").msgclass - DeleteAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteAccountRequest").msgclass - UpdateAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAccountRequest").msgclass - ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsRequest").msgclass - ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListAccountsResponse").msgclass - ListSubAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest").msgclass - ListSubAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListSubAccountsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb deleted file mode 100644 index 1db2def8535c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb deleted file mode 100644 index cfa723ef8c94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +++ /dev/null @@ -1,1000 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - ## - # Client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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/shopping/merchant/accounts/v1beta/accounts_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 - - @accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :get_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.create_and_configure_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :create_and_configure_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :delete_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.account&.name - header_params["account.name"] = request.account.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :update_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.list_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.provider - header_params["provider"] = request.provider - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sub_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.call_rpc :list_sub_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountsService API. - # - # This class represents the configuration for AccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb deleted file mode 100644 index d2510c2f46bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Credentials for the AccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb deleted file mode 100644 index 2be49373540a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Path helper methods for the AccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb deleted file mode 100644 index 0d514d6bb48c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support Accounts API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - module AccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb deleted file mode 100644 index cdf36e4c6b04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +++ /dev/null @@ -1,931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST client for the AccountsService service. - # - # Service to support Accounts API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :accounts_service_stub - - ## - # Configure the AccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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 - @accounts_service_stub.universe_domain - end - - ## - # Create a new AccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountsService 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 - - @accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @accounts_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 - @accounts_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - # - # @overload get_account(request, options = nil) - # Pass arguments to `get_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account(name: nil) - # Pass arguments to `get_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - # - # # Call the get_account method. - # result = client.get_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def get_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.get_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - # - # @overload create_and_configure_account(request, options = nil) - # Pass arguments to `create_and_configure_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_and_configure_account(account: nil, users: nil, accept_terms_of_service: nil, service: nil) - # Pass arguments to `create_and_configure_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The account to be created. - # @param users [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash>] - # Optional. Users to be added to the account. - # @param accept_terms_of_service [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService, ::Hash] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @param service [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, ::Hash>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - # - # # Call the create_and_configure_account method. - # result = client.create_and_configure_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def create_and_configure_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest - - # Converts hash and nil to an 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_and_configure_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_and_configure_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_and_configure_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.create_and_configure_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - # - # @overload delete_account(request, options = nil) - # Pass arguments to `delete_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account(name: nil, force: nil) - # Pass arguments to `delete_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @param force [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - # - # # Call the delete_account method. - # result = client.delete_account request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.delete_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - # - # @overload update_account(request, options = nil) - # Pass arguments to `update_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account(account: nil, update_mask: nil) - # Pass arguments to `update_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::Google::Shopping::Merchant::Accounts::V1beta::Account, ::Hash] - # Required. The new version of the account. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - # - # # Call the update_account method. - # result = client.update_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - # p result - # - def update_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.update_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - # - # @overload list_accounts(request, options = nil) - # Pass arguments to `list_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_accounts(page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - # - # # Call the list_accounts method. - # result = client.list_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - # - # @overload list_sub_accounts(request, options = nil) - # Pass arguments to `list_sub_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sub_accounts(provider: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sub_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provider [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - # - # # Call the list_sub_accounts method. - # result = client.list_sub_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - # p item - # end - # - def list_sub_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sub_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_sub_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sub_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @accounts_service_stub.list_sub_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @accounts_service_stub, :list_sub_accounts, "accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AccountsService REST API. - # - # This class represents the configuration for AccountsService 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::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account - ## - # RPC-specific configuration for `create_and_configure_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_and_configure_account - ## - # RPC-specific configuration for `delete_account` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account - ## - # RPC-specific configuration for `update_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account - ## - # RPC-specific configuration for `list_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accounts - ## - # RPC-specific configuration for `list_sub_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sub_accounts - - # @private - def initialize parent_rpcs = nil - get_account_config = parent_rpcs.get_account if parent_rpcs.respond_to? :get_account - @get_account = ::Gapic::Config::Method.new get_account_config - create_and_configure_account_config = parent_rpcs.create_and_configure_account if parent_rpcs.respond_to? :create_and_configure_account - @create_and_configure_account = ::Gapic::Config::Method.new create_and_configure_account_config - delete_account_config = parent_rpcs.delete_account if parent_rpcs.respond_to? :delete_account - @delete_account = ::Gapic::Config::Method.new delete_account_config - update_account_config = parent_rpcs.update_account if parent_rpcs.respond_to? :update_account - @update_account = ::Gapic::Config::Method.new update_account_config - list_accounts_config = parent_rpcs.list_accounts if parent_rpcs.respond_to? :list_accounts - @list_accounts = ::Gapic::Config::Method.new list_accounts_config - list_sub_accounts_config = parent_rpcs.list_sub_accounts if parent_rpcs.respond_to? :list_sub_accounts - @list_sub_accounts = ::Gapic::Config::Method.new list_sub_accounts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb deleted file mode 100644 index d62c09e78506..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - module Rest - ## - # REST service stub for the AccountsService 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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def get_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.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_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def create_and_configure_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_and_configure_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_and_configure_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # A result object deserialized from the server's reply - def update_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse] - # A result object deserialized from the server's reply - def list_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse] - # A result object deserialized from the server's reply - def list_sub_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sub_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sub_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.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_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_and_configure_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest] - # 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_and_configure_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/accounts:createAndConfigure", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{account.name}", - body: "account", - matches: [ - ["account.name", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/accounts", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sub_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sub_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{provider}:listSubaccounts", - matches: [ - ["provider", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb deleted file mode 100644 index df57e5bd28dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/accounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/accounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AccountsService - # Service to support Accounts API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AccountsService' - - # Retrieves an account from your Merchant Center account. - # After inserting, updating, or deleting an account, it may take several - # minutes before changes take effect. - rpc :GetAccount, ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Creates a standalone Merchant Center account with additional configuration. - # Adds the user that makes the request as an admin for the new account. - rpc :CreateAndConfigureAccount, ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Deletes the specified account regardless of its type: standalone, MCA or - # sub-account. Deleting an MCA leads to the deletion of all of its - # sub-accounts. Executing this method requires admin access. - # The deletion succeeds only if the account does not provide services - # to any other account and has no processed offers. You can use the `force` - # parameter to override this. - rpc :DeleteAccount, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, ::Google::Protobuf::Empty - # Updates an account regardless of its type: standalone, MCA or sub-account. - # Executing this method requires admin access. - rpc :UpdateAccount, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Account - # Lists accounts accessible to the calling user and matching the - # constraints of the request such as page size or filters. - # This is not just listing the sub-accounts of an MCA, but all accounts the - # calling user has access to including other MCAs, linked accounts, - # standalone accounts and so on. If no filter is provided, then it returns - # accounts the user is directly added to. - rpc :ListAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse - # List all sub-accounts for a given multi client account. This is a - # convenience wrapper for the more powerful `ListAccounts` method. This - # method will produce the same results as calling `ListsAccounts` with the - # following filter: - # `relationship(providerId={parent} AND service(type="ACCOUNT_AGGREGATION"))` - rpc :ListSubAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb deleted file mode 100644 index cf8e6a5da5cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/accountservices.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/accountservices.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x14\n\x12\x41\x63\x63ountAggregationB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x41\x63\x63ountServicesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AccountAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AccountAggregation").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb deleted file mode 100644 index 2d2bb35eeb25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "autofeed_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb deleted file mode 100644 index 6b3c5f535190..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +++ /dev/null @@ -1,579 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - ## - # Client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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/shopping/merchant/accounts/v1beta/autofeedsettings_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 - - @autofeed_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.autofeed_settings&.name - header_params["autofeed_settings.name"] = request.autofeed_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_autofeed_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutofeedSettingsService API. - # - # This class represents the configuration for AutofeedSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb deleted file mode 100644 index 2ebbb8b964ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Credentials for the AutofeedSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb deleted file mode 100644 index 4e13a4e879c1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Path helper methods for the AutofeedSettingsService API. - module Paths - ## - # Create a fully-qualified AutofeedSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/autofeedSettings` - # - # @param account [String] - # - # @return [::String] - def autofeed_settings_path account: - "accounts/#{account}/autofeedSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb deleted file mode 100644 index 089d4e01e4f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - module AutofeedSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb deleted file mode 100644 index 21ef0349a01e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +++ /dev/null @@ -1,522 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST client for the AutofeedSettingsService service. - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :autofeed_settings_service_stub - - ## - # Configure the AutofeedSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutofeedSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutofeedSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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 - @autofeed_settings_service_stub.universe_domain - end - - ## - # Create a new AutofeedSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutofeedSettingsService 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 - - @autofeed_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @autofeed_settings_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 - @autofeed_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieves the autofeed settings of an account. - # - # @overload get_autofeed_settings(request, options = nil) - # Pass arguments to `get_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_autofeed_settings(name: nil) - # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - # - # # Call the get_autofeed_settings method. - # result = client.get_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def get_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.get_autofeed_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the autofeed settings of an account. - # - # @overload update_autofeed_settings(request, options = nil) - # Pass arguments to `update_autofeed_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil) - # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash] - # Required. The new version of the autofeed setting. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - # - # # Call the update_autofeed_settings method. - # result = client.update_autofeed_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - # p result - # - def update_autofeed_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_autofeed_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_autofeed_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_autofeed_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @autofeed_settings_service_stub.update_autofeed_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutofeedSettingsService REST API. - # - # This class represents the configuration for AutofeedSettingsService 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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_autofeed_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutofeedSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_autofeed_settings - ## - # RPC-specific configuration for `update_autofeed_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_autofeed_settings - - # @private - def initialize parent_rpcs = nil - get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings - @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config - update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings - @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb deleted file mode 100644 index 31c104de3eab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - module Rest - ## - # REST service stub for the AutofeedSettingsService 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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def get_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # A result object deserialized from the server's reply - def update_autofeed_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_autofeed_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_autofeed_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.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_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_autofeed_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_autofeed_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{autofeed_settings.name}", - body: "autofeed_settings", - matches: [ - ["autofeed_settings.name", %r{^accounts/[^/]+/autofeedSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb deleted file mode 100644 index d9f92c16c605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/autofeedsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n\x10\x41utofeedSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0f\x65nable_products\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\x08\x65ligible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:y\xea\x41v\n+merchantapi.googleapis.com/AutofeedSettings\x12#accounts/{account}/autofeedSettings*\x10\x61utofeedSettings2\x10\x61utofeedSettings\"_\n\x1aGetAutofeedSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/AutofeedSettings\"\xb1\x01\n\x1dUpdateAutofeedSettingsRequest\x12Z\n\x11\x61utofeed_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.AutofeedSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x41utofeedSettingsService\x12\xdb\x01\n\x13GetAutofeedSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/autofeedSettings}\x12\xa0\x02\n\x16UpdateAutofeedSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.AutofeedSettings\"\x80\x01\xda\x41\x1d\x61utofeed_settings,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}:\x11\x61utofeed_settings\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x41utofeedSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutofeedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutofeedSettings").msgclass - GetAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest").msgclass - UpdateAutofeedSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb deleted file mode 100644 index 700b9a9139ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/autofeedsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutofeedSettingsService - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutofeedSettingsService' - - # Retrieves the autofeed settings of an account. - rpc :GetAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - # Updates the autofeed settings of an account. - rpc :UpdateAutofeedSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb deleted file mode 100644 index f49e147087f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "automatic_improvements_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb deleted file mode 100644 index 954914055c6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - ## - # Client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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/shopping/merchant/accounts/v1beta/automaticimprovements_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 - - @automatic_improvements_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :get_automatic_improvements, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.automatic_improvements&.name - header_params["automatic_improvements.name"] = request.automatic_improvements.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_automatic_improvements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.call_rpc :update_automatic_improvements, request, 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 AutomaticImprovementsService API. - # - # This class represents the configuration for AutomaticImprovementsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb deleted file mode 100644 index f8387a866b10..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Credentials for the AutomaticImprovementsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb deleted file mode 100644 index 9450fc09a397..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Path helper methods for the AutomaticImprovementsService API. - module Paths - ## - # Create a fully-qualified AutomaticImprovements resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/automaticImprovements` - # - # @param account [String] - # - # @return [::String] - def automatic_improvements_path account: - "accounts/#{account}/automaticImprovements" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest.rb deleted file mode 100644 index 351bcf6d3b94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/credentials" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/paths" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - module AutomaticImprovementsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb deleted file mode 100644 index 771dbbb7ade0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/client.rb +++ /dev/null @@ -1,532 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST client for the AutomaticImprovementsService service. - # - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :automatic_improvements_service_stub - - ## - # Configure the AutomaticImprovementsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutomaticImprovementsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutomaticImprovementsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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 - @automatic_improvements_service_stub.universe_domain - end - - ## - # Create a new AutomaticImprovementsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutomaticImprovementsService 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 - - @automatic_improvements_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @automatic_improvements_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 - @automatic_improvements_service_stub.logger - end - - # Service calls - - ## - # Retrieves the automatic improvements of an account. - # - # @overload get_automatic_improvements(request, options = nil) - # Pass arguments to `get_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_automatic_improvements(name: nil) - # Pass arguments to `get_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - # - # # Call the get_automatic_improvements method. - # result = client.get_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def get_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.get_automatic_improvements request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the automatic improvements of an account. - # - # @overload update_automatic_improvements(request, options = nil) - # Pass arguments to `update_automatic_improvements` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_automatic_improvements(automatic_improvements: nil, update_mask: nil) - # Pass arguments to `update_automatic_improvements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param automatic_improvements [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements, ::Hash] - # Required. The new version of the automatic imrovements. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - # - # # Call the update_automatic_improvements method. - # result = client.update_automatic_improvements request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - # p result - # - def update_automatic_improvements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_automatic_improvements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_automatic_improvements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_automatic_improvements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @automatic_improvements_service_stub.update_automatic_improvements request, 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 AutomaticImprovementsService REST API. - # - # This class represents the configuration for AutomaticImprovementsService 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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_automatic_improvements.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 AutomaticImprovementsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :get_automatic_improvements - ## - # RPC-specific configuration for `update_automatic_improvements` - # @return [::Gapic::Config::Method] - # - attr_reader :update_automatic_improvements - - # @private - def initialize parent_rpcs = nil - get_automatic_improvements_config = parent_rpcs.get_automatic_improvements if parent_rpcs.respond_to? :get_automatic_improvements - @get_automatic_improvements = ::Gapic::Config::Method.new get_automatic_improvements_config - update_automatic_improvements_config = parent_rpcs.update_automatic_improvements if parent_rpcs.respond_to? :update_automatic_improvements - @update_automatic_improvements = ::Gapic::Config::Method.new update_automatic_improvements_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb deleted file mode 100644 index 3b8079dd1fa9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - module Rest - ## - # REST service stub for the AutomaticImprovementsService 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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def get_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # A result object deserialized from the server's reply - def update_automatic_improvements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_automatic_improvements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_automatic_improvements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.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_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_automatic_improvements REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_automatic_improvements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{automatic_improvements.name}", - body: "automatic_improvements", - matches: [ - ["automatic_improvements.name", %r{^accounts/[^/]+/automaticImprovements/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb deleted file mode 100644 index d9465d26faaa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/accounts/v1beta/automaticimprovements.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x04\n\x15\x41utomaticImprovements\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Y\n\x0citem_updates\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdatesH\x00\x88\x01\x01\x12\x65\n\x12image_improvements\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovementsH\x01\x88\x01\x01\x12k\n\x15shipping_improvements\x18\x04 \x01(\x0b\x32G.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovementsH\x02\x88\x01\x01:\x8e\x01\xea\x41\x8a\x01\n0merchantapi.googleapis.com/AutomaticImprovements\x12(accounts/{account}/automaticImprovements*\x15\x61utomaticImprovements2\x15\x61utomaticImprovementsB\x0f\n\r_item_updatesB\x15\n\x13_image_improvementsB\x18\n\x16_shipping_improvements\"\xaa\x05\n\x14\x41utomaticItemUpdates\x12\x8a\x01\n\x1d\x61\x63\x63ount_item_updates_settings\x18\x01 \x01(\x0b\x32^.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettingsB\x03\xe0\x41\x01\x12*\n\x1d\x65\x66\x66\x65\x63tive_allow_price_updates\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x31\n$effective_allow_availability_updates\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x38\n+effective_allow_strict_availability_updates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12.\n!effective_allow_condition_updates\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xbb\x02\n\x1fItemUpdatesAccountLevelSettings\x12 \n\x13\x61llow_price_updates\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\'\n\x1a\x61llow_availability_updates\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n!allow_strict_availability_updates\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12$\n\x17\x61llow_condition_updates\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x16\n\x14_allow_price_updatesB\x1d\n\x1b_allow_availability_updatesB$\n\"_allow_strict_availability_updatesB\x1a\n\x18_allow_condition_updates\"\xa4\x03\n\x1a\x41utomaticImageImprovements\x12\xa1\x01\n#account_image_improvements_settings\x18\x01 \x01(\x0b\x32j.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettingsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x39\n,effective_allow_automatic_image_improvements\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x7f\n%ImageImprovementsAccountLevelSettings\x12/\n\"allow_automatic_image_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_allow_automatic_image_improvementsB&\n$_account_image_improvements_settings\"i\n\x1d\x41utomaticShippingImprovements\x12(\n\x1b\x61llow_shipping_improvements\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1e\n\x1c_allow_shipping_improvements\"i\n\x1fGetAutomaticImprovementsRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0merchantapi.googleapis.com/AutomaticImprovements\"\xc0\x01\n\"UpdateAutomaticImprovementsRequest\x12\x64\n\x16\x61utomatic_improvements\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.AutomaticImprovementsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\x9f\x05\n\x1c\x41utomaticImprovementsService\x12\xef\x01\n\x18GetAutomaticImprovements\x12I.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/accounts/v1beta/{name=accounts/*/automaticImprovements}\x12\xc3\x02\n\x1bUpdateAutomaticImprovements\x12L.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest\x1a?.google.shopping.merchant.accounts.v1beta.AutomaticImprovements\"\x94\x01\xda\x41\"automatic_improvements,update_mask\x82\xd3\xe4\x93\x02i2O/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}:\x16\x61utomatic_improvements\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x9c\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1a\x41utomaticImprovementsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - AutomaticImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImprovements").msgclass - AutomaticItemUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates").msgclass - AutomaticItemUpdates::ItemUpdatesAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings").msgclass - AutomaticImageImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements").msgclass - AutomaticImageImprovements::ImageImprovementsAccountLevelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings").msgclass - AutomaticShippingImprovements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements").msgclass - GetAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest").msgclass - UpdateAutomaticImprovementsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb deleted file mode 100644 index 50bbf1aa06a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/automaticimprovements_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/automaticimprovements.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/automaticimprovements_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module AutomaticImprovementsService - # Service to manage the automatic improvements of an account. The automatic - # improvements of the account can be used to automatically update products, - # improve images and shipping. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' - - # Retrieves the automatic improvements of an account. - rpc :GetAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - # Updates the automatic improvements of an account. - rpc :UpdateAutomaticImprovements, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb deleted file mode 100644 index d43f48202612..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/client" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_identity_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb deleted file mode 100644 index 6cd2a1560400..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +++ /dev/null @@ -1,580 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - ## - # Client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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/shopping/merchant/accounts/v1beta/businessidentity_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 - - @business_identity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :get_business_identity, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_identity&.name - header_params["business_identity.name"] = request.business_identity.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_business_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.call_rpc :update_business_identity, request, 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 BusinessIdentityService API. - # - # This class represents the configuration for BusinessIdentityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb deleted file mode 100644 index 411d0a8452ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Credentials for the BusinessIdentityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb deleted file mode 100644 index 684dbc65841c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Path helper methods for the BusinessIdentityService API. - module Paths - ## - # Create a fully-qualified BusinessIdentity resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessIdentity` - # - # @param account [String] - # - # @return [::String] - def business_identity_path account: - "accounts/#{account}/businessIdentity" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb deleted file mode 100644 index d1f0814edc5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_identity_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - module BusinessIdentityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb deleted file mode 100644 index c3efad2cf64d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST client for the BusinessIdentityService service. - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_identity_service_stub - - ## - # Configure the BusinessIdentityService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessIdentityService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessIdentityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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 - @business_identity_service_stub.universe_domain - end - - ## - # Create a new BusinessIdentityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessIdentityService 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 - - @business_identity_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_identity_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 - @business_identity_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business identity of an account. - # - # @overload get_business_identity(request, options = nil) - # Pass arguments to `get_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_identity(name: nil) - # Pass arguments to `get_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - # - # # Call the get_business_identity method. - # result = client.get_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def get_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.get_business_identity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business identity of an account. Executing this method requires - # admin access. - # - # @overload update_business_identity(request, options = nil) - # Pass arguments to `update_business_identity` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_identity(business_identity: nil, update_mask: nil) - # Pass arguments to `update_business_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_identity [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity, ::Hash] - # Required. The new version of the business identity. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - # - # # Call the update_business_identity method. - # result = client.update_business_identity request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - # p result - # - def update_business_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_business_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_identity_service_stub.update_business_identity request, 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 BusinessIdentityService REST API. - # - # This class represents the configuration for BusinessIdentityService 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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_identity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessIdentityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_identity - ## - # RPC-specific configuration for `update_business_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_identity - - # @private - def initialize parent_rpcs = nil - get_business_identity_config = parent_rpcs.get_business_identity if parent_rpcs.respond_to? :get_business_identity - @get_business_identity = ::Gapic::Config::Method.new get_business_identity_config - update_business_identity_config = parent_rpcs.update_business_identity if parent_rpcs.respond_to? :update_business_identity - @update_business_identity = ::Gapic::Config::Method.new update_business_identity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb deleted file mode 100644 index 650d5181843f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - module Rest - ## - # REST service stub for the BusinessIdentityService 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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def get_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # A result object deserialized from the server's reply - def update_business_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_business_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.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_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_identity REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_business_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_identity.name}", - body: "business_identity", - matches: [ - ["business_identity.name", %r{^accounts/[^/]+/businessIdentity/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb deleted file mode 100644 index 6bc1a26ad17a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/client" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_info_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb deleted file mode 100644 index a58943d63128..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +++ /dev/null @@ -1,579 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - ## - # Client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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/shopping/merchant/accounts/v1beta/businessinfo_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 - - @business_info_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :get_business_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.business_info&.name - header_params["business_info.name"] = request.business_info.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_business_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.call_rpc :update_business_info, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BusinessInfoService API. - # - # This class represents the configuration for BusinessInfoService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb deleted file mode 100644 index 0308f8a5ad24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Credentials for the BusinessInfoService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb deleted file mode 100644 index 0a2e4aaaee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Path helper methods for the BusinessInfoService API. - module Paths - ## - # Create a fully-qualified BusinessInfo resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/businessInfo` - # - # @param account [String] - # - # @return [::String] - def business_info_path account: - "accounts/#{account}/businessInfo" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb deleted file mode 100644 index 1a834ba1e2c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/business_info_service/credentials" -require "google/shopping/merchant/accounts/v1beta/business_info_service/paths" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support business info API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - module BusinessInfoService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb deleted file mode 100644 index 04bf182d6111..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +++ /dev/null @@ -1,522 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST client for the BusinessInfoService service. - # - # Service to support business info API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_info_service_stub - - ## - # Configure the BusinessInfoService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessInfoService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessInfoService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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 - @business_info_service_stub.universe_domain - end - - ## - # Create a new BusinessInfoService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessInfoService 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 - - @business_info_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_info_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 - @business_info_service_stub.logger - end - - # Service calls - - ## - # Retrieves the business info of an account. - # - # @overload get_business_info(request, options = nil) - # Pass arguments to `get_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_business_info(name: nil) - # Pass arguments to `get_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - # - # # Call the get_business_info method. - # result = client.get_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def get_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.get_business_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the business info of an account. Executing this method requires - # admin access. - # - # @overload update_business_info(request, options = nil) - # Pass arguments to `update_business_info` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_business_info(business_info: nil, update_mask: nil) - # Pass arguments to `update_business_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param business_info [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo, ::Hash] - # Required. The new version of the business info. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - # - # # Call the update_business_info method. - # result = client.update_business_info request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - # p result - # - def update_business_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_business_info.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_business_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_business_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_info_service_stub.update_business_info request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BusinessInfoService REST API. - # - # This class represents the configuration for BusinessInfoService 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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_business_info.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 BusinessInfoService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_business_info - ## - # RPC-specific configuration for `update_business_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_business_info - - # @private - def initialize parent_rpcs = nil - get_business_info_config = parent_rpcs.get_business_info if parent_rpcs.respond_to? :get_business_info - @get_business_info = ::Gapic::Config::Method.new get_business_info_config - update_business_info_config = parent_rpcs.update_business_info if parent_rpcs.respond_to? :update_business_info - @update_business_info = ::Gapic::Config::Method.new update_business_info_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb deleted file mode 100644 index b7cc0315c746..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - module Rest - ## - # REST service stub for the BusinessInfoService 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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def get_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # A result object deserialized from the server's reply - def update_business_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_business_info_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_business_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.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_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_business_info REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_business_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{business_info.name}", - body: "business_info", - matches: [ - ["business_info.name", %r{^accounts/[^/]+/businessInfo/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb deleted file mode 100644 index 9dc1403d6850..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessidentity.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/businessidentity.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa5\t\n\x10\x42usinessIdentity\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12m\n\x12promotions_consent\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsentB\x03\xe0\x41\x01\x12\x66\n\x0b\x62lack_owned\x18\x03 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12\x66\n\x0bwomen_owned\x18\x04 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12h\n\rveteran_owned\x18\x05 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12g\n\x0clatino_owned\x18\x06 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x12i\n\x0esmall_business\x18\x07 \x01(\x0b\x32L.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttributeB\x03\xe0\x41\x01\x1a\x8d\x02\n\x11IdentityAttribute\x12\x83\x01\n\x14identity_declaration\x18\x01 \x01(\x0e\x32`.google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclarationB\x03\xe0\x41\x02\"r\n\x13IdentityDeclaration\x12$\n IDENTITY_DECLARATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SELF_IDENTIFIES_AS\x10\x01\x12\x1d\n\x19\x44OES_NOT_SELF_IDENTIFY_AS\x10\x02\"t\n\x11PromotionsConsent\x12\"\n\x1ePROMOTIONS_CONSENT_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROMOTIONS_CONSENT_GIVEN\x10\x01\x12\x1d\n\x19PROMOTIONS_CONSENT_DENIED\x10\x02:{\xea\x41x\n+merchantapi.googleapis.com/BusinessIdentity\x12#accounts/{account}/businessIdentity*\x12\x62usinessIdentities2\x10\x62usinessIdentity\"_\n\x1aGetBusinessIdentityRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/BusinessIdentity\"\xb1\x01\n\x1dUpdateBusinessIdentityRequest\x12Z\n\x11\x62usiness_identity\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.BusinessIdentityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xe3\x04\n\x17\x42usinessIdentityService\x12\xdb\x01\n\x13GetBusinessIdentity\x12\x44.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/businessIdentity}\x12\xa0\x02\n\x16UpdateBusinessIdentity\x12G.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest\x1a:.google.shopping.merchant.accounts.v1beta.BusinessIdentity\"\x80\x01\xda\x41\x1d\x62usiness_identity,update_mask\x82\xd3\xe4\x93\x02Z2E/accounts/v1beta/{business_identity.name=accounts/*/businessIdentity}:\x11\x62usiness_identity\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x42usinessIdentityProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity").msgclass - BusinessIdentity::IdentityAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute").msgclass - BusinessIdentity::IdentityAttribute::IdentityDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.IdentityAttribute.IdentityDeclaration").enummodule - BusinessIdentity::PromotionsConsent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessIdentity.PromotionsConsent").enummodule - GetBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest").msgclass - UpdateBusinessIdentityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb deleted file mode 100644 index 91a6e86252b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessidentity.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessidentity_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessIdentityService - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessIdentityService' - - # Retrieves the business identity of an account. - rpc :GetBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - # Updates the business identity of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessIdentity, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb deleted file mode 100644 index 254aa9f643ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/businessinfo.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/customerservice_pb' -require 'google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb' -require 'google/type/phone_number_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/businessinfo.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a>google/shopping/merchant/accounts/v1beta/customerservice.proto\x1a\x45google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x1a\x1egoogle/type/phone_number.proto\x1a google/type/postal_address.proto\"\xeb\x04\n\x0c\x42usinessInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x35\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12l\n\x18phone_verification_state\x18\x04 \x01(\x0e\x32@.google.shopping.merchant.accounts.v1beta.PhoneVerificationStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12]\n\x10\x63ustomer_service\x18\x05 \x01(\x0b\x32\x39.google.shopping.merchant.accounts.v1beta.CustomerServiceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x35\n#korean_business_registration_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:j\xea\x41g\n\'merchantapi.googleapis.com/BusinessInfo\x12\x1f\x61\x63\x63ounts/{account}/businessInfo*\rbusinessInfos2\x0c\x62usinessInfoB\n\n\x08_addressB\x08\n\x06_phoneB\x1b\n\x19_phone_verification_stateB\x13\n\x11_customer_serviceB&\n$_korean_business_registration_number\"W\n\x16GetBusinessInfoRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/BusinessInfo\"\xa5\x01\n\x19UpdateBusinessInfoRequest\x12R\n\rbusiness_info\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.BusinessInfoB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xb2\x04\n\x13\x42usinessInfoService\x12\xcb\x01\n\x0fGetBusinessInfo\x12@.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=accounts/*/businessInfo}\x12\x83\x02\n\x12UpdateBusinessInfo\x12\x43.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest\x1a\x36.google.shopping.merchant.accounts.v1beta.BusinessInfo\"p\xda\x41\x19\x62usiness_info,update_mask\x82\xd3\xe4\x93\x02N2=/accounts/v1beta/{business_info.name=accounts/*/businessInfo}:\rbusiness_info\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11\x42usinessInfoProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - BusinessInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.BusinessInfo").msgclass - GetBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest").msgclass - UpdateBusinessInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb deleted file mode 100644 index b69a18296f1e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/businessinfo.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/businessinfo_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module BusinessInfoService - # Service to support business info API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.BusinessInfoService' - - # Retrieves the business info of an account. - rpc :GetBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - # Updates the business info of an account. Executing this method requires - # admin access. - rpc :UpdateBusinessInfo, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service.rb deleted file mode 100644 index 6510004f596a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "checkout_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb deleted file mode 100644 index 16ed9683aad9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/client.rb +++ /dev/null @@ -1,776 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - ## - # Client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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/shopping/merchant/accounts/v1beta/checkoutsettings_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 - - @checkout_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :get_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :create_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.checkout_settings&.name - header_params["checkout_settings.name"] = request.checkout_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :update_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.call_rpc :delete_checkout_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CheckoutSettingsService API. - # - # This class represents the configuration for CheckoutSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb deleted file mode 100644 index 59b479846819..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Credentials for the CheckoutSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths.rb deleted file mode 100644 index c2ce599e591d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_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 Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Path helper methods for the CheckoutSettingsService API. - module Paths - ## - # Create a fully-qualified CheckoutSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}/checkoutSettings` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def checkout_settings_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}/checkoutSettings" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb deleted file mode 100644 index 88121fed97ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - module CheckoutSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb deleted file mode 100644 index ea68b31ea7d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/client.rb +++ /dev/null @@ -1,705 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST client for the CheckoutSettingsService service. - # - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :checkout_settings_service_stub - - ## - # Configure the CheckoutSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CheckoutSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CheckoutSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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 - @checkout_settings_service_stub.universe_domain - end - - ## - # Create a new CheckoutSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CheckoutSettingsService 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 - - @checkout_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @checkout_settings_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 - @checkout_settings_service_stub.logger - end - - # Service calls - - ## - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - # - # @overload get_checkout_settings(request, options = nil) - # Pass arguments to `get_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_checkout_settings(name: nil) - # Pass arguments to `get_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - # - # # Call the get_checkout_settings method. - # result = client.get_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def get_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.get_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates `CheckoutSettings` for the given merchant. - # - # @overload create_checkout_settings(request, options = nil) - # Pass arguments to `create_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_checkout_settings(parent: nil, checkout_settings: nil) - # Pass arguments to `create_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The `CheckoutSettings` object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - # - # # Call the create_checkout_settings method. - # result = client.create_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def create_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest - - # Converts hash and nil to an 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_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.create_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates `CheckoutSettings` for the given merchant. - # - # @overload update_checkout_settings(request, options = nil) - # Pass arguments to `update_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_checkout_settings(checkout_settings: nil, update_mask: nil) - # Pass arguments to `update_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param checkout_settings [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings, ::Hash] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - # - # # Call the update_checkout_settings method. - # result = client.update_checkout_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - # p result - # - def update_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.update_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - # - # @overload delete_checkout_settings(request, options = nil) - # Pass arguments to `delete_checkout_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_checkout_settings(name: nil) - # Pass arguments to `delete_checkout_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - # - # # Call the delete_checkout_settings method. - # result = client.delete_checkout_settings request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_checkout_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_checkout_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_checkout_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_checkout_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @checkout_settings_service_stub.delete_checkout_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CheckoutSettingsService REST API. - # - # This class represents the configuration for CheckoutSettingsService 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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_checkout_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 CheckoutSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_checkout_settings - ## - # RPC-specific configuration for `create_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :create_checkout_settings - ## - # RPC-specific configuration for `update_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_checkout_settings - ## - # RPC-specific configuration for `delete_checkout_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_checkout_settings - - # @private - def initialize parent_rpcs = nil - get_checkout_settings_config = parent_rpcs.get_checkout_settings if parent_rpcs.respond_to? :get_checkout_settings - @get_checkout_settings = ::Gapic::Config::Method.new get_checkout_settings_config - create_checkout_settings_config = parent_rpcs.create_checkout_settings if parent_rpcs.respond_to? :create_checkout_settings - @create_checkout_settings = ::Gapic::Config::Method.new create_checkout_settings_config - update_checkout_settings_config = parent_rpcs.update_checkout_settings if parent_rpcs.respond_to? :update_checkout_settings - @update_checkout_settings = ::Gapic::Config::Method.new update_checkout_settings_config - delete_checkout_settings_config = parent_rpcs.delete_checkout_settings if parent_rpcs.respond_to? :delete_checkout_settings - @delete_checkout_settings = ::Gapic::Config::Method.new delete_checkout_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest/service_stub.rb deleted file mode 100644 index ab727cfeab6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkout_settings_service/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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - module Rest - ## - # REST service stub for the CheckoutSettingsService 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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def get_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.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_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def create_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # A result object deserialized from the server's reply - def update_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_checkout_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_checkout_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_checkout_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest] - # 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_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/checkoutSettings", - body: "checkout_settings", - matches: [ - ["parent", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{checkout_settings.name}", - body: "checkout_settings", - matches: [ - ["checkout_settings.name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_checkout_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_checkout_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/checkoutSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb deleted file mode 100644 index 6d4141e47877..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/checkoutsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"_\n\x1aGetCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xc0\x01\n\x1d\x43reateCheckoutSettingsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/CheckoutSettings\x12Z\n\x11\x63heckout_settings\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\"\xb1\x01\n\x1dUpdateCheckoutSettingsRequest\x12Z\n\x11\x63heckout_settings\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.CheckoutSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteCheckoutSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/CheckoutSettings\"\xe5\t\n\x10\x43heckoutSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0curi_settings\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsH\x00\x88\x01\x01\x12U\n\x15\x65ligible_destinations\x18\x08 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x01\x12v\n\x10\x65nrollment_state\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12n\n\x0creview_state\x18\x04 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x16\x65\x66\x66\x65\x63tive_uri_settings\x18\x05 \x01(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.UriSettingsB\x03\xe0\x41\x03\x12\x80\x01\n\x1a\x65\x66\x66\x65\x63tive_enrollment_state\x18\x06 \x01(\x0e\x32R.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentStateB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12x\n\x16\x65\x66\x66\x65\x63tive_review_state\x18\x07 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\"o\n\x17\x43heckoutEnrollmentState\x12)\n%CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x45NROLLED\x10\x02\x12\r\n\tOPTED_OUT\x10\x03\"j\n\x13\x43heckoutReviewState\x12%\n!CHECKOUT_REVIEW_STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0f\n\x0b\x44ISAPPROVED\x10\x03:\x85\x01\xea\x41\x81\x01\n+merchantapi.googleapis.com/CheckoutSettings\x12\x36\x61\x63\x63ounts/{account}/programs/{program}/checkoutSettings*\x08settings2\x10\x63heckoutSettingsB\x0f\n\r_uri_settingsB\x13\n\x11_enrollment_stateB\x0f\n\r_review_stateB\x1d\n\x1b_effective_enrollment_stateB\x19\n\x17_effective_review_state\"[\n\x0bUriSettings\x12\x1f\n\x15\x63heckout_uri_template\x18\x01 \x01(\tH\x00\x12\x1b\n\x11\x63\x61rt_uri_template\x18\x02 \x01(\tH\x00\x42\x0e\n\x0curi_template2\xdc\x08\n\x17\x43heckoutSettingsService\x12\xe6\x01\n\x13GetCheckoutSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x12\x95\x02\n\x16\x43reateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"v\xda\x41\x18parent,checkout_settings\x82\xd3\xe4\x93\x02U\"@/accounts/v1beta/{parent=accounts/*/programs/*}/checkoutSettings:\x11\x63heckout_settings\x12\xab\x02\n\x16UpdateCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.CheckoutSettings\"\x8b\x01\xda\x41\x1d\x63heckout_settings,update_mask\x82\xd3\xe4\x93\x02\x65\x32P/accounts/v1beta/{checkout_settings.name=accounts/*/programs/*/checkoutSettings}:\x11\x63heckout_settings\x12\xc8\x01\n\x16\x44\x65leteCheckoutSettings\x12G.google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/accounts/v1beta/{name=accounts/*/programs/*/checkoutSettings}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x43heckoutsettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetCheckoutSettingsRequest").msgclass - CreateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateCheckoutSettingsRequest").msgclass - UpdateCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateCheckoutSettingsRequest").msgclass - DeleteCheckoutSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteCheckoutSettingsRequest").msgclass - CheckoutSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings").msgclass - CheckoutSettings::CheckoutEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutEnrollmentState").enummodule - CheckoutSettings::CheckoutReviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CheckoutSettings.CheckoutReviewState").enummodule - UriSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UriSettings").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb deleted file mode 100644 index bd81b765e3d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/checkoutsettings_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/checkoutsettings.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/checkoutsettings_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module CheckoutSettingsService - # Service for supporting [checkout - # settings](https://support.google.com/merchants/answer/13945960). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.CheckoutSettingsService' - - # Gets `CheckoutSettings` for the given merchant. This includes - # information about review state, enrollment state and URL settings. - rpc :GetCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Creates `CheckoutSettings` for the given merchant. - rpc :CreateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Updates `CheckoutSettings` for the given merchant. - rpc :UpdateCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings - # Deletes `CheckoutSettings` and unenrolls merchant from - # `Checkout` program. - rpc :DeleteCheckoutSettings, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb deleted file mode 100644 index c17c763ded0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/customerservice.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/type/phone_number_pb' - - -descriptor_data = "\n>google/shopping/merchant/accounts/v1beta/customerservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/type/phone_number.proto\"\x90\x01\n\x0f\x43ustomerService\x12\x15\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x05phone\x18\x03 \x01(\x0b\x32\x18.google.type.PhoneNumberB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_emailB\x08\n\x06_phoneB\x96\x01\n,com.google.shopping.merchant.accounts.v1betaB\x14\x43ustomerServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - CustomerService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CustomerService").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb deleted file mode 100644 index d06d098a05ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/client" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "email_preferences_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb deleted file mode 100644 index 6bb8c12c7625..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +++ /dev/null @@ -1,594 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - ## - # Client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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/shopping/merchant/accounts/v1beta/emailpreferences_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 - - @email_preferences_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :get_email_preferences, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.email_preferences&.name - header_params["email_preferences.name"] = request.email_preferences.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_email_preferences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.call_rpc :update_email_preferences, request, 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 EmailPreferencesService API. - # - # This class represents the configuration for EmailPreferencesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb deleted file mode 100644 index 720eb9a879d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Credentials for the EmailPreferencesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb deleted file mode 100644 index fd9c9497e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Path helper methods for the EmailPreferencesService API. - module Paths - ## - # Create a fully-qualified EmailPreferences resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}/emailPreferences` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def email_preferences_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}/emailPreferences" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb deleted file mode 100644 index b2676240e767..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/paths" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - module EmailPreferencesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb deleted file mode 100644 index 9e62fc5d7d5c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +++ /dev/null @@ -1,537 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST client for the EmailPreferencesService service. - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :email_preferences_service_stub - - ## - # Configure the EmailPreferencesService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EmailPreferencesService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EmailPreferencesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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 - @email_preferences_service_stub.universe_domain - end - - ## - # Create a new EmailPreferencesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EmailPreferencesService 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 - - @email_preferences_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @email_preferences_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 - @email_preferences_service_stub.logger - end - - # Service calls - - ## - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - # - # @overload get_email_preferences(request, options = nil) - # Pass arguments to `get_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_email_preferences(name: nil) - # Pass arguments to `get_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - # - # # Call the get_email_preferences method. - # result = client.get_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def get_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.get_email_preferences request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - # - # @overload update_email_preferences(request, options = nil) - # Pass arguments to `update_email_preferences` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_email_preferences(email_preferences: nil, update_mask: nil) - # Pass arguments to `update_email_preferences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param email_preferences [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences, ::Hash] - # Required. Email Preferences to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - # - # # Call the update_email_preferences method. - # result = client.update_email_preferences request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - # p result - # - def update_email_preferences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_email_preferences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_email_preferences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_email_preferences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @email_preferences_service_stub.update_email_preferences request, 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 EmailPreferencesService REST API. - # - # This class represents the configuration for EmailPreferencesService 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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_email_preferences.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 EmailPreferencesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :get_email_preferences - ## - # RPC-specific configuration for `update_email_preferences` - # @return [::Gapic::Config::Method] - # - attr_reader :update_email_preferences - - # @private - def initialize parent_rpcs = nil - get_email_preferences_config = parent_rpcs.get_email_preferences if parent_rpcs.respond_to? :get_email_preferences - @get_email_preferences = ::Gapic::Config::Method.new get_email_preferences_config - update_email_preferences_config = parent_rpcs.update_email_preferences if parent_rpcs.respond_to? :update_email_preferences - @update_email_preferences = ::Gapic::Config::Method.new update_email_preferences_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb deleted file mode 100644 index 9193d3947fc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - module Rest - ## - # REST service stub for the EmailPreferencesService 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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def get_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # A result object deserialized from the server's reply - def update_email_preferences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_email_preferences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_email_preferences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.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_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_email_preferences REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_email_preferences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{email_preferences.name}", - body: "email_preferences", - matches: [ - ["email_preferences.name", %r{^accounts/[^/]+/users/[^/]+/emailPreferences/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb deleted file mode 100644 index 37d52395e2bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/emailpreferences.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xed\x02\n\x10\x45mailPreferences\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x61\n\rnews_and_tips\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInStateB\x03\xe0\x41\x01\"X\n\nOptInState\x12\x1c\n\x18OPT_IN_STATE_UNSPECIFIED\x10\x00\x12\r\n\tOPTED_OUT\x10\x01\x12\x0c\n\x08OPTED_IN\x10\x02\x12\x0f\n\x0bUNCONFIRMED\x10\x03:\x88\x01\xea\x41\x84\x01\n+merchantapi.googleapis.com/EmailPreferences\x12\x31\x61\x63\x63ounts/{account}/users/{email}/emailPreferences*\x10\x65mailPreferences2\x10\x65mailPreferences\"_\n\x1aGetEmailPreferencesRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/EmailPreferences\"\xb1\x01\n\x1dUpdateEmailPreferencesRequest\x12Z\n\x11\x65mail_preferences\x18\x01 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.EmailPreferencesB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x32\xf3\x04\n\x17\x45mailPreferencesService\x12\xe3\x01\n\x13GetEmailPreferences\x12\x44.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/accounts/v1beta/{name=accounts/*/users/*/emailPreferences}\x12\xa8\x02\n\x16UpdateEmailPreferences\x12G.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest\x1a:.google.shopping.merchant.accounts.v1beta.EmailPreferences\"\x88\x01\xda\x41\x1d\x65mail_preferences,update_mask\x82\xd3\xe4\x93\x02\x62\x32M/accounts/v1beta/{email_preferences.name=accounts/*/users/*/emailPreferences}:\x11\x65mail_preferences\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x97\x01\n,com.google.shopping.merchant.accounts.v1betaB\x15\x45mailPreferencesProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences").msgclass - EmailPreferences::OptInState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState").enummodule - GetEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest").msgclass - UpdateEmailPreferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb deleted file mode 100644 index 4d4ab5d746e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/emailpreferences_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module EmailPreferencesService - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.EmailPreferencesService' - - # Returns the email preferences for a Merchant Center account user. - # - # Use the name=accounts/*/users/me/emailPreferences alias to get preferences - # for the authenticated user. - rpc :GetEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - # Updates the email preferences for a Merchant Center account user. MCA users - # should specify the MCA account rather than a sub-account of the MCA. - # - # Preferences which are not explicitly selected in the update mask will not - # be updated. - # - # It is invalid for updates to specify an UNCONFIRMED opt-in status value. - # - # Use the name=accounts/*/users/me/emailPreferences alias to update - # preferences - # for the authenticated user. - rpc :UpdateEmailPreferences, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb deleted file mode 100644 index cdcf6b1c5dfd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "gbp_accounts_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb deleted file mode 100644 index e66a0c58044a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +++ /dev/null @@ -1,600 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - ## - # Client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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/shopping/merchant/accounts/v1beta/gbpaccounts_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 - - @gbp_accounts_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :list_gbp_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.call_rpc :link_gbp_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the GbpAccountsService API. - # - # This class represents the configuration for GbpAccountsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb deleted file mode 100644 index 293bf2160f68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Credentials for the GbpAccountsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb deleted file mode 100644 index a10be9d7033a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # Path helper methods for the GbpAccountsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb deleted file mode 100644 index e9b645d1dcbe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - module GbpAccountsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb deleted file mode 100644 index e50f06e555cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +++ /dev/null @@ -1,543 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST client for the GbpAccountsService service. - # - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gbp_accounts_service_stub - - ## - # Configure the GbpAccountsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GbpAccountsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GbpAccountsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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 - @gbp_accounts_service_stub.universe_domain - end - - ## - # Create a new GbpAccountsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GbpAccountsService 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 - - @gbp_accounts_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gbp_accounts_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 - @gbp_accounts_service_stub.logger - end - - # Service calls - - ## - # List the GBP accounts for a given merchant. - # - # @overload list_gbp_accounts(request, options = nil) - # Pass arguments to `list_gbp_accounts` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_gbp_accounts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gbp_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @param page_size [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - # - # # Call the list_gbp_accounts method. - # result = client.list_gbp_accounts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - # p item - # end - # - def list_gbp_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_gbp_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_gbp_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gbp_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.list_gbp_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gbp_accounts_service_stub, :list_gbp_accounts, "gbp_accounts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a GBP account for all countries. - # - # @overload link_gbp_account(request, options = nil) - # Pass arguments to `link_gbp_account` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_gbp_account(parent: nil, gbp_email: nil) - # Pass arguments to `link_gbp_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @param gbp_email [::String] - # Required. The email address of the Business Profile account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - # - # # Call the link_gbp_account method. - # result = client.link_gbp_account request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - # p result - # - def link_gbp_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_gbp_account.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_gbp_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_gbp_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gbp_accounts_service_stub.link_gbp_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the GbpAccountsService REST API. - # - # This class represents the configuration for GbpAccountsService 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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_gbp_accounts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 GbpAccountsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_gbp_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gbp_accounts - ## - # RPC-specific configuration for `link_gbp_account` - # @return [::Gapic::Config::Method] - # - attr_reader :link_gbp_account - - # @private - def initialize parent_rpcs = nil - list_gbp_accounts_config = parent_rpcs.list_gbp_accounts if parent_rpcs.respond_to? :list_gbp_accounts - @list_gbp_accounts = ::Gapic::Config::Method.new list_gbp_accounts_config - link_gbp_account_config = parent_rpcs.link_gbp_account if parent_rpcs.respond_to? :link_gbp_account - @link_gbp_account = ::Gapic::Config::Method.new link_gbp_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb deleted file mode 100644 index d969d96d14e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - module Rest - ## - # REST service stub for the GbpAccountsService 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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse] - # A result object deserialized from the server's reply - def list_gbp_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gbp_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_gbp_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse] - # A result object deserialized from the server's reply - def link_gbp_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_gbp_account_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_gbp_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.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_gbp_accounts REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_gbp_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_gbp_account REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_gbp_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/gbpAccounts:linkGbpAccount", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb deleted file mode 100644 index ccccc7e7699e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n:google/shopping/merchant/accounts/v1beta/gbpaccounts.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x02\n\nGbpAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x0egbp_account_id\x18\x02 \x01(\t\x12G\n\x04type\x18\x03 \x01(\x0e\x32\x39.google.shopping.merchant.accounts.v1beta.GbpAccount.Type\x12\x18\n\x10gbp_account_name\x18\x05 \x01(\t\x12\x15\n\rlisting_count\x18\x06 \x01(\x03\"<\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x14\n\x10\x42USINESS_ACCOUNT\x10\x02:q\xea\x41n\n%merchantapi.googleapis.com/GbpAccount\x12,accounts/{account}/gbpAccounts/{gbp_account}*\x0bgbpAccounts2\ngbpAccount\"\x85\x01\n\x16ListGbpAccountsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListGbpAccountsResponse\x12J\n\x0cgbp_accounts\x18\x01 \x03(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.GbpAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x15LinkGbpAccountRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tgbp_email\x18\x02 \x01(\tB\x03\xe0\x41\x02\"B\n\x16LinkGbpAccountResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xa4\x04\n\x12GbpAccountsService\x12\xd9\x01\n\x0fListGbpAccounts\x12@.google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/accounts/v1beta/{parent=accounts/*}/gbpAccounts\x12\xe8\x01\n\x0eLinkGbpAccount\x12?.google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest\x1a@.google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\"?/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x92\x01\n,com.google.shopping.merchant.accounts.v1betaB\x10GbpAccountsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GbpAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount").msgclass - GbpAccount::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GbpAccount.Type").enummodule - ListGbpAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsRequest").msgclass - ListGbpAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListGbpAccountsResponse").msgclass - LinkGbpAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountRequest").msgclass - LinkGbpAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkGbpAccountResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb deleted file mode 100644 index 2e204bc48d59..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/gbpaccounts.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/gbpaccounts_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module GbpAccountsService - # The service facilitates the management of a merchant's Google Business - # Profile (GBP) account settings. This API defines the following resource - # model: - # - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.GbpAccountsService' - - # List the GBP accounts for a given merchant. - rpc :ListGbpAccounts, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse - # Link the specified merchant to a GBP account for all countries. - rpc :LinkGbpAccount, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb deleted file mode 100644 index 9c3fea67be84..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/homepage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/homepage.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xae\x01\n\x08Homepage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07\x63laimed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03:Z\xea\x41W\n#merchantapi.googleapis.com/Homepage\x12\x1b\x61\x63\x63ounts/{account}/homepage*\thomepages2\x08homepageB\x06\n\x04_uri\"O\n\x12GetHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"\x98\x01\n\x15UpdateHomepageRequest\x12I\n\x08homepage\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.HomepageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Q\n\x14\x43laimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage\"S\n\x16UnclaimHomepageRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/Homepage2\x8d\x07\n\x0fHomepageService\x12\xbb\x01\n\x0bGetHomepage\x12<.google.shopping.merchant.accounts.v1beta.GetHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/accounts/v1beta/{name=accounts/*/homepage}\x12\xe4\x01\n\x0eUpdateHomepage\x12?.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"]\xda\x41\x14homepage,update_mask\x82\xd3\xe4\x93\x02@24/accounts/v1beta/{homepage.name=accounts/*/homepage}:\x08homepage\x12\xc1\x01\n\rClaimHomepage\x12>.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\"<\x82\xd3\xe4\x93\x02\x36\"1/accounts/v1beta/{name=accounts/*/homepage}:claim:\x01*\x12\xc7\x01\n\x0fUnclaimHomepage\x12@.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest\x1a\x32.google.shopping.merchant.accounts.v1beta.Homepage\">\x82\xd3\xe4\x93\x02\x38\"3/accounts/v1beta/{name=accounts/*/homepage}:unclaim:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rHomepageProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Homepage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Homepage").msgclass - GetHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetHomepageRequest").msgclass - UpdateHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest").msgclass - ClaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest").msgclass - UnclaimHomepageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb deleted file mode 100644 index d3c47366408e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/client" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "homepage_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb deleted file mode 100644 index 79e2601a3950..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +++ /dev/null @@ -1,777 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - ## - # Client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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/shopping/merchant/accounts/v1beta/homepage_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 - - @homepage_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :get_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.homepage&.name - header_params["homepage.name"] = request.homepage.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :update_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :claim_homepage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.call_rpc :unclaim_homepage, request, 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 HomepageService API. - # - # This class represents the configuration for HomepageService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb deleted file mode 100644 index cd945b510c57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Credentials for the HomepageService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb deleted file mode 100644 index 58d7b7105437..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Path helper methods for the HomepageService API. - module Paths - ## - # Create a fully-qualified Homepage resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/homepage` - # - # @param account [String] - # - # @return [::String] - def homepage_path account: - "accounts/#{account}/homepage" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb deleted file mode 100644 index 87039ee3847c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/homepage_service/credentials" -require "google/shopping/merchant/accounts/v1beta/homepage_service/paths" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support an API for a store's homepage. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - module HomepageService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb deleted file mode 100644 index 5c6975a7e0d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +++ /dev/null @@ -1,706 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST client for the HomepageService service. - # - # Service to support an API for a store's homepage. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :homepage_service_stub - - ## - # Configure the HomepageService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all HomepageService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the HomepageService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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 - @homepage_service_stub.universe_domain - end - - ## - # Create a new HomepageService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the HomepageService 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 - - @homepage_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @homepage_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 - @homepage_service_stub.logger - end - - # Service calls - - ## - # Retrieves a store's homepage. - # - # @overload get_homepage(request, options = nil) - # Pass arguments to `get_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_homepage(name: nil) - # Pass arguments to `get_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - # - # # Call the get_homepage method. - # result = client.get_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def get_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.get_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a store's homepage. Executing this method requires admin access. - # - # @overload update_homepage(request, options = nil) - # Pass arguments to `update_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_homepage(homepage: nil, update_mask: nil) - # Pass arguments to `update_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param homepage [::Google::Shopping::Merchant::Accounts::V1beta::Homepage, ::Hash] - # Required. The new version of the homepage. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - # - # # Call the update_homepage method. - # result = client.update_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def update_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.update_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - # - # @overload claim_homepage(request, options = nil) - # Pass arguments to `claim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload claim_homepage(name: nil) - # Pass arguments to `claim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - # - # # Call the claim_homepage method. - # result = client.claim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def claim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.claim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.claim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.claim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.claim_homepage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unclaims a store's homepage. Executing this method requires admin access. - # - # @overload unclaim_homepage(request, options = nil) - # Pass arguments to `unclaim_homepage` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unclaim_homepage(name: nil) - # Pass arguments to `unclaim_homepage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - # - # # Call the unclaim_homepage method. - # result = client.unclaim_homepage request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - # p result - # - def unclaim_homepage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unclaim_homepage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.unclaim_homepage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unclaim_homepage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @homepage_service_stub.unclaim_homepage request, 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 HomepageService REST API. - # - # This class represents the configuration for HomepageService 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::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_homepage.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 HomepageService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :get_homepage - ## - # RPC-specific configuration for `update_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :update_homepage - ## - # RPC-specific configuration for `claim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :claim_homepage - ## - # RPC-specific configuration for `unclaim_homepage` - # @return [::Gapic::Config::Method] - # - attr_reader :unclaim_homepage - - # @private - def initialize parent_rpcs = nil - get_homepage_config = parent_rpcs.get_homepage if parent_rpcs.respond_to? :get_homepage - @get_homepage = ::Gapic::Config::Method.new get_homepage_config - update_homepage_config = parent_rpcs.update_homepage if parent_rpcs.respond_to? :update_homepage - @update_homepage = ::Gapic::Config::Method.new update_homepage_config - claim_homepage_config = parent_rpcs.claim_homepage if parent_rpcs.respond_to? :claim_homepage - @claim_homepage = ::Gapic::Config::Method.new claim_homepage_config - unclaim_homepage_config = parent_rpcs.unclaim_homepage if parent_rpcs.respond_to? :unclaim_homepage - @unclaim_homepage = ::Gapic::Config::Method.new unclaim_homepage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb deleted file mode 100644 index 9c3d3c797d7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - module Rest - ## - # REST service stub for the HomepageService 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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def get_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def update_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def claim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_claim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "claim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # A result object deserialized from the server's reply - def unclaim_homepage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unclaim_homepage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unclaim_homepage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.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_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{homepage.name}", - body: "homepage", - matches: [ - ["homepage.name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the claim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_claim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:claim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unclaim_homepage REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unclaim_homepage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:unclaim", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/homepage/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb deleted file mode 100644 index 9767309ba008..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/homepage.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/homepage_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module HomepageService - # Service to support an API for a store's homepage. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.HomepageService' - - # Retrieves a store's homepage. - rpc :GetHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Updates a store's homepage. Executing this method requires admin access. - rpc :UpdateHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Claims a store's homepage. Executing this method requires admin access. - # - # If the homepage is already claimed, this will recheck the - # verification (unless the merchant is exempted from claiming, which also - # exempts from verification) and return a successful response. If ownership - # can no longer be verified, it will return an error, but it won't clear the - # claim. In case of failure, a canonical error message will be returned: - # * PERMISSION_DENIED: user doesn't have the necessary permissions on this - # MC account; - # * FAILED_PRECONDITION: - # - The account is not a Merchant Center account; - # - MC account doesn't have a homepage; - # - claiming failed (in this case the error message will contain more - # details). - rpc :ClaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - # Unclaims a store's homepage. Executing this method requires admin access. - rpc :UnclaimHomepage, ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Homepage - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb deleted file mode 100644 index 058cc57bb288..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/client" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_providers_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb deleted file mode 100644 index 5b337c8254dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - ## - # Client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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/shopping/merchant/accounts/v1beta/lfpproviders_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 - - @lfp_providers_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, - metadata: metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, 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 LfpProvidersService API. - # - # This class represents the configuration for LfpProvidersService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb deleted file mode 100644 index 4e45d13facbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Credentials for the LfpProvidersService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb deleted file mode 100644 index 668327ff63dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # Path helper methods for the LfpProvidersService API. - module Paths - ## - # Create a fully-qualified LfpProvider resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # - # @param account [String] - # @param omnichannel_setting [String] - # @param lfp_provider [String] - # - # @return [::String] - def lfp_provider_path account:, omnichannel_setting:, lfp_provider: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "omnichannel_setting cannot contain /" if omnichannel_setting.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}/lfpProviders/#{lfp_provider}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb deleted file mode 100644 index 501c902dee0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - module LfpProvidersService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb deleted file mode 100644 index 6a4e33bf15c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +++ /dev/null @@ -1,546 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST client for the LfpProvidersService service. - # - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_providers_service_stub - - ## - # Configure the LfpProvidersService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpProvidersService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpProvidersService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - @lfp_providers_service_stub.universe_domain - end - - ## - # Create a new LfpProvidersService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpProvidersService 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 - - @lfp_providers_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lfp_providers_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 - @lfp_providers_service_stub.logger - end - - # Service calls - - ## - # Find the LFP provider candidates in a given country. - # - # @overload find_lfp_providers(request, options = nil) - # Pass arguments to `find_lfp_providers` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - # - # # Call the find_lfp_providers method. - # result = client.find_lfp_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - # p item - # end - # - def find_lfp_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.find_lfp_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.find_lfp_providers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.find_lfp_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.find_lfp_providers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, "lfp_providers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Link the specified merchant to a LFP provider for the specified country. - # - # @overload link_lfp_provider(request, options = nil) - # Pass arguments to `link_lfp_provider` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload link_lfp_provider(name: nil, external_account_id: nil) - # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @param external_account_id [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - # - # # Call the link_lfp_provider method. - # result = client.link_lfp_provider request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - # p result - # - def link_lfp_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.link_lfp_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.link_lfp_provider.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.link_lfp_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_providers_service_stub.link_lfp_provider request, 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 LfpProvidersService REST API. - # - # This class represents the configuration for LfpProvidersService 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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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 - # # find_lfp_providers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.find_lfp_providers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 LfpProvidersService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `find_lfp_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :find_lfp_providers - ## - # RPC-specific configuration for `link_lfp_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :link_lfp_provider - - # @private - def initialize parent_rpcs = nil - find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers - @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config - link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider - @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb deleted file mode 100644 index 490af09ca942..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - module Rest - ## - # REST service stub for the LfpProvidersService 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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse] - # A result object deserialized from the server's reply - def find_lfp_providers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_find_lfp_providers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "find_lfp_providers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse] - # A result object deserialized from the server's reply - def link_lfp_provider request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_link_lfp_provider_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "link_lfp_provider", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.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 find_lfp_providers REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_find_lfp_providers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/lfpProviders:find", - matches: [ - ["parent", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the link_lfp_provider REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_link_lfp_provider_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:linkLfpProvider", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/lfpProviders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb deleted file mode 100644 index 672686b1abaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n;google/shopping/merchant/accounts/v1beta/lfpproviders.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xf4\x01\n\x0bLfpProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bregion_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n&merchantapi.googleapis.com/LfpProvider\x12Xaccounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}*\x0clfpProviders2\x0blfpProvider\"\x91\x01\n\x17\x46indLfpProvidersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-merchantapi.googleapis.com/OmnichannelSetting\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\"\x81\x01\n\x18\x46indLfpProvidersResponse\x12L\n\rlfp_providers\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.LfpProvider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x16LinkLfpProviderRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&merchantapi.googleapis.com/LfpProvider\x12 \n\x13\x65xternal_account_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"C\n\x17LinkLfpProviderResponse\x12(\n\x08response\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Empty2\xdd\x04\n\x13LfpProvidersService\x12\xf8\x01\n\x10\x46indLfpProviders\x12\x41.google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest\x1a\x42.google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find\x12\x81\x02\n\x0fLinkLfpProvider\x12@.google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest\x1a\x41.google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\"W/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x01\n,com.google.shopping.merchant.accounts.v1betaB\x11LfpProvidersProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - LfpProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LfpProvider").msgclass - FindLfpProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersRequest").msgclass - FindLfpProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.FindLfpProvidersResponse").msgclass - LinkLfpProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderRequest").msgclass - LinkLfpProviderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.LinkLfpProviderResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb deleted file mode 100644 index f8deaf08100e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/lfpproviders.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/lfpproviders_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module LfpProvidersService - # The service facilitates the management of a merchant's LFP provider settings. - # This API defines the following resource model: - # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.LfpProvidersService' - - # Find the LFP provider candidates in a given country. - rpc :FindLfpProviders, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse - # Link the specified merchant to a LFP provider for the specified country. - rpc :LinkLfpProvider, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb deleted file mode 100644 index a05a5462fd00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "omnichannel_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb deleted file mode 100644 index 50ace30f1702..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +++ /dev/null @@ -1,894 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - ## - # Client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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/shopping/merchant/accounts/v1beta/omnichannelsettings_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 - - @omnichannel_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :get_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :list_omnichannel_settings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :create_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.omnichannel_setting&.name - header_params["omnichannel_setting.name"] = request.omnichannel_setting.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_omnichannel_setting.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :update_omnichannel_setting, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, - metadata: metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.call_rpc :request_inventory_verification, request, 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 OmnichannelSettingsService API. - # - # This class represents the configuration for OmnichannelSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb deleted file mode 100644 index b68c12fb3003..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Credentials for the OmnichannelSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb deleted file mode 100644 index e50d1ca4f146..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - # Path helper methods for the OmnichannelSettingsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OmnichannelSetting resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # - # @param account [String] - # @param omnichannel_setting [String] - # - # @return [::String] - def omnichannel_setting_path account:, omnichannel_setting: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/omnichannelSettings/#{omnichannel_setting}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb deleted file mode 100644 index 263f2eb40bce..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - module OmnichannelSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb deleted file mode 100644 index 072ffc5c5e3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +++ /dev/null @@ -1,816 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST client for the OmnichannelSettingsService service. - # - # The service facilitates the management of a merchant's omnichannel settings. - # ## This API defines the following resource model: - # - # [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :omnichannel_settings_service_stub - - ## - # Configure the OmnichannelSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OmnichannelSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OmnichannelSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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 - @omnichannel_settings_service_stub.universe_domain - end - - ## - # Create a new OmnichannelSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OmnichannelSettingsService 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 - - @omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @omnichannel_settings_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 - @omnichannel_settings_service_stub.logger - end - - # Service calls - - ## - # Get the omnichannel settings for a given merchant. - # - # @overload get_omnichannel_setting(request, options = nil) - # Pass arguments to `get_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_omnichannel_setting(name: nil) - # Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - # - # # Call the get_omnichannel_setting method. - # result = client.get_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def get_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all the omnichannel settings for a given merchant. - # - # @overload list_omnichannel_settings(request, options = nil) - # Pass arguments to `list_omnichannel_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - # - # # Call the list_omnichannel_settings method. - # result = client.list_omnichannel_settings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p item - # end - # - def list_omnichannel_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create the omnichannel settings for a given merchant. - # - # @overload create_omnichannel_setting(request, options = nil) - # Pass arguments to `create_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil) - # Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - # - # # Call the create_omnichannel_setting method. - # result = client.create_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def create_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest - - # Converts hash and nil to an 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_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the omnichannel setting for a given merchant in a given country. - # - # @overload update_omnichannel_setting(request, options = nil) - # Pass arguments to `update_omnichannel_setting` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil) - # Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - # - # # Call the update_omnichannel_setting method. - # result = client.update_omnichannel_setting request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - # p result - # - def update_omnichannel_setting request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_omnichannel_setting.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Requests inventory verification for a given merchant in a given country. - # - # @overload request_inventory_verification(request, options = nil) - # Pass arguments to `request_inventory_verification` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload request_inventory_verification(name: nil) - # Pass arguments to `request_inventory_verification` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - # - # # Call the request_inventory_verification method. - # result = client.request_inventory_verification request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - # p result - # - def request_inventory_verification request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.request_inventory_verification.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.request_inventory_verification.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @omnichannel_settings_service_stub.request_inventory_verification request, 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 OmnichannelSettingsService REST API. - # - # This class represents the configuration for OmnichannelSettingsService 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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_omnichannel_setting.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OmnichannelSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :get_omnichannel_setting - ## - # RPC-specific configuration for `list_omnichannel_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_omnichannel_settings - ## - # RPC-specific configuration for `create_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :create_omnichannel_setting - ## - # RPC-specific configuration for `update_omnichannel_setting` - # @return [::Gapic::Config::Method] - # - attr_reader :update_omnichannel_setting - ## - # RPC-specific configuration for `request_inventory_verification` - # @return [::Gapic::Config::Method] - # - attr_reader :request_inventory_verification - - # @private - def initialize parent_rpcs = nil - get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting - @get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config - list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings - @list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config - create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting - @create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config - update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting - @update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config - request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification - @request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb deleted file mode 100644 index 6ceefbcd5ee9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OmnichannelSettingsService - module Rest - ## - # REST service stub for the OmnichannelSettingsService 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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def get_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse] - # A result object deserialized from the server's reply - def list_omnichannel_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_omnichannel_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_omnichannel_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def create_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # A result object deserialized from the server's reply - def update_omnichannel_setting request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_omnichannel_setting_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_omnichannel_setting", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse] - # A result object deserialized from the server's reply - def request_inventory_verification request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_request_inventory_verification_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "request_inventory_verification", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.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_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_omnichannel_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_omnichannel_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest] - # 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_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/omnichannelSettings", - body: "omnichannel_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_omnichannel_setting REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_omnichannel_setting_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{omnichannel_setting.name}", - body: "omnichannel_setting", - matches: [ - ["omnichannel_setting.name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the request_inventory_verification REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_request_inventory_verification_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:requestInventoryVerification", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/omnichannelSettings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb deleted file mode 100644 index 7c74b858526a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/omnichannelsettings.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nBgoogle/shopping/merchant/accounts/v1beta/omnichannelsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xe3\x06\n\x12OmnichannelSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0bregion_code\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x08lsf_type\x18\x0c \x01(\x0e\x32\x44.google.shopping.merchant.accounts.v1beta.OmnichannelSetting.LsfTypeB\x03\xe0\x41\x02\x12H\n\x08in_stock\x18\r \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.InStockB\x03\xe0\x41\x01\x12\x45\n\x06pickup\x18\x0e \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.PickupB\x03\xe0\x41\x01\x12H\n\x08lfp_link\x18\x05 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.LfpLinkB\x03\xe0\x41\x03\x12L\n\x03odo\x18\x06 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.OnDisplayToOrderB\x03\xe0\x41\x01\x12\x43\n\x05\x61\x62out\x18\x07 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.AboutB\x03\xe0\x41\x01\x12\x64\n\x16inventory_verification\x18\x08 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.InventoryVerificationB\x03\xe0\x41\x01\"O\n\x07LsfType\x12\x18\n\x14LSF_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05GHLSF\x10\x01\x12\x0f\n\x0bMHLSF_BASIC\x10\x02\x12\x0e\n\nMHLSF_FULL\x10\x03:\x9a\x01\xea\x41\x96\x01\n-merchantapi.googleapis.com/OmnichannelSetting\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :list_online_return_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :create_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.online_return_policy&.name - header_params["online_return_policy.name"] = request.online_return_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :update_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.call_rpc :delete_online_return_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the OnlineReturnPolicyService API. - # - # This class represents the configuration for OnlineReturnPolicyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb deleted file mode 100644 index 65cce8eedd0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Credentials for the OnlineReturnPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb deleted file mode 100644 index 99da2a7379d2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # Path helper methods for the OnlineReturnPolicyService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified OnlineReturnPolicy resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/onlineReturnPolicies/{return_policy}` - # - # @param account [String] - # @param return_policy [String] - # - # @return [::String] - def online_return_policy_path account:, return_policy: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/onlineReturnPolicies/#{return_policy}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb deleted file mode 100644 index aae7187d3bc3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - module OnlineReturnPolicyService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb deleted file mode 100644 index 444f346f95aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +++ /dev/null @@ -1,821 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST client for the OnlineReturnPolicyService service. - # - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :online_return_policy_service_stub - - ## - # Configure the OnlineReturnPolicyService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OnlineReturnPolicyService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OnlineReturnPolicyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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 - @online_return_policy_service_stub.universe_domain - end - - ## - # Create a new OnlineReturnPolicyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OnlineReturnPolicyService 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 - - @online_return_policy_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @online_return_policy_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @online_return_policy_service_stub.logger - end - - # Service calls - - ## - # Gets an existing return policy for a given merchant. - # - # @overload get_online_return_policy(request, options = nil) - # Pass arguments to `get_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_online_return_policy(name: nil) - # Pass arguments to `get_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - # - # # Call the get_online_return_policy method. - # result = client.get_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def get_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.get_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all existing return policies for a given merchant. - # - # @overload list_online_return_policies(request, options = nil) - # Pass arguments to `list_online_return_policies` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_online_return_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_online_return_policies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - # - # # Call the list_online_return_policies method. - # result = client.list_online_return_policies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p item - # end - # - def list_online_return_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_online_return_policies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_online_return_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.list_online_return_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @online_return_policy_service_stub, :list_online_return_policies, "online_return_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new return policy for a given merchant. - # - # @overload create_online_return_policy(request, options = nil) - # Pass arguments to `create_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_online_return_policy(parent: nil, online_return_policy: nil) - # Pass arguments to `create_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The return policy object to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - # - # # Call the create_online_return_policy method. - # result = client.create_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def create_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest - - # Converts hash and nil to an 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_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.create_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing return policy for a given merchant. - # - # @overload update_online_return_policy(request, options = nil) - # Pass arguments to `update_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_online_return_policy(online_return_policy: nil, update_mask: nil) - # Pass arguments to `update_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - # - # # Call the update_online_return_policy method. - # result = client.update_online_return_policy request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - # p result - # - def update_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.update_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing return policy. - # - # @overload delete_online_return_policy(request, options = nil) - # Pass arguments to `delete_online_return_policy` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_online_return_policy(name: nil) - # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - # - # # Call the delete_online_return_policy method. - # result = client.delete_online_return_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_online_return_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_online_return_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_online_return_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_online_return_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @online_return_policy_service_stub.delete_online_return_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the OnlineReturnPolicyService REST API. - # - # This class represents the configuration for OnlineReturnPolicyService 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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_online_return_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 OnlineReturnPolicyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_online_return_policy - ## - # RPC-specific configuration for `list_online_return_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_online_return_policies - ## - # RPC-specific configuration for `create_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_online_return_policy - ## - # RPC-specific configuration for `update_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_online_return_policy - ## - # RPC-specific configuration for `delete_online_return_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_online_return_policy - - # @private - def initialize parent_rpcs = nil - get_online_return_policy_config = parent_rpcs.get_online_return_policy if parent_rpcs.respond_to? :get_online_return_policy - @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config - list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies - @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config - create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy - @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config - update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy - @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config - delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy - @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb deleted file mode 100644 index dedd98287a41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - module Rest - ## - # REST service stub for the OnlineReturnPolicyService 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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def get_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse] - # A result object deserialized from the server's reply - def list_online_return_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_online_return_policies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_online_return_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.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_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def create_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # A result object deserialized from the server's reply - def update_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_online_return_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_online_return_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_online_return_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_online_return_policies REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_online_return_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest] - # 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_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies", - body: "online_return_policy", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{online_return_policy.name}", - body: "online_return_policy", - matches: [ - ["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_online_return_policy REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_online_return_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb deleted file mode 100644 index 0fe2ffb749d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/online_return_policy_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module OnlineReturnPolicyService - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy) - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService' - - # Gets an existing return policy for a given merchant. - rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Lists all existing return policies for a given merchant. - rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse - # Creates a new return policy for a given merchant. - rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Updates an existing return policy for a given merchant. - rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy - # Deletes an existing return policy. - rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb deleted file mode 100644 index 54a151690147..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto - -require 'google/protobuf' - - -descriptor_data = "\nEgoogle/shopping/merchant/accounts/v1beta/phoneverificationstate.proto\x12(google.shopping.merchant.accounts.v1beta*\x92\x01\n\x16PhoneVerificationState\x12(\n$PHONE_VERIFICATION_STATE_UNSPECIFIED\x10\x00\x12%\n!PHONE_VERIFICATION_STATE_VERIFIED\x10\x01\x12\'\n#PHONE_VERIFICATION_STATE_UNVERIFIED\x10\x02\x42\x9d\x01\n,com.google.shopping.merchant.accounts.v1betaB\x1bPhoneVerificationStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - PhoneVerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.PhoneVerificationState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb deleted file mode 100644 index b4a19137e869..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/programs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n7google/shopping/merchant/accounts/v1beta/programs.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x04\n\x07Program\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12K\n\x05state\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Program.StateB\x03\xe0\x41\x03\x12 \n\x13\x61\x63tive_region_codes\x18\x04 \x03(\tB\x03\xe0\x41\x03\x12^\n\x12unmet_requirements\x18\x05 \x03(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Program.RequirementB\x03\xe0\x41\x03\x1a\x65\n\x0bRequirement\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11\x64ocumentation_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x61\x66\x66\x65\x63ted_region_codes\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_ELIGIBLE\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03:a\xea\x41^\n\"merchantapi.googleapis.com/Program\x12%accounts/{account}/programs/{program}*\x08programs2\x07program\"M\n\x11GetProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"\x82\x01\n\x13ListProgramsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Program\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\"t\n\x14ListProgramsResponse\x12\x43\n\x08programs\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.Program\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x14\x45nableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program\"Q\n\x15\x44isableProgramRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Program2\x84\x07\n\x0fProgramsService\x12\xba\x01\n\nGetProgram\x12;.google.shopping.merchant.accounts.v1beta.GetProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{name=accounts/*/programs/*}\x12\xcd\x01\n\x0cListPrograms\x12=.google.shopping.merchant.accounts.v1beta.ListProgramsRequest\x1a>.google.shopping.merchant.accounts.v1beta.ListProgramsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/accounts/v1beta/{parent=accounts/*}/programs\x12\xca\x01\n\rEnableProgram\x12>.google.shopping.merchant.accounts.v1beta.EnableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1beta/{name=accounts/*/programs/*}:enable:\x01*\x12\xcd\x01\n\x0e\x44isableProgram\x12?.google.shopping.merchant.accounts.v1beta.DisableProgramRequest\x1a\x31.google.shopping.merchant.accounts.v1beta.Program\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/accounts/v1beta/{name=accounts/*/programs/*}:disable:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8f\x01\n,com.google.shopping.merchant.accounts.v1betaB\rProgramsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - Program = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program").msgclass - Program::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.Requirement").msgclass - Program::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Program.State").enummodule - GetProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetProgramRequest").msgclass - ListProgramsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsRequest").msgclass - ListProgramsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListProgramsResponse").msgclass - EnableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.EnableProgramRequest").msgclass - DisableProgramRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DisableProgramRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb deleted file mode 100644 index 5c31844c5c2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/client" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "programs_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb deleted file mode 100644 index 361868712e90..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +++ /dev/null @@ -1,788 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - ## - # Client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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/shopping/merchant/accounts/v1beta/programs_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 - - @programs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :get_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :list_programs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @programs_service_stub, :list_programs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :enable_program, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.call_rpc :disable_program, request, 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 ProgramsService API. - # - # This class represents the configuration for ProgramsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb deleted file mode 100644 index 2935731c5fc6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Credentials for the ProgramsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb deleted file mode 100644 index 3b9b815133bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Path helper methods for the ProgramsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Program resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/programs/{program}` - # - # @param account [String] - # @param program [String] - # - # @return [::String] - def program_path account:, program: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/programs/#{program}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb deleted file mode 100644 index ffbd61628a98..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.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" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/programs_service/credentials" -require "google/shopping/merchant/accounts/v1beta/programs_service/paths" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - module ProgramsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb deleted file mode 100644 index 13115347e581..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +++ /dev/null @@ -1,717 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST client for the ProgramsService service. - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :programs_service_stub - - ## - # Configure the ProgramsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProgramsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProgramsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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 - @programs_service_stub.universe_domain - end - - ## - # Create a new ProgramsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProgramsService 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 - - @programs_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @programs_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 - @programs_service_stub.logger - end - - # Service calls - - ## - # Retrieves the specified program for the account. - # - # @overload get_program(request, options = nil) - # Pass arguments to `get_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_program(name: nil) - # Pass arguments to `get_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - # - # # Call the get_program method. - # result = client.get_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def get_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.get_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves all programs for the account. - # - # @overload list_programs(request, options = nil) - # Pass arguments to `list_programs` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_programs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_programs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 account for which to retrieve all programs. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - # - # # Call the list_programs method. - # result = client.list_programs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - # p item - # end - # - def list_programs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_programs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_programs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_programs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.list_programs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @programs_service_stub, :list_programs, "programs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload enable_program(request, options = nil) - # Pass arguments to `enable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_program(name: nil) - # Pass arguments to `enable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - # - # # Call the enable_program method. - # result = client.enable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def enable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.enable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.enable_program request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - # - # @overload disable_program(request, options = nil) - # Pass arguments to `disable_program` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_program(name: nil) - # Pass arguments to `disable_program` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - # - # # Call the disable_program method. - # result = client.disable_program request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - # p result - # - def disable_program request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_program.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.disable_program.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_program.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @programs_service_stub.disable_program request, 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 ProgramsService REST API. - # - # This class represents the configuration for ProgramsService 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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_program.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ProgramsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_program` - # @return [::Gapic::Config::Method] - # - attr_reader :get_program - ## - # RPC-specific configuration for `list_programs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_programs - ## - # RPC-specific configuration for `enable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_program - ## - # RPC-specific configuration for `disable_program` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_program - - # @private - def initialize parent_rpcs = nil - get_program_config = parent_rpcs.get_program if parent_rpcs.respond_to? :get_program - @get_program = ::Gapic::Config::Method.new get_program_config - list_programs_config = parent_rpcs.list_programs if parent_rpcs.respond_to? :list_programs - @list_programs = ::Gapic::Config::Method.new list_programs_config - enable_program_config = parent_rpcs.enable_program if parent_rpcs.respond_to? :enable_program - @enable_program = ::Gapic::Config::Method.new enable_program_config - disable_program_config = parent_rpcs.disable_program if parent_rpcs.respond_to? :disable_program - @disable_program = ::Gapic::Config::Method.new disable_program_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb deleted file mode 100644 index bb7144364d14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_service/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/shopping/merchant/accounts/v1beta/programs_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - module Rest - ## - # REST service stub for the ProgramsService 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_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def get_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse] - # A result object deserialized from the server's reply - def list_programs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_programs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def enable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program] - # A result object deserialized from the server's reply - def disable_program request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_program", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.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_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_programs REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_programs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/programs", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:enable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_program REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_program_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{name}:disable", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb deleted file mode 100644 index 8282a0f080fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/programs_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ProgramsService - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService' - - # Retrieves the specified program for the account. - rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Retrieves all programs for the account. - rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse - # Enable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - # Disable participation in the specified program for the account. Executing - # this method requires admin access. - rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb deleted file mode 100644 index 012299b8a9d6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/regions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"q\n\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass - CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass - UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass - DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass - ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass - ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass - Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass - Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass - Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass - Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb deleted file mode 100644 index a6f7d439e86b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/client" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regions_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb deleted file mode 100644 index a240185dfa7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +++ /dev/null @@ -1,888 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - ## - # Client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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/shopping/merchant/accounts/v1beta/regions_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 - - @regions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :get_region, request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :create_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.region&.name - header_params["region.name"] = request.region.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :update_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :delete_region, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, request, response, 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 RegionsService API. - # - # This class represents the configuration for RegionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb deleted file mode 100644 index 536fce1bdfaf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Credentials for the RegionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb deleted file mode 100644 index b6f5e812e70d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Path helper methods for the RegionsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified Region resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/regions/{region}` - # - # @param account [String] - # @param region [String] - # - # @return [::String] - def region_path account:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/regions/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb deleted file mode 100644 index f359bf4bc293..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/regions_service/credentials" -require "google/shopping/merchant/accounts/v1beta/regions_service/paths" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - module RegionsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb deleted file mode 100644 index 2068a53a1b70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +++ /dev/null @@ -1,810 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST client for the RegionsService service. - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regions_service_stub - - ## - # Configure the RegionsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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 - @regions_service_stub.universe_domain - end - - ## - # Create a new RegionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionsService 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 - - @regions_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @regions_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 - @regions_service_stub.logger - end - - # Service calls - - ## - # Retrieves a region defined in your Merchant Center account. - # - # @overload get_region(request, options = nil) - # Pass arguments to `get_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_region(name: nil) - # Pass arguments to `get_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - # - # # Call the get_region method. - # result = client.get_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def get_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.get_region request, 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 region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload create_region(request, options = nil) - # Pass arguments to `create_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_region(parent: nil, region_id: nil, region: nil) - # Pass arguments to `create_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @param region_id [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The region to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - # - # # Call the create_region method. - # result = client.create_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def create_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest - - # Converts hash and nil to an 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_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.create_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - # - # @overload update_region(request, options = nil) - # Pass arguments to `update_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_region(region: nil, update_mask: nil) - # Pass arguments to `update_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash] - # Required. The updated region. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - # - # # Call the update_region method. - # result = client.update_region request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - # p result - # - def update_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.update_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - # - # @overload delete_region(request, options = nil) - # Pass arguments to `delete_region` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_region(name: nil) - # Pass arguments to `delete_region` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - # - # # Call the delete_region method. - # result = client.delete_region request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_region request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_region.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_region.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_region.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.delete_region request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the regions in your Merchant Center account. - # - # @overload list_regions(request, options = nil) - # Pass arguments to `list_regions` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - # - # # Call the list_regions method. - # result = client.list_regions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - # p item - # end - # - def list_regions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_regions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regions_service_stub.list_regions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regions_service_stub, :list_regions, "regions", request, result, 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 RegionsService REST API. - # - # This class represents the configuration for RegionsService 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::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_region.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 RegionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_region` - # @return [::Gapic::Config::Method] - # - attr_reader :get_region - ## - # RPC-specific configuration for `create_region` - # @return [::Gapic::Config::Method] - # - attr_reader :create_region - ## - # RPC-specific configuration for `update_region` - # @return [::Gapic::Config::Method] - # - attr_reader :update_region - ## - # RPC-specific configuration for `delete_region` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_region - ## - # RPC-specific configuration for `list_regions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regions - - # @private - def initialize parent_rpcs = nil - get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region - @get_region = ::Gapic::Config::Method.new get_region_config - create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region - @create_region = ::Gapic::Config::Method.new create_region_config - update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region - @update_region = ::Gapic::Config::Method.new update_region_config - delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region - @delete_region = ::Gapic::Config::Method.new delete_region_config - list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions - @list_regions = ::Gapic::Config::Method.new list_regions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb deleted file mode 100644 index 2705002746ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/regions_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - module Rest - ## - # REST service stub for the RegionsService 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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def get_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def create_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # A result object deserialized from the server's reply - def update_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_region request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_region_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_region", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse] - # A result object deserialized from the server's reply - def list_regions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_regions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.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_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest] - # 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_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/regions", - body: "region", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{region.name}", - body: "region", - matches: [ - ["region.name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_region REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_region_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/regions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_regions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/regions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb deleted file mode 100644 index dcb5e918d1ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/regions.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/regions_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module RegionsService - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.RegionsService' - - # Retrieves a region defined in your Merchant Center account. - rpc :GetRegion, ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Creates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Updates a region definition in your Merchant Center account. Executing this - # method requires admin access. - rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Region - # Deletes a region definition from your Merchant Center account. Executing - # this method requires admin access. - rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Google::Protobuf::Empty - # Lists the regions in your Merchant Center account. - rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb deleted file mode 100644 index 7a948b075dea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" -require "google/shopping/merchant/accounts/v1beta/version" - -module Google - module Shopping - module Merchant - module Accounts - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/accounts/v1beta/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb deleted file mode 100644 index 883a132363a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/client" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "shipping_settings_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb deleted file mode 100644 index 98d6c89c513f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +++ /dev/null @@ -1,576 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - ## - # Client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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/shopping/merchant/accounts/v1beta/shippingsettings_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 - - @shipping_settings_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :get_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.call_rpc :insert_shipping_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ShippingSettingsService API. - # - # This class represents the configuration for ShippingSettingsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb deleted file mode 100644 index b3b8b543ed1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Credentials for the ShippingSettingsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb deleted file mode 100644 index 29bb68e960e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - # Path helper methods for the ShippingSettingsService API. - module Paths - ## - # Create a fully-qualified ShippingSettings resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/shippingSettings` - # - # @param account [String] - # - # @return [::String] - def shipping_settings_path account: - "accounts/#{account}/shippingSettings" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb deleted file mode 100644 index 0d14c8f4c394..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to get method call shipping setting information per Merchant API - # method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - module ShippingSettingsService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb deleted file mode 100644 index cbb1cb183061..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +++ /dev/null @@ -1,519 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST client for the ShippingSettingsService service. - # - # Service to get method call shipping setting information per Merchant API - # method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :shipping_settings_service_stub - - ## - # Configure the ShippingSettingsService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ShippingSettingsService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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", "Shopping", "Merchant", "Accounts", "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 ShippingSettingsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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 - @shipping_settings_service_stub.universe_domain - end - - ## - # Create a new ShippingSettingsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ShippingSettingsService 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 - - @shipping_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @shipping_settings_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 - @shipping_settings_service_stub.logger - end - - # Service calls - - ## - # Retrieve shipping setting information. - # - # @overload get_shipping_settings(request, options = nil) - # Pass arguments to `get_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_shipping_settings(name: nil) - # Pass arguments to `get_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - # - # # Call the get_shipping_settings method. - # result = client.get_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def get_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.get_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replace the shipping setting of a merchant with the request shipping - # setting. Executing this method requires admin access. - # - # @overload insert_shipping_settings(request, options = nil) - # Pass arguments to `insert_shipping_settings` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_shipping_settings(parent: nil, shipping_setting: nil) - # Pass arguments to `insert_shipping_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @param shipping_setting [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings, ::Hash] - # Required. The new version of the account. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - # - # # Call the insert_shipping_settings method. - # result = client.insert_shipping_settings request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - # p result - # - def insert_shipping_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_shipping_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.insert_shipping_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_shipping_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @shipping_settings_service_stub.insert_shipping_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ShippingSettingsService REST API. - # - # This class represents the configuration for ShippingSettingsService 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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_shipping_settings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ShippingSettingsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shipping_settings - ## - # RPC-specific configuration for `insert_shipping_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_shipping_settings - - # @private - def initialize parent_rpcs = nil - get_shipping_settings_config = parent_rpcs.get_shipping_settings if parent_rpcs.respond_to? :get_shipping_settings - @get_shipping_settings = ::Gapic::Config::Method.new get_shipping_settings_config - insert_shipping_settings_config = parent_rpcs.insert_shipping_settings if parent_rpcs.respond_to? :insert_shipping_settings - @insert_shipping_settings = ::Gapic::Config::Method.new insert_shipping_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb deleted file mode 100644 index 40faa8e51671..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module ShippingSettingsService - module Rest - ## - # REST service stub for the ShippingSettingsService 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_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def get_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # A result object deserialized from the server's reply - def insert_shipping_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_shipping_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "insert_shipping_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.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_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/shippingSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_shipping_settings REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_shipping_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/shippingSettings:insert", - body: "shipping_setting", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb deleted file mode 100644 index c3a11939d0fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/shippingsettings.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/shopping/type/types_pb' - - -descriptor_data = "\n?google/shopping/merchant/accounts/v1beta/shippingsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\"\xcb\x02\n\x10ShippingSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x08services\x18\x02 \x03(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.ServiceB\x03\xe0\x41\x01\x12L\n\nwarehouses\x18\x03 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.WarehouseB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x02:y\xea\x41v\n+merchantapi.googleapis.com/ShippingSettings\x12#accounts/{account}/shippingSettings*\x10shippingSettings2\x10shippingSettings\"\xc7\x10\n\x07Service\x12\x1e\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06\x61\x63tive\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1f\n\x12\x64\x65livery_countries\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12W\n\rdelivery_time\x18\x05 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.DeliveryTimeB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12M\n\x0brate_groups\x18\x06 \x03(\x0b\x32\x33.google.shopping.merchant.accounts.v1beta.RateGroupB\x03\xe0\x41\x01\x12Z\n\rshipment_type\x18\x07 \x01(\x0e\x32>.google.shopping.merchant.accounts.v1beta.Service.ShipmentTypeH\x04\x88\x01\x01\x12=\n\x13minimum_order_value\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x05\x88\x01\x01\x12h\n\x19minimum_order_value_table\x18\t \x01(\x0b\x32@.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTableH\x06\x88\x01\x01\x12X\n\x0cstore_config\x18\n \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.Service.StoreConfigH\x07\x88\x01\x01\x12_\n\x10loyalty_programs\x18\x0b \x03(\x0b\x32@.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgramB\x03\xe0\x41\x01\x1a\xe2\x06\n\x0bStoreConfig\x12o\n\x12store_service_type\x18\x01 \x01(\x0e\x32N.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.StoreServiceTypeH\x00\x88\x01\x01\x12\x18\n\x0bstore_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\rcutoff_config\x18\x03 \x01(\x0b\x32J.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfigH\x01\x88\x01\x01\x12O\n\x0eservice_radius\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.DistanceH\x02\x88\x01\x01\x1a\xf5\x02\n\x0c\x43utoffConfig\x12z\n\x11local_cutoff_time\x18\x01 \x01(\x0b\x32Z.google.shopping.merchant.accounts.v1beta.Service.StoreConfig.CutoffConfig.LocalCutoffTimeH\x00\x88\x01\x01\x12%\n\x18store_close_offset_hours\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12$\n\x17no_delivery_post_cutoff\x18\x03 \x01(\x08H\x02\x88\x01\x01\x1aM\n\x0fLocalCutoffTime\x12\x11\n\x04hour\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06minute\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x14\n\x12_local_cutoff_timeB\x1b\n\x19_store_close_offset_hoursB\x1a\n\x18_no_delivery_post_cutoff\"[\n\x10StoreServiceType\x12\"\n\x1eSTORE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSELECTED_STORES\x10\x02\x42\x15\n\x13_store_service_typeB\x10\n\x0e_cutoff_configB\x11\n\x0f_service_radius\x1a\xf7\x01\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x15loyalty_program_tiers\x18\x02 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.Service.LoyaltyProgram.LoyaltyProgramTiersB\x03\xe0\x41\x01\x1a=\n\x13LoyaltyProgramTiers\x12\x17\n\ntier_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_tier_labelB\x10\n\x0e_program_label\"e\n\x0cShipmentType\x12\x1d\n\x19SHIPMENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45LIVERY\x10\x01\x12\x12\n\x0eLOCAL_DELIVERY\x10\x02\x12\x14\n\x10\x43OLLECTION_POINT\x10\x03\x42\x0f\n\r_service_nameB\t\n\x07_activeB\x10\n\x0e_currency_codeB\x10\n\x0e_delivery_timeB\x10\n\x0e_shipment_typeB\x16\n\x14_minimum_order_valueB\x1c\n\x1a_minimum_order_value_tableB\x0f\n\r_store_config\"\xb6\x01\n\x08\x44istance\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12J\n\x04unit\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.accounts.v1beta.Distance.UnitH\x01\x88\x01\x01\"7\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x0e\n\nKILOMETERS\x10\x02\x42\x08\n\x06_valueB\x07\n\x05_unit\"\xb0\x03\n\tWarehouse\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12U\n\x10shipping_address\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.AddressB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\\\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32=.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1f\n\rhandling_days\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x03\x88\x01\x01\x12]\n\x13\x62usiness_day_config\x18\x05 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x04\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_shipping_addressB\x0e\n\x0c_cutoff_timeB\x10\n\x0e_handling_daysB\x16\n\x14_business_day_config\"[\n\x13WarehouseCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minute\"\xf7\x01\n\x07\x41\x64\x64ress\x12\x1b\n\x0estreet_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x04\x63ity\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13\x61\x64ministrative_area\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x1d\n\x0bpostal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\x1d\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02H\x04\x88\x01\x01\x42\x11\n\x0f_street_addressB\x07\n\x05_cityB\x16\n\x14_administrative_areaB\x0e\n\x0c_postal_codeB\x0e\n\x0c_region_code\"\xb5\x06\n\x0c\x44\x65liveryTime\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12N\n\x0b\x63utoff_time\x18\x03 \x01(\x0b\x32\x34.google.shopping.merchant.accounts.v1beta.CutoffTimeH\x02\x88\x01\x01\x12\x1e\n\x11min_handling_days\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_handling_days\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12W\n\x12transit_time_table\x18\x06 \x01(\x0b\x32\x36.google.shopping.merchant.accounts.v1beta.TransitTableH\x05\x88\x01\x01\x12\x66\n\x1chandling_business_day_config\x18\x07 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x06\x88\x01\x01\x12\x65\n\x1btransit_business_day_config\x18\x08 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1beta.BusinessDayConfigH\x07\x88\x01\x01\x12q\n\x1ewarehouse_based_delivery_times\x18\t \x03(\x0b\x32\x44.google.shopping.merchant.accounts.v1beta.WarehouseBasedDeliveryTimeB\x03\xe0\x41\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_daysB\x0e\n\x0c_cutoff_timeB\x14\n\x12_min_handling_daysB\x14\n\x12_max_handling_daysB\x15\n\x13_transit_time_tableB\x1f\n\x1d_handling_business_day_configB\x1e\n\x1c_transit_business_day_config\"}\n\nCutoffTime\x12\x16\n\x04hour\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x18\n\x06minute\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x07\n\x05_hourB\t\n\x07_minuteB\x0c\n\n_time_zone\"\xf4\x01\n\x11\x42usinessDayConfig\x12_\n\rbusiness_days\x18\x01 \x03(\x0e\x32\x43.google.shopping.merchant.accounts.v1beta.BusinessDayConfig.WeekdayB\x03\xe0\x41\x02\"~\n\x07Weekday\x12\x17\n\x13WEEKDAY_UNSPECIFIED\x10\x00\x12\n\n\x06MONDAY\x10\x01\x12\x0b\n\x07TUESDAY\x10\x02\x12\r\n\tWEDNESDAY\x10\x03\x12\x0c\n\x08THURSDAY\x10\x04\x12\n\n\x06\x46RIDAY\x10\x05\x12\x0c\n\x08SATURDAY\x10\x06\x12\n\n\x06SUNDAY\x10\x07\"\xa5\x01\n\x1aWarehouseBasedDeliveryTime\x12\x19\n\x07\x63\x61rrier\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1b\n\twarehouse\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x0c\n\n_warehouse\"\xa7\x03\n\tRateGroup\x12\'\n\x1a\x61pplicable_shipping_labels\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12J\n\x0csingle_value\x18\x02 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueH\x00\x88\x01\x01\x12H\n\nmain_table\x18\x03 \x01(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableH\x01\x88\x01\x01\x12G\n\tsubtables\x18\x04 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.TableB\x03\xe0\x41\x01\x12Q\n\rcarrier_rates\x18\x05 \x03(\x0b\x32\x35.google.shopping.merchant.accounts.v1beta.CarrierRateB\x03\xe0\x41\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0f\n\r_single_valueB\r\n\x0b_main_tableB\x07\n\x05_name\"\xaa\x02\n\x05Table\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12P\n\x0brow_headers\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12N\n\x0e\x63olumn_headers\x18\x03 \x01(\x0b\x32\x31.google.shopping.merchant.accounts.v1beta.HeadersH\x02\x88\x01\x01\x12@\n\x04rows\x18\x04 \x03(\x0b\x32-.google.shopping.merchant.accounts.v1beta.RowB\x03\xe0\x41\x02\x42\x07\n\x05_nameB\x0e\n\x0c_row_headersB\x11\n\x0f_column_headers\"\xac\x03\n\x0cTransitTable\x12$\n\x17postal_code_group_names\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12 \n\x13transit_time_labels\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12X\n\x04rows\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRowB\x03\xe0\x41\x02\x1a\xf9\x01\n\x0eTransitTimeRow\x12k\n\x06values\x18\x01 \x03(\x0b\x32V.google.shopping.merchant.accounts.v1beta.TransitTable.TransitTimeRow.TransitTimeValueB\x03\xe0\x41\x02\x1az\n\x10TransitTimeValue\x12\x1d\n\x10min_transit_days\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_transit_days\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_min_transit_daysB\x13\n\x11_max_transit_days\"\x81\x02\n\x16MinimumOrderValueTable\x12{\n\x18store_code_set_with_movs\x18\x01 \x03(\x0b\x32T.google.shopping.merchant.accounts.v1beta.MinimumOrderValueTable.StoreCodeSetWithMovB\x03\xe0\x41\x02\x1aj\n\x13StoreCodeSetWithMov\x12\x18\n\x0bstore_codes\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12/\n\x05value\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x84\x02\n\x07Headers\x12\x30\n\x06prices\x18\x01 \x03(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x32\n\x07weights\x18\x02 \x03(\x0b\x32\x1c.google.shopping.type.WeightB\x03\xe0\x41\x02\x12\x1c\n\x0fnumber_of_items\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12$\n\x17postal_code_group_names\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12O\n\tlocations\x18\x05 \x03(\x0b\x32\x37.google.shopping.merchant.accounts.v1beta.LocationIdSetB\x03\xe0\x41\x02\"*\n\rLocationIdSet\x12\x19\n\x0clocation_ids\x18\x01 \x03(\tB\x03\xe0\x41\x02\"J\n\x03Row\x12\x43\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.accounts.v1beta.ValueB\x03\xe0\x41\x02\"\xf8\x01\n\x05Value\x12\x18\n\x0bno_shipping\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x33\n\tflat_rate\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x12\x1d\n\x10price_percentage\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x63\x61rrier_rate\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08subtable\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x0e\n\x0c_no_shippingB\x0c\n\n_flat_rateB\x13\n\x11_price_percentageB\x0f\n\r_carrier_rateB\x0b\n\t_subtable\"\xe0\x02\n\x0b\x43\x61rrierRate\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x19\n\x07\x63\x61rrier\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12!\n\x0f\x63\x61rrier_service\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12$\n\x12origin_postal_code\x18\x04 \x01(\tB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12\'\n\x15percentage_adjustment\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12>\n\x0f\x66lat_adjustment\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x05\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_carrierB\x12\n\x10_carrier_serviceB\x15\n\x13_origin_postal_codeB\x18\n\x16_percentage_adjustmentB\x12\n\x10_flat_adjustment\"_\n\x1aGetShippingSettingsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ShippingSettings\"\x8f\x01\n\x1dInsertShippingSettingsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x10shipping_setting\x18\x02 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1beta.ShippingSettingsB\x03\xe0\x41\x02\x32\xb8\x04\n\x17ShippingSettingsService\x12\xdb\x01\n\x13GetShippingSettings\x12\x44.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/accounts/v1beta/{name=accounts/*/shippingSettings}\x12\xf5\x01\n\x16InsertShippingSettings\x12G.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest\x1a:.google.shopping.merchant.accounts.v1beta.ShippingSettings\"V\x82\xd3\xe4\x93\x02P\" e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.call_rpc :retrieve_for_application_terms_of_service_agreement_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceAgreementStateService API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb deleted file mode 100644 index 08f405184324..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Credentials for the TermsOfServiceAgreementStateService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb deleted file mode 100644 index 8f1f50a9834f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Path helper methods for the TermsOfServiceAgreementStateService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfServiceAgreementState resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/termsOfServiceAgreementStates/{identifier}` - # - # @param account [String] - # @param identifier [String] - # - # @return [::String] - def terms_of_service_agreement_state_path account:, identifier: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/termsOfServiceAgreementStates/#{identifier}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb deleted file mode 100644 index 33c9185e4e0a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfServiceAgreementState` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - module TermsOfServiceAgreementStateService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb deleted file mode 100644 index f99ed2289e41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +++ /dev/null @@ -1,521 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST client for the TermsOfServiceAgreementStateService service. - # - # Service to support `TermsOfServiceAgreementState` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_agreement_state_service_stub - - ## - # Configure the TermsOfServiceAgreementStateService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceAgreementStateService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceAgreementStateService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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 - @terms_of_service_agreement_state_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceAgreementStateService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceAgreementStateService 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 - - @terms_of_service_agreement_state_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_agreement_state_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 - @terms_of_service_agreement_state_service_stub.logger - end - - # Service calls - - ## - # Returns the state of a terms of service agreement. - # - # @overload get_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `get_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service_agreement_state(name: nil) - # Pass arguments to `get_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - # - # # Call the get_terms_of_service_agreement_state method. - # result = client.get_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def get_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.get_terms_of_service_agreement_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the state of the agreement for the application terms of service. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(request, options = nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_for_application_terms_of_service_agreement_state(parent: nil) - # Pass arguments to `retrieve_for_application_terms_of_service_agreement_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - # - # # Call the retrieve_for_application_terms_of_service_agreement_state method. - # result = client.retrieve_for_application_terms_of_service_agreement_state request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - # p result - # - def retrieve_for_application_terms_of_service_agreement_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_for_application_terms_of_service_agreement_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_for_application_terms_of_service_agreement_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_agreement_state_service_stub.retrieve_for_application_terms_of_service_agreement_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceAgreementStateService REST API. - # - # This class represents the configuration for TermsOfServiceAgreementStateService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service_agreement_state.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceAgreementStateService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service_agreement_state - ## - # RPC-specific configuration for `retrieve_for_application_terms_of_service_agreement_state` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_for_application_terms_of_service_agreement_state - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_agreement_state_config = parent_rpcs.get_terms_of_service_agreement_state if parent_rpcs.respond_to? :get_terms_of_service_agreement_state - @get_terms_of_service_agreement_state = ::Gapic::Config::Method.new get_terms_of_service_agreement_state_config - retrieve_for_application_terms_of_service_agreement_state_config = parent_rpcs.retrieve_for_application_terms_of_service_agreement_state if parent_rpcs.respond_to? :retrieve_for_application_terms_of_service_agreement_state - @retrieve_for_application_terms_of_service_agreement_state = ::Gapic::Config::Method.new retrieve_for_application_terms_of_service_agreement_state_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb deleted file mode 100644 index c0a226adbfbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - module Rest - ## - # REST service stub for the TermsOfServiceAgreementStateService 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_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def get_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState] - # A result object deserialized from the server's reply - def retrieve_for_application_terms_of_service_agreement_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_for_application_terms_of_service_agreement_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.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_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_for_application_terms_of_service_agreement_state REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_for_application_terms_of_service_agreement_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/termsOfServiceAgreementStates:retrieveForApplication", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb deleted file mode 100644 index 7147a2323140..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/client" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "terms_of_service_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb deleted file mode 100644 index 8ab3d9adf00f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +++ /dev/null @@ -1,672 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - ## - # Client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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/shopping/merchant/accounts/v1beta/termsofservice_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 - - @terms_of_service_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :get_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :retrieve_latest_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.call_rpc :accept_terms_of_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceService API. - # - # This class represents the configuration for TermsOfServiceService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb deleted file mode 100644 index 46f3c20085d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Credentials for the TermsOfServiceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb deleted file mode 100644 index cbc86885e96c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Path helper methods for the TermsOfServiceService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified TermsOfService resource string. - # - # The resource will be in the following format: - # - # `termsOfService/{version}` - # - # @param version [String] - # - # @return [::String] - def terms_of_service_path version: - "termsOfService/#{version}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb deleted file mode 100644 index 45348f1253e5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support `TermsOfService` API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - module TermsOfServiceService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb deleted file mode 100644 index 4a0c6f76ea19..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +++ /dev/null @@ -1,616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST client for the TermsOfServiceService service. - # - # Service to support `TermsOfService` API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :terms_of_service_service_stub - - ## - # Configure the TermsOfServiceService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TermsOfServiceService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TermsOfServiceService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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 - @terms_of_service_service_stub.universe_domain - end - - ## - # Create a new TermsOfServiceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TermsOfServiceService 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 - - @terms_of_service_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @terms_of_service_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 - @terms_of_service_service_stub.logger - end - - # Service calls - - ## - # Retrieves the `TermsOfService` associated with the provided version. - # - # @overload get_terms_of_service(request, options = nil) - # Pass arguments to `get_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_terms_of_service(name: nil) - # Pass arguments to `get_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - # - # # Call the get_terms_of_service method. - # result = client.get_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def get_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.get_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - # - # @overload retrieve_latest_terms_of_service(request, options = nil) - # Pass arguments to `retrieve_latest_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_latest_terms_of_service(region_code: nil, kind: nil) - # Pass arguments to `retrieve_latest_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @param kind [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - # - # # Call the retrieve_latest_terms_of_service method. - # result = client.retrieve_latest_terms_of_service request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - # p result - # - def retrieve_latest_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_latest_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.retrieve_latest_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_latest_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.retrieve_latest_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accepts a `TermsOfService`. Executing this method requires admin access. - # - # @overload accept_terms_of_service(request, options = nil) - # Pass arguments to `accept_terms_of_service` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload accept_terms_of_service(name: nil, account: nil, region_code: nil) - # Pass arguments to `accept_terms_of_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @param account [::String] - # Required. The account for which to accept the ToS. - # @param region_code [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - # - # # Call the accept_terms_of_service method. - # result = client.accept_terms_of_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def accept_terms_of_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.accept_terms_of_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.accept_terms_of_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.accept_terms_of_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @terms_of_service_service_stub.accept_terms_of_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TermsOfServiceService REST API. - # - # This class represents the configuration for TermsOfServiceService 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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_terms_of_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 TermsOfServiceService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_terms_of_service - ## - # RPC-specific configuration for `retrieve_latest_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_latest_terms_of_service - ## - # RPC-specific configuration for `accept_terms_of_service` - # @return [::Gapic::Config::Method] - # - attr_reader :accept_terms_of_service - - # @private - def initialize parent_rpcs = nil - get_terms_of_service_config = parent_rpcs.get_terms_of_service if parent_rpcs.respond_to? :get_terms_of_service - @get_terms_of_service = ::Gapic::Config::Method.new get_terms_of_service_config - retrieve_latest_terms_of_service_config = parent_rpcs.retrieve_latest_terms_of_service if parent_rpcs.respond_to? :retrieve_latest_terms_of_service - @retrieve_latest_terms_of_service = ::Gapic::Config::Method.new retrieve_latest_terms_of_service_config - accept_terms_of_service_config = parent_rpcs.accept_terms_of_service if parent_rpcs.respond_to? :accept_terms_of_service - @accept_terms_of_service = ::Gapic::Config::Method.new accept_terms_of_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb deleted file mode 100644 index e44a62b60c86..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - module Rest - ## - # REST service stub for the TermsOfServiceService 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_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def get_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService] - # A result object deserialized from the server's reply - def retrieve_latest_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_latest_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_latest_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def accept_terms_of_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_accept_terms_of_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "accept_terms_of_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_latest_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_latest_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/termsOfService:retrieveLatest", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the accept_terms_of_service REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_accept_terms_of_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}:accept", - matches: [ - ["name", %r{^termsOfService/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb deleted file mode 100644 index e47173662cd5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservice.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/merchant/accounts/v1beta/termsofservicekind_pb' - - -descriptor_data = "\n=google/shopping/merchant/accounts/v1beta/termsofservice.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\"\xb2\x02\n\x0eTermsOfService\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x08\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12J\n\x04kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12\x15\n\x08\x66ile_uri\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08\x65xternal\x18\x05 \x01(\x08:H\xea\x41\x45\n)merchantapi.googleapis.com/TermsOfService\x12\x18termsOfService/{version}B\x0b\n\t_file_uri\"[\n\x18GetTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\"\x90\x01\n#RetrieveLatestTermsOfServiceRequest\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x04kind\x18\x02 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKindB\x03\xe0\x41\x02\"\xb5\x01\n\x1b\x41\x63\x63\x65ptTermsOfServiceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12;\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x18\n\x0bregion_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x32\xc7\x05\n\x15TermsOfServiceService\x12\xca\x01\n\x11GetTermsOfService\x12\x42.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1beta/{name=termsOfService/*}\x12\xdf\x01\n\x1cRetrieveLatestTermsOfService\x12M.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest\x1a\x38.google.shopping.merchant.accounts.v1beta.TermsOfService\"6\x82\xd3\xe4\x93\x02\x30\x12./accounts/v1beta/termsOfService:retrieveLatest\x12\xb5\x01\n\x14\x41\x63\x63\x65ptTermsOfService\x12\x45.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//accounts/v1beta/{name=termsOfService/*}:accept\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x95\x01\n,com.google.shopping.merchant.accounts.v1betaB\x13TermsOfServiceProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfService").msgclass - GetTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest").msgclass - RetrieveLatestTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest").msgclass - AcceptTermsOfServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb deleted file mode 100644 index f300591e6416..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofservice.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofservice_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceService - # Service to support `TermsOfService` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceService' - - # Retrieves the `TermsOfService` associated with the provided version. - rpc :GetTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Retrieves the latest version of the `TermsOfService` for a given `kind` and - # `region_code`. - rpc :RetrieveLatestTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService - # Accepts a `TermsOfService`. Executing this method requires admin access. - rpc :AcceptTermsOfService, ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb deleted file mode 100644 index 1be87bcf62c8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.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/shopping/merchant/accounts/v1beta/termsofservicekind_pb' -require 'google/type/date_pb' - - -descriptor_data = "\nKgoogle/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x41google/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x1a\x16google/type/date.proto\"\x8f\x04\n\x1cTermsOfServiceAgreementState\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12[\n\x15terms_of_service_kind\x18\x03 \x01(\x0e\x32<.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind\x12I\n\x08\x61\x63\x63\x65pted\x18\x04 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.AcceptedH\x00\x88\x01\x01\x12I\n\x08required\x18\x05 \x01(\x0b\x32\x32.google.shopping.merchant.accounts.v1beta.RequiredH\x01\x88\x01\x01:\xb9\x01\xea\x41\xb5\x01\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\x12=accounts/{account}/termsOfServiceAgreementStates/{identifier}*\x1dtermsOfServiceAgreementStates2\x1ctermsOfServiceAgreementStateB\x0b\n\t_acceptedB\x0b\n\t_required\"\xcf\x01\n\x08\x41\x63\x63\x65pted\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12<\n\x0b\x61\x63\x63\x65pted_by\x18\x02 \x01(\tB\'\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12+\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x88\x01\x01\x42\x0e\n\x0c_valid_until\"j\n\x08Required\x12H\n\x10terms_of_service\x18\x01 \x01(\tB.\xfa\x41+\n)merchantapi.googleapis.com/TermsOfService\x12\x14\n\x0ctos_file_uri\x18\x02 \x01(\t\"w\n&GetTermsOfServiceAgreementStateRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7merchantapi.googleapis.com/TermsOfServiceAgreementState\"\x8c\x01\n9RetrieveForApplicationTermsOfServiceAgreementStateRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37merchantapi.googleapis.com/TermsOfServiceAgreementState2\xcf\x05\n#TermsOfServiceAgreementStateService\x12\x8e\x02\n\x1fGetTermsOfServiceAgreementState\x12P.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/accounts/v1beta/{name=accounts/*/termsOfServiceAgreementStates/*}\x12\xcd\x02\n2RetrieveForApplicationTermsOfServiceAgreementState\x12\x63.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest\x1a\x46.google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState\"j\xda\x41\x06parent\x82\xd3\xe4\x93\x02[\x12Y/accounts/v1beta/{parent=accounts/*}/termsOfServiceAgreementStates:retrieveForApplication\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x01\n,com.google.shopping.merchant.accounts.v1betaB!TermsOfServiceAgreementStateProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceAgreementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementState").msgclass - Accepted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Accepted").msgclass - Required = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Required").msgclass - GetTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest").msgclass - RetrieveForApplicationTermsOfServiceAgreementStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb deleted file mode 100644 index edbccf383c55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module TermsOfServiceAgreementStateService - # Service to support `TermsOfServiceAgreementState` API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService' - - # Returns the state of a terms of service agreement. - rpc :GetTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - # Retrieves the state of the agreement for the application terms of service. - rpc :RetrieveForApplicationTermsOfServiceAgreementState, ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb deleted file mode 100644 index 35ab44903852..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto - -require 'google/protobuf' - - -descriptor_data = "\nAgoogle/shopping/merchant/accounts/v1beta/termsofservicekind.proto\x12(google.shopping.merchant.accounts.v1beta*P\n\x12TermsOfServiceKind\x12%\n!TERMS_OF_SERVICE_KIND_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_CENTER\x10\x01\x42\x99\x01\n,com.google.shopping.merchant.accounts.v1betaB\x17TermsOfServiceKindProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - TermsOfServiceKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.TermsOfServiceKind").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb deleted file mode 100644 index a4ae3c613309..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/user.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/merchant/accounts/v1beta/accessright_pb' - - -descriptor_data = "\n3google/shopping/merchant/accounts/v1beta/user.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a:google/shopping/merchant/accounts/v1beta/accessright.proto\"\xc6\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.shopping.merchant.accounts.v1beta.User.StateB\x03\xe0\x41\x03\x12Q\n\raccess_rights\x18\x04 \x03(\x0e\x32\x35.google.shopping.merchant.accounts.v1beta.AccessRightB\x03\xe0\x41\x01\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08VERIFIED\x10\x02:S\xea\x41P\n\x1fmerchantapi.googleapis.com/User\x12 accounts/{account}/users/{email}*\x05users2\x04user\"G\n\x0eGetUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\xa8\x01\n\x11\x43reateUserRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x04user\x18\x03 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\"J\n\x11\x44\x65leteUserRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fmerchantapi.googleapis.com/User\"\x8c\x01\n\x11UpdateUserRequest\x12\x41\n\x04user\x18\x01 \x01(\x0b\x32..google.shopping.merchant.accounts.v1beta.UserB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x7f\n\x10ListUsersRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\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\"k\n\x11ListUsersResponse\x12=\n\x05users\x18\x01 \x03(\x0b\x32..google.shopping.merchant.accounts.v1beta.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xfc\x07\n\x0bUserService\x12\xae\x01\n\x07GetUser\x12\x38.google.shopping.merchant.accounts.v1beta.GetUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{name=accounts/*/users/*}\x12\xc1\x01\n\nCreateUser\x12;.google.shopping.merchant.accounts.v1beta.CreateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"F\xda\x41\x0bparent,user\x82\xd3\xe4\x93\x02\x32\"*/accounts/v1beta/{parent=accounts/*}/users:\x04user\x12\x9c\x01\n\nDeleteUser\x12;.google.shopping.merchant.accounts.v1beta.DeleteUserRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/accounts/v1beta/{name=accounts/*/users/*}\x12\xcb\x01\n\nUpdateUser\x12;.google.shopping.merchant.accounts.v1beta.UpdateUserRequest\x1a..google.shopping.merchant.accounts.v1beta.User\"P\xda\x41\x10user,update_mask\x82\xd3\xe4\x93\x02\x37\x32//accounts/v1beta/{user.name=accounts/*/users/*}:\x04user\x12\xc1\x01\n\tListUsers\x12:.google.shopping.merchant.accounts.v1beta.ListUsersRequest\x1a;.google.shopping.merchant.accounts.v1beta.ListUsersResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/accounts/v1beta/{parent=accounts/*}/users\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8b\x01\n,com.google.shopping.merchant.accounts.v1betaB\tUserProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User").msgclass - User::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.User.State").enummodule - GetUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetUserRequest").msgclass - CreateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateUserRequest").msgclass - DeleteUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteUserRequest").msgclass - UpdateUserRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateUserRequest").msgclass - ListUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersRequest").msgclass - ListUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListUsersResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service.rb deleted file mode 100644 index 64065f29308c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/client" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/accounts/v1beta/user_service" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "user_service", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb deleted file mode 100644 index bd71f6b81cea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +++ /dev/null @@ -1,891 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - ## - # Client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @user_service_stub.universe_domain - end - - ## - # Create a new UserService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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/shopping/merchant/accounts/v1beta/user_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 - - @user_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :get_user, request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :create_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :delete_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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.user&.name - header_params["user.name"] = request.user.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :update_user, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.call_rpc :list_users, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @user_service_stub, :list_users, request, response, 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 UserService API. - # - # This class represents the configuration for UserService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb deleted file mode 100644 index b280d41b5a54..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Credentials for the UserService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb deleted file mode 100644 index e0b82b1f8295..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Path helper methods for the UserService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/users/{email}` - # - # @param account [String] - # @param email [String] - # - # @return [::String] - def user_path account:, email: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/users/#{email}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb deleted file mode 100644 index 485719a9a0b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/version" - -require "google/shopping/merchant/accounts/v1beta/user_service/credentials" -require "google/shopping/merchant/accounts/v1beta/user_service/paths" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/client" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - ## - # Service to support user API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/accounts/v1beta/user_service/rest" - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - module UserService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb deleted file mode 100644 index 5c14f5af0f01..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +++ /dev/null @@ -1,813 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST client for the UserService service. - # - # Service to support user API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :user_service_stub - - ## - # Configure the UserService Client class. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UserService clients - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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", "Shopping", "Merchant", "Accounts", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UserService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Accounts::V1beta::UserService::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 - @user_service_stub.universe_domain - end - - ## - # Create a new UserService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UserService 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 - - @user_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @user_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 - @user_service_stub.logger - end - - # Service calls - - ## - # Retrieves a Merchant Center account user. - # - # @overload get_user(request, options = nil) - # Pass arguments to `get_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_user(name: nil) - # Pass arguments to `get_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - # - # # Call the get_user method. - # result = client.get_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def get_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.get_user request, 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 Merchant Center account user. Executing this method requires - # admin access. - # - # @overload create_user(request, options = nil) - # Pass arguments to `create_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_user(parent: nil, user_id: nil, user: nil) - # Pass arguments to `create_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @param user_id [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The user to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - # - # # Call the create_user method. - # result = client.create_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def create_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest - - # Converts hash and nil to an 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_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.create_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user(name: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.delete_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Merchant Center account user. Executing this method requires - # admin access. - # - # @overload update_user(request, options = nil) - # Pass arguments to `update_user` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_user(user: nil, update_mask: nil) - # Pass arguments to `update_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param user [::Google::Shopping::Merchant::Accounts::V1beta::User, ::Hash] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - # - # # Call the update_user method. - # result = client.update_user request - # - # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - # p result - # - def update_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.update_user request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all users of a Merchant Center account. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @param page_token [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/accounts/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Accounts::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_users.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @user_service_stub.list_users request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @user_service_stub, :list_users, "users", request, result, 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 UserService REST API. - # - # This class represents the configuration for UserService 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::Shopping::Merchant::Accounts::V1beta::UserService::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_user to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_user.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 UserService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_user` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user - ## - # RPC-specific configuration for `create_user` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `update_user` - # @return [::Gapic::Config::Method] - # - attr_reader :update_user - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - - # @private - def initialize parent_rpcs = nil - get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user - @get_user = ::Gapic::Config::Method.new get_user_config - create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user - @create_user = ::Gapic::Config::Method.new create_user_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user - @update_user = ::Gapic::Config::Method.new update_user_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb deleted file mode 100644 index c297a2b417f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts/v1beta/user_pb" - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - module Rest - ## - # REST service stub for the UserService 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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def get_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def create_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # A result object deserialized from the server's reply - def update_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse] - # A result object deserialized from the server's reply - def list_users request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_users", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.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_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest] - # 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_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/accounts/v1beta/{parent}/users", - body: "user", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/accounts/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_user REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/accounts/v1beta/{user.name}", - body: "user", - matches: [ - ["user.name", %r{^accounts/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_users REST call - # - # @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_users_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1beta/{parent}/users", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb deleted file mode 100644 index 54dabf37a72e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/accounts/v1beta/user.proto for package 'google.shopping.merchant.accounts.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/shopping/merchant/accounts/v1beta/user_pb' - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - module UserService - # Service to support user API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.accounts.v1beta.UserService' - - # Retrieves a Merchant Center account user. - rpc :GetUser, ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Creates a Merchant Center account user. Executing this method requires - # admin access. - rpc :CreateUser, ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Deletes a Merchant Center account user. Executing this method requires - # admin access. - rpc :DeleteUser, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, ::Google::Protobuf::Empty - # Updates a Merchant Center account user. Executing this method requires - # admin access. - rpc :UpdateUser, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, ::Google::Shopping::Merchant::Accounts::V1beta::User - # Lists all users of a Merchant Center account. - rpc :ListUsers, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb deleted file mode 100644 index 9d433caf1711..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/verificationmailsettings_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/accounts/v1beta/verificationmailsettings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\nGgoogle/shopping/merchant/accounts/v1beta/verificationmailsettings.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x02\n\x18VerificationMailSettings\x12|\n\x16verification_mail_mode\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailModeB\x03\xe0\x41\x01\"z\n\x14VerificationMailMode\x12&\n\"VERIFICATION_MAIL_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SEND_VERIFICATION_MAIL\x10\x01\x12\x1e\n\x1aSUPPRESS_VERIFICATION_MAIL\x10\x02\x42\xa4\x02\n,com.google.shopping.merchant.accounts.v1betaB\x1dVerificationMailSettingsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb\xaa\x02(Google.Shopping.Merchant.Accounts.V1Beta\xca\x02(Google\\Shopping\\Merchant\\Accounts\\V1beta\xea\x02,Google::Shopping::Merchant::Accounts::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - VerificationMailSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings").msgclass - VerificationMailSettings::VerificationMailMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.VerificationMailSettings.VerificationMailMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb deleted file mode 100644 index b50ef86acc14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/lib/google/shopping/merchant/accounts/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb deleted file mode 100644 index d51673a9fd9a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The access right. - module AccessRight - # Default value. This value is unused. - ACCESS_RIGHT_UNSPECIFIED = 0 - - # Standard access rights. - STANDARD = 1 - - # Admin access rights. - ADMIN = 2 - - # Users with this right have access to performance and insights. - PERFORMANCE_REPORTING = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb deleted file mode 100644 index fb5a0c3c1f9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The tax settings of a merchant account. All methods require the admin role. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the tax setting. - # Format: - # "\\{account_tax.name=accounts/\\{account}}" - # @!attribute [r] account - # @return [::Integer] - # Output only. The ID of the account to which these account tax settings - # belong. - # @!attribute [rw] tax_rules - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TaxRule>] - # Tax rules. "Define the tax rules in each region. - # No tax will be presented if a region has no rule." - class AccountTax - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get tax settings - # @!attribute [rw] name - # @return [::String] - # Required. The name from which tax settings will be retrieved - class GetAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update the tax settings - # @!attribute [rw] account_tax - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountTax] - # Required. The tax setting that will be updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated - class UpdateAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list all sub-account tax settings only for the requesting merchant - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of account tax. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tax settings to return in the response, used for - # paging. - # @!attribute [rw] page_token - # @return [::String] - # The token returned by the previous request. - class ListAccountTaxRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to account tax list request - # This method can only be called on a multi-client account, otherwise it'll - # return an error. - # @!attribute [rw] account_taxes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountTax>] - # Page of accounttax settings - # @!attribute [rw] next_page_token - # @return [::String] - # The token for the retrieval of the next page of account tax settings. - class ListAccountTaxResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb deleted file mode 100644 index 5cce1309c12e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An - # [`AccountIssue`](https://support.google.com/merchants/answer/12153802?sjid=17798438912526418908-EU#account). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account issue. - # Format: `accounts/{account}/issues/{id}` - # @!attribute [rw] title - # @return [::String] - # The localized title of the issue. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The overall severity of the issue. - # @!attribute [rw] impacted_destinations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination>] - # The impact this issue has on various destinations. - # @!attribute [rw] detail - # @return [::String] - # Further localized details about the issue. - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to Merchant Center Help Center providing further information about the - # issue and how to fix it. - class AccountIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a destination. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The impacted reporting context. - # @!attribute [rw] impacts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::ImpactedDestination::Impact>] - # The (negative) impact for various regions on the given destination. - class ImpactedDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The impact of the issue on a region. - # @!attribute [rw] region_code - # @return [::String] - # The [CLDR region code](https://cldr.unicode.org/) where this issue - # applies. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue::Severity] - # The severity of the issue on the destination and region. - class Impact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All possible issue severities. - module Severity - # The severity is unknown. - SEVERITY_UNSPECIFIED = 0 - - # The issue causes offers to not serve. - CRITICAL = 1 - - # The issue might affect offers (in the future) or might be an - # indicator of issues with offers. - ERROR = 2 - - # The issue is a suggestion for improvement. - SUGGESTION = 3 - end - end - - # Request message for the `ListAccountIssues` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of issues. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of issues to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccountIssues` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountIssues` must - # match the call that provided the page token. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The issues in the response will have human-readable fields in the - # given language. The format is [BCP-47](https://tools.ietf.org/html/bcp47), - # such as `en-US` or `sr-Latn`. If not value is provided, `en-US` will be - # used. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to - # localize times in human-readable fields. For example 'America/Los_Angeles'. - # If not set, 'America/Los_Angeles' will be used. - class ListAccountIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountIssues` method. - # @!attribute [rw] account_issues - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue>] - # The issues from the specified account. - # @!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 ListAccountIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb deleted file mode 100644 index 573b329cfd2a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # An account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the account. - # Format: `accounts/{account}` - # @!attribute [r] account_id - # @return [::Integer] - # Output only. The ID of the account. - # @!attribute [rw] account_name - # @return [::String] - # Required. A human-readable name of the account. See - # [store name](https://support.google.com/merchants/answer/160556) and - # [business name](https://support.google.com/merchants/answer/12159159) for - # more information. - # @!attribute [rw] adult_content - # @return [::Boolean] - # Whether this account contains adult content. - # @!attribute [r] test_account - # @return [::Boolean] - # Output only. Whether this is a test account. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Required. The time zone of the account. - # - # On writes, `time_zone` sets both the `reporting_time_zone` and the - # `display_time_zone`. - # - # For reads, `time_zone` always returns the `display_time_zone`. If - # `display_time_zone` doesn't exist for your account, `time_zone` is empty. - # @!attribute [rw] language_code - # @return [::String] - # Required. The account's [BCP-47 language - # code](https://tools.ietf.org/html/bcp47), such as `en-US` or `sr-Latn`. - class Account - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to retrieve. - # Format: `accounts/{account}` - class GetAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateAndConfigureAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The account to be created. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest>] - # Optional. Users to be added to the account. - # @!attribute [rw] accept_terms_of_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService] - # Optional. The Terms of Service (ToS) to be accepted immediately upon - # account creation. - # @!attribute [rw] service - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService>] - # Required. An account service between the account to be created and the - # provider account is initialized as part of the creation. At least one such - # service needs to be provided. Currently exactly one of these needs to be - # `account_aggregation`, which means you can only create sub accounts, not - # standalone account through this method. Additional `account_management` or - # `product_management` services may be provided. - class CreateAndConfigureAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference to a Terms of Service resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version in the format - # `termsOfService/{version}`. To retrieve the latest version, use the - # [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) - # method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). - # This is either a country when the ToS applies specifically to that - # country or `001` when it applies globally. - class AcceptTermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instructions to add account services during creation of the - # account. - # @!attribute [rw] account_aggregation - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AccountAggregation] - # The provider is an - # [aggregator](https://support.google.com/merchants/answer/188487) for - # the account. Payload for service type Account Aggregation. - # @!attribute [rw] provider - # @return [::String] - # Optional. The provider of the service. - # Format: `accounts/{account}` - class AddAccountService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for the `DeleteAccount` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the account to delete. - # Format: `accounts/{account}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to `true`, the account is deleted even if it provides - # services to other accounts or has processed offers. - class DeleteAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAccount` method. - # @!attribute [rw] account - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Account] - # Required. The new version of the account. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListAccounts` method. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Returns only accounts that match the - # [filter](/merchant/api/guides/accounts/filter). - # For more details, see the - # [filter syntax reference](/merchant/api/guides/accounts/filter-syntax). - class ListAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts matching the `ListAccountsRequest`. - # @!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 ListAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListSubAccounts` method. - # @!attribute [rw] provider - # @return [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service may return - # fewer than this value. If unspecified, at most 250 accounts are returned. - # The maximum value is 500; values above 500 are coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccounts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccounts` must match - # the call that provided the page token. - class ListSubAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListSubAccounts` method. - # @!attribute [rw] accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Account>] - # The accounts for which the given parent account is an aggregator. - # @!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 ListSubAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb deleted file mode 100644 index 19cff87b2479..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.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 Shopping - module Merchant - module Accounts - module V1beta - # `AccountAggregation` payload. - class AccountAggregation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb deleted file mode 100644 index e321368804c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the - # [autofeed](https://support.google.com/merchants/answer/7538732) settings. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings`. - # @!attribute [rw] enable_products - # @return [::Boolean] - # Required. Enables or disables product crawling through the autofeed for the - # given account. Autofeed accounts must meet [certain - # conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), - # which can be checked through the `eligible` field. - # The account must **not** be a marketplace. - # When the autofeed is enabled for the first time, the products usually - # appear instantly. When re-enabling, it might take up to 24 hours for - # products to appear. - # @!attribute [r] eligible - # @return [::Boolean] - # Output only. Determines whether merchant is eligible for being enrolled - # into an autofeed. - class AutofeedSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutofeedSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the autofeed settings. - # Format: `accounts/{account}/autofeedSettings` - class GetAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutofeedSettings` method. - # @!attribute [rw] autofeed_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings] - # Required. The new version of the autofeed setting. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateAutofeedSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb deleted file mode 100644 index 08941d3f76aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/automaticimprovements.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [automatic - # improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) - # of an account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements`. - # @!attribute [rw] item_updates - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates] - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] image_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements] - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # This field is only updated (cleared) if provided in the update mask. - # @!attribute [rw] shipping_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticShippingImprovements] - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning - # on [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times - # shown to shoppers using Google. More accurate delivery times, especially - # when faster, typically lead to better conversion rates. Google will improve - # your estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # This field is only updated (cleared) if provided in the update mask. - class AutomaticImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Turning on [item - # updates](https://support.google.com/merchants/answer/3246284) allows - # Google to automatically update items for you. When item updates are on, - # Google uses the structured data markup on the website and advanced data - # extractors to update the price and availability of the items. When the item - # updates are off, items with mismatched data aren't shown. - # @!attribute [rw] account_item_updates_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticItemUpdates::ItemUpdatesAccountLevelSettings] - # Optional. Determines which attributes of the items should be automatically - # updated. If this field is not present and provided in the update mask, then - # the settings will be deleted. If there are no settings for subaccount, they - # are inherited from aggregator. - # @!attribute [r] effective_allow_price_updates - # @return [::Boolean] - # Output only. The effective value of allow_price_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_availability_updates - # @return [::Boolean] - # Output only. The effective value of allow_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_strict_availability_updates - # @return [::Boolean] - # Output only. The effective value of - # allow_strict_availability_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - # @!attribute [r] effective_allow_condition_updates - # @return [::Boolean] - # Output only. The effective value of allow_condition_updates. - # If account_item_updates_settings is present, then this value is the same. - # Otherwise, it represents the inherited value of the parent account. - # The default value is true if no settings are present. - # Read-only. - class AutomaticItemUpdates - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Item Updates. - # @!attribute [rw] allow_price_updates - # @return [::Boolean] - # If price updates are enabled, Google always updates the active price with - # the crawled information. - # @!attribute [rw] allow_availability_updates - # @return [::Boolean] - # If availability updates are enabled, any previous availability values - # get overwritten if Google finds an out-of-stock annotation on the offer's - # page. - # If additionally `allow_strict_availability_updates` field is set to - # true, values get overwritten if Google finds an in-stock annotation on - # the offer’s page. - # @!attribute [rw] allow_strict_availability_updates - # @return [::Boolean] - # If `allow_availability_updates` is enabled, items are automatically - # updated in all your Shopping target countries. By default, availability - # updates will only be applied to items that are 'out of stock' on your - # website but 'in stock' on Shopping. Set this to true to also update items - # that are 'in stock' on your website, but 'out of stock' on Google - # Shopping. In order for this field to have an effect, you must also set - # `allow_availability_updates`. - # @!attribute [rw] allow_condition_updates - # @return [::Boolean] - # If condition updates are enabled, Google always updates item condition - # with the condition detected from the details of your product. - class ItemUpdatesAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This improvement will attempt to automatically correct submitted images if - # they don't meet the [image - # requirements](https://support.google.com/merchants/answer/6324350), for - # example, removing overlays. If successful, the image will be replaced and - # approved. This improvement is only applied to images of disapproved offers. - # For more information see: [Automatic image - # improvements](https://support.google.com/merchants/answer/9242973) - # @!attribute [rw] account_image_improvements_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImageImprovements::ImageImprovementsAccountLevelSettings] - # Optional. Determines how the images should be automatically updated. - # If this field is not present and provided in the update mask, then the - # settings will be deleted. If there are no settings for subaccount, they are - # inherited from aggregator. - # @!attribute [r] effective_allow_automatic_image_improvements - # @return [::Boolean] - # Output only. The effective value of allow_automatic_image_improvements. - # If account_image_improvements_settings is present, then this value is the - # same. Otherwise, it represents the inherited value of the parent account. - # Read-only. - class AutomaticImageImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for the Automatic Image Improvements. - # @!attribute [rw] allow_automatic_image_improvements - # @return [::Boolean] - # Enables automatic image improvements. - class ImageImprovementsAccountLevelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Not available for MCAs - # [accounts](https://support.google.com/merchants/answer/188487). By turning on - # [automatic shipping - # improvements](https://support.google.com/merchants/answer/10027038), - # you are allowing Google to improve the accuracy of your delivery times shown - # to shoppers using Google. More accurate delivery times, especially when - # faster, typically lead to better conversion rates. Google will improve your - # estimated delivery times based on various factors: - # * Delivery address of an order - # * Current handling time and shipping time settings - # * Estimated weekdays or business days - # * Parcel tracking data - # @!attribute [rw] allow_shipping_improvements - # @return [::Boolean] - # Enables automatic shipping improvements. - class AutomaticShippingImprovements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAutomaticImprovements` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the automatic improvements. - # Format: `accounts/{account}/automaticImprovements` - class GetAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateAutomaticImprovements` method. - # @!attribute [rw] automatic_improvements - # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements] - # Required. The new version of the automatic imrovements. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `item_updates` - # - `item_updates.account_level_settings` - # - `image_improvements` - # - `image_improvements.account_level_settings` - # - `shipping_improvements` - # - `shipping_improvements.allow_shipping_improvements` - class UpdateAutomaticImprovementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb deleted file mode 100644 index 0e7e0a4c0677..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the [identity of a - # business](https://support.google.com/merchants/answer/12564247). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - # @!attribute [rw] promotions_consent - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::PromotionsConsent] - # Optional. Whether the identity attributes may be used for promotions. - # @!attribute [rw] black_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # black-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] women_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # women-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] veteran_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # veteran-owned. This optional field will only be available for merchants - # with a business country set to `US`. It is also not applicable for - # marketplaces or marketplace sellers. - # @!attribute [rw] latino_owned - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as being - # latino-owned. This optional field will only be available for merchants with - # a business country set to `US`. It is also not applicable for marketplaces - # or marketplace sellers. - # @!attribute [rw] small_business - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute] - # Optional. Specifies whether the business identifies itself as a small - # business. This optional field will only be available for merchants with a - # business country set to `US`. It is also not applicable for marketplaces. - class BusinessIdentity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All information related to an identity attribute. - # @!attribute [rw] identity_declaration - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity::IdentityAttribute::IdentityDeclaration] - # Required. The declaration of identity for this attribute. - class IdentityAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All possible settings regarding the declaration of an identity. - module IdentityDeclaration - # Default value indicating that no selection was made. - IDENTITY_DECLARATION_UNSPECIFIED = 0 - - # Indicates that the account identifies with the attribute. - SELF_IDENTIFIES_AS = 1 - - # Indicates that the account does not identify with the attribute. - DOES_NOT_SELF_IDENTIFY_AS = 2 - end - end - - # All possible settings regarding promotions related to the business - # identity. - module PromotionsConsent - # Default value indicating that no selection was made. - PROMOTIONS_CONSENT_UNSPECIFIED = 0 - - # Indicates that the account consented to having their business identity - # used for promotions. - PROMOTIONS_CONSENT_GIVEN = 1 - - # Indicates that the account did not consent to having their business - # identity used for promotions. - PROMOTIONS_CONSENT_DENIED = 2 - end - end - - # Request message for the `GetBusinessIdentity` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business identity. - # Format: `accounts/{account}/businessIdentity` - class GetBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessIdentity` method. - # @!attribute [rw] business_identity - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity] - # Required. The new version of the business identity. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb deleted file mode 100644 index 3546fd5ee3a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.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 Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a business. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - # @!attribute [rw] address - # @return [::Google::Type::PostalAddress] - # Optional. The address of the business. - # @!attribute [r] phone - # @return [::Google::Type::PhoneNumber] - # Output only. The phone number of the business. - # @!attribute [r] phone_verification_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::PhoneVerificationState] - # Output only. The phone verification state of the business. - # @!attribute [rw] customer_service - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CustomerService] - # Optional. The customer service of the business. - # @!attribute [rw] korean_business_registration_number - # @return [::String] - # Optional. The 10-digit [Korean business registration - # number](https://support.google.com/merchants/answer/9037766) separated with - # dashes in the format: XXX-XX-XXXXX. - class BusinessInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetBusinessInfo` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the business info. - # Format: `accounts/{account}/businessInfo` - class GetBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateBusinessInfo` method. - # @!attribute [rw] business_info - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo] - # Required. The new version of the business info. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateBusinessInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.rb deleted file mode 100644 index 1acb59925679..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/checkoutsettings.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 Shopping - module Merchant - module Accounts - module V1beta - # Request message for `GetCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class GetCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateCheckoutSettings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the `CheckoutSettings` will be - # created. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The `CheckoutSettings` object to create. - class CreateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateCheckoutSettings` method. - # @!attribute [rw] checkout_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings] - # Required. The updated version of the `CheckoutSettings`. - # The `name` field is used to identify the `CheckoutSettings`. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `eligible_destinations` - # - `uri_settings` - class UpdateCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteCheckoutSettings` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name/identifier of the merchant account. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - class DeleteCheckoutSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [CheckoutSettings](https://support.google.com/merchants/answer/13945960) for - # a specific merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program configuration settings. - # Format: `accounts/{account}/programs/{program}/checkoutSettings` - # @!attribute [rw] uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # URI settings for cart or checkout URL. - # @!attribute [rw] eligible_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Optional. The destinations to which the checkout program applies, valid - # destination values are `SHOPPING_ADS`, `FREE_LISTINGS` - # @!attribute [r] enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. Reflects the merchant enrollment state in `Checkout` program. - # @!attribute [r] review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. Reflects the merchant review state in `Checkout` program. - # This is set based on the data quality reviews of the URL provided by - # the merchant. - # A merchant with enrollment state - # as `ENROLLED` can be in the following review states: `IN_REVIEW`, - # `APPROVED` or `DISAPPROVED`. A merchant must be in an `enrollment_state` of - # `ENROLLED` before a review can begin for the merchant.For more details, - # check the help center doc. - # @!attribute [r] effective_uri_settings - # @return [::Google::Shopping::Merchant::Accounts::V1beta::UriSettings] - # Output only. The effective value of `uri_settings` for a given merchant. If - # account level settings are present then this value will be a copy of url - # settings. Otherwise, it will have the value of the parent account (for only - # marketplace sellers). - # @!attribute [r] effective_enrollment_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutEnrollmentState] - # Output only. The effective value of enrollment_state for a given merchant - # ID. If account level settings are present then this value will be a copy of - # the account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - # @!attribute [r] effective_review_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings::CheckoutReviewState] - # Output only. The effective value of `review_state` for a given merchant ID. - # If account level settings are present then this value will be a copy of the - # account level settings. Otherwise, it will have the value of the parent - # account (for only marketplace sellers). - class CheckoutSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum indicating the enrollment state of merchant in `Checkout` - # program. - module CheckoutEnrollmentState - # Default enrollment state when enrollment state is not specified. - CHECKOUT_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Merchant has not enrolled into the program. - INACTIVE = 1 - - # Merchant has enrolled into the program by providing either an - # account level URL or checkout URLs as part of their feed. - ENROLLED = 2 - - # Merchant has previously enrolled but opted out of the program. - OPTED_OUT = 3 - end - - # Enum indicating the review state of merchant in `Checkout` - # program. - module CheckoutReviewState - # Default review state when review state is not specified. - CHECKOUT_REVIEW_STATE_UNSPECIFIED = 0 - - # Merchant provided URLs are being reviewed for data quality issues. - IN_REVIEW = 1 - - # Merchant account has been approved. Indicates the data quality checks - # have passed. - APPROVED = 2 - - # Merchant account has been disapproved due to data quality issues. - DISAPPROVED = 3 - end - end - - # URL settings for cart or checkout URL. - # @!attribute [rw] checkout_uri_template - # @return [::String] - # Checkout URL template. When the placeholders are expanded will redirect - # the buyer to the merchant checkout page with the item in the cart. For - # more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `checkout_uri_template`, `cart_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cart_uri_template - # @return [::String] - # Cart URL template. When the placeholders are expanded will redirect the - # buyer to the cart page on the merchant website with the selected - # item in cart. For more details, check the [help center - # doc](https://support.google.com/merchants/answer/13945960#method1&zippy=%2Cproduct-level-url-formatting%2Caccount-level-url-formatting) - # - # Note: The following fields are mutually exclusive: `cart_uri_template`, `checkout_uri_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class UriSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb deleted file mode 100644 index 5a79025d60ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Customer service information. - # @!attribute [rw] uri - # @return [::String] - # Optional. The URI where customer service may be found. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address where customer service may be reached. - # @!attribute [rw] phone - # @return [::Google::Type::PhoneNumber] - # Optional. The phone number where customer service may be called. - class CustomerService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb deleted file mode 100644 index 540f0e3bee48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The categories of notifications the user opted into / opted out of. The email - # preferences do not include mandatory announcements as users can't opt out of - # them. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the EmailPreferences. The endpoint is only - # supported for the authenticated user. - # @!attribute [rw] news_and_tips - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences::OptInState] - # Optional. Updates on new features, tips and best practices. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Opt in state of the email preference. - module OptInState - # Opt-in status is not specified. - OPT_IN_STATE_UNSPECIFIED = 0 - - # User has opted out of receiving this type of email. - OPTED_OUT = 1 - - # User has opted in to receiving this type of email. - OPTED_IN = 2 - - # User has opted in to receiving this type of email and the confirmation - # email has been sent, but user has not yet confirmed the opt in (applies - # only to certain countries). - UNCONFIRMED = 3 - end - end - - # Request message for GetEmailPreferences method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `EmailPreferences` resource. - # Format: `accounts/{account}/users/{email}/emailPreferences` - class GetEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateEmailPreferences method. - # @!attribute [rw] email_preferences - # @return [::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences] - # Required. Email Preferences to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateEmailPreferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb deleted file mode 100644 index b8c64f5452ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Google Business Profile (GBP) account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the GBP account. Format: - # `accounts/{account}/gbpAccount/{gbp_account}` - # @!attribute [rw] gbp_account_id - # @return [::String] - # The id of the GBP account. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount::Type] - # The type of the Business Profile. - # @!attribute [rw] gbp_account_name - # @return [::String] - # The name of the Business Profile. - # For personal accounts: Email id of the owner. - # For Business accounts: Name of the Business Account. - # @!attribute [rw] listing_count - # @return [::Integer] - # Number of listings under this account. - class GbpAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the GBP account. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The GBP account is a user account. - USER = 1 - - # The GBP account is a business account. - BUSINESS_ACCOUNT = 2 - end - end - - # Request message for the ListGbpAccounts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the GBP accounts are - # listed. Format: `accounts/{account}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `GbpAccount` resources to return. The - # service returns fewer than this value if the number of gbp accounts is less - # that than the `pageSize`. The default value is 50. The maximum value is - # 1000; If a value higher than the maximum is specified, then the `pageSize` - # will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListGbpAccounts` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListGbpAccounts` must - # match the call that provided the page token. - class ListGbpAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListGbpAccounts method. - # @!attribute [rw] gbp_accounts - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount>] - # The GBP accounts from the specified merchant in the specified country. - # @!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 ListGbpAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkGbpAccount method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource to which the GBP account is - # linked. Format: `accounts/{account}`. - # @!attribute [rw] gbp_email - # @return [::String] - # Required. The email address of the Business Profile account. - class LinkGbpAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkGbpAccount method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkGbpAccountResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb deleted file mode 100644 index 24696e1e3b3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A store's homepage. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the store's homepage. - # Format: `accounts/{account}/homepage` - # @!attribute [rw] uri - # @return [::String] - # Required. The URI (typically a URL) of the store's homepage. - # @!attribute [r] claimed - # @return [::Boolean] - # Output only. Whether the homepage is claimed. See - # https://support.google.com/merchants/answer/176793. - class Homepage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to retrieve. - # Format: `accounts/{account}/homepage` - class GetHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateHomepage` method. - # @!attribute [rw] homepage - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Homepage] - # Required. The new version of the homepage. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ClaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to claim. - # Format: `accounts/{account}/homepage` - class ClaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UnclaimHomepage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the homepage to unclaim. - # Format: `accounts/{account}/homepage` - class UnclaimHomepageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb deleted file mode 100644 index f4a962b34c31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to a Local Feed Partnership (LFP) provider. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LFP provider. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}` - # @!attribute [r] region_code - # @return [::String] - # Output only. Region code defined by [CLDR](https://cldr.unicode.org/). - # @!attribute [rw] display_name - # @return [::String] - # The display name of the LFP provider. - class LfpProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the FindLfpProviders method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource under which the LFP providers are - # found. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpProvider` resources to return. The - # service returns fewer than this value if the number of lfp providers is - # less that than the `pageSize`. The default value is 50. The maximum value - # is 1000; If a value higher than the maximum is specified, then the - # `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `FindLfpProviders` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `FindLfpProviders` must - # match the call that provided the page token. - class FindLfpProvidersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the FindLfpProviders method. - # @!attribute [rw] lfp_providers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>] - # The LFP providers from the specified merchant in the specified country. - # @!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 FindLfpProvidersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the LinkLfpProvider method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LFP provider resource to link. - # Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`. - # The `lfp_provider` is the LFP provider ID. - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The external account ID by which this merchant is known to the - # LFP provider. - class LinkLfpProviderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the LinkLfpProvider method. - # @!attribute [rw] response - # @return [::Google::Protobuf::Empty] - # Empty response. - class LinkLfpProviderResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb deleted file mode 100644 index 17d29142b0ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Collection of information related to the omnichannel settings of a merchant. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the omnichannel setting. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - # @!attribute [rw] region_code - # @return [::String] - # Required. Immutable. Region code defined by - # [CLDR](https://cldr.unicode.org/). Must be provided in the Create method, - # and is immutable. - # @!attribute [rw] lsf_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting::LsfType] - # Required. The Local Store Front type for this country. - # @!attribute [rw] in_stock - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InStock] - # Optional. The InStock URI and state for this country. - # @!attribute [rw] pickup - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Pickup] - # Optional. The Pickup URI and state for this country. - # @!attribute [r] lfp_link - # @return [::Google::Shopping::Merchant::Accounts::V1beta::LfpLink] - # Output only. The established link to a LFP provider. - # @!attribute [rw] odo - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnDisplayToOrder] - # Optional. The On Display to Order (ODO) policy URI and state for this - # country. - # @!attribute [rw] about - # @return [::Google::Shopping::Merchant::Accounts::V1beta::About] - # Optional. The about page URI and state for this country. - # @!attribute [rw] inventory_verification - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification] - # Optional. The inventory verification contact and state for this country. - class OmnichannelSetting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The product page experience type, which is also called the Local Store - # Front (LSF) type. Check the [HC - # article](https://support.google.com/merchants/answer/7178526) for more - # details. - module LsfType - # Default value. This value is unused. - LSF_TYPE_UNSPECIFIED = 0 - - # Google-Hosted Local Store Front. Check the [HC - # article](https://support.google.com/merchants/answer/14869424) for more - # details. - GHLSF = 1 - - # Merchant-Hosted Local Store Front Basic. Check the [HC - # article](https://support.google.com/merchants/answer/14615867) for more - # details. - MHLSF_BASIC = 2 - - # Merchant-Hosted Local Store Front Full. Check the [HC - # article](https://support.google.com/merchants/answer/14617076) for more - # details. - MHLSF_FULL = 3 - end - end - - # The state of a omnichannel setting related review process. - class ReviewState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the review process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The review process has concluded successfully. The reviewed item is - # active. - ACTIVE = 1 - - # The review process failed. - FAILED = 2 - - # The review process is running. - RUNNING = 3 - - # The review process is waiting for the merchant to take action. - ACTION_REQUIRED = 4 - end - end - - # Collection of information related to InStock. - # @!attribute [rw] uri - # @return [::String] - # Optional. Product landing page URI. It is only used for the review of MHLSF - # in-stock serving. This URI domain should match with the business's - # homepage. Required to be empty if the lsf_type is GHLSF, and required when - # the lsf_type is MHLSF_FULL or MHLSF_BASIC. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the in-stock serving. - class InStock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to Pickup. - # @!attribute [rw] uri - # @return [::String] - # Required. Pickup product page URI. It is only used for the review of pickup - # serving. This URI domain should match with the business's homepage. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the pickup serving. - class Pickup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the LFP link. - # @!attribute [rw] lfp_provider - # @return [::String] - # Required. The resource name of the LFP provider. - # Format: `lfpProviders/{lfp_provider}` - # @!attribute [rw] external_account_id - # @return [::String] - # Required. The account ID by which this merchant is known to the LFP - # provider. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the LFP link. - class LfpLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the on display to order - # ([ODO](https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The on display to order (ODO) policy URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class OnDisplayToOrder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to the about page - # ([impressum](https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). - # @!attribute [rw] uri - # @return [::String] - # Required. The about page URI. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the URI. - class About - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Collection of information related to [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::InventoryVerification::State] - # Output only. The state of the inventory verification process. - # @!attribute [rw] contact - # @return [::String] - # Required. The name of the contact for the inventory verification process. - # @!attribute [rw] contact_email - # @return [::String] - # Required. The email address of the contact for the inventory verification - # process. - # @!attribute [r] contact_state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ReviewState::State] - # Output only. The state of the contact verification. - class InventoryVerification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the [inventory - # verification](https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC) - # process. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # When the merchant needs to initiate the inventory - # verification process. The next state is INACTIVE. - ACTION_REQUIRED = 1 - - # When the merchant is ready to request inventory verification. - INACTIVE = 5 - - # The inventory verification process is running. If the merchant is - # rejected, the next state is INACTIVE. - RUNNING = 2 - - # The inventory verification process succeeded. - SUCCEEDED = 3 - - # When merchant fails the inventory verification process and all attempts - # are exhausted. - SUSPENDED = 4 - end - end - - # Request message for the GetOmnichannelSettings method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to retrieve. - # Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class GetOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListOmnichannelSettings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of omnichannel settings. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of omnichannel settings to return. The service - # may return fewer than this value. If unspecified, at most 50 omnichannel - # settings will be returned. The maximum value is 1000; values above 1000 - # will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOmnichannelSettings` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListOmnichannelSettings` - # must match the call that provided the page token. - class ListOmnichannelSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListOmnichannelSettings method. - # @!attribute [rw] omnichannel_settings - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>] - # The omnichannel settings from the specified merchant. - # @!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 ListOmnichannelSettingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateOmnichannelSetting method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this omnichannel setting will be - # created. Format: `accounts/{account}` - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to create. - class CreateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateOmnichannelSetting method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # Required. The omnichannel setting to update. - # - # The omnichannel setting's `name` field is used to identify the - # omnichannel setting to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - # - # The following fields are supported in snake_case only: - # - `lsf_type` - # - `in_stock` - # - `pickup` - # - `odo` - # - `about` - # - `inventory_verification` - # - # Full replacement with wildcard `*`is supported, while empty/implied update - # mask is not. - class UpdateOmnichannelSettingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RequestInventoryVerification method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the omnichannel setting to request inventory - # verification. Format: - # `accounts/{account}/omnichannelSettings/{omnichannel_setting}` - class RequestInventoryVerificationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the RequestInventoryVerification method. - # @!attribute [rw] omnichannel_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting] - # The omnichannel setting that was updated. - class RequestInventoryVerificationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb deleted file mode 100644 index 7e1e51be1a93..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to retrieve. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class GetOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateOnlineReturnPolicy` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which the return policy will be created. - # Format: `accounts/{account}` - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The return policy object to create. - class CreateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateOnlineReturnPolicy` method. The method - # supports field masks and when the mask is provided, only the fields specified - # in the mask are updated. - # @!attribute [rw] online_return_policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy] - # Required. The online return policy to update. - # The online return policy's `name` field is used to identify the - # online return policy to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - # - # The following fields are supported (in both `snake_case` and - # `lowerCamelCase`): - # - # - `accept_defective_only` - # - `accept_exchange` - # - `item_conditions` - # - `policy` - # - `process_refund_days` - # - `restocking_fee` - # - `return_methods` - # - `return_policy_uri` - # - `return_shipping_fee` - class UpdateOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteOnlineReturnPolicy` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the return policy to delete. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - class DeleteOnlineReturnPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account for which to list return policies. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `OnlineReturnPolicy` resources to return. - # The service returns fewer than this value if the number of return policies - # for the given merchant is less that than the `pageSize`. The default value - # is 10. The maximum value is 100; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListOnlineReturnPolicies` - # call. Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListOnlineReturnPolicies` must match the call that provided the page - # token. The token returned as - # {::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListOnlineReturnPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListOnlineReturnPolicies` method. - # @!attribute [rw] online_return_policies - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy>] - # The retrieved return policies. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListOnlineReturnPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # [Online return policy](https://support.google.com/merchants/answer/10220642) - # object. This is currently used to represent return policies for ads and free - # listings programs. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the `OnlineReturnPolicy` resource. - # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}` - # @!attribute [r] return_policy_id - # @return [::String] - # Output only. Return policy ID generated by Google. - # @!attribute [rw] label - # @return [::String] - # Required. Immutable. This field represents the unique user-defined label of - # the return policy. It is important to note that the same label cannot be - # used in different return policies for the same country. Unless a product - # specifies a specific label attribute, policies will be automatically - # labeled as 'default'. To assign a custom return policy to certain product - # groups, follow the instructions provided in the [Return policy label] - # (https://support.google.com/merchants/answer/9445425). - # The label can contain up to 50 characters. - # @!attribute [rw] countries - # @return [::Array<::String>] - # Required. Immutable. The countries of sale where the return policy applies. - # The values must be a valid 2 letter ISO 3166 code. - # @!attribute [rw] policy - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy] - # Optional. The return policy. - # @!attribute [rw] seasonal_overrides - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::SeasonalOverride>] - # Optional. Overrides to the general policy for orders placed during a - # specific set of time intervals. - # @!attribute [rw] restocking_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::RestockingFee] - # Optional. The restocking fee that applies to all return reason categories. - # This would be treated as a free restocking fee if the value is not set. - # @!attribute [rw] return_methods - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnMethod>] - # Optional. The return methods of how customers can return an item. This - # value is required to not be empty unless the type of return policy is - # noReturns. - # @!attribute [rw] item_conditions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ItemCondition>] - # Optional. The item conditions accepted for returns must not be empty unless - # the type of return policy is 'noReturns'. - # @!attribute [rw] return_shipping_fee - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee] - # Optional. The return shipping fee. Should be set only when customer need to - # download and print the return label. - # @!attribute [rw] return_policy_uri - # @return [::String] - # Required. The return policy uri. This can used by Google to do a sanity - # check for the policy. It must be a valid URL. - # @!attribute [rw] accept_defective_only - # @return [::Boolean] - # Optional. This field specifies if merchant - # only accepts defective products for returns. - # @!attribute [rw] process_refund_days - # @return [::Integer] - # Optional. The field specifies the number of - # days it takes for merchants to process refunds. - # @!attribute [rw] accept_exchange - # @return [::Boolean] - # Optional. This field specifies if merchant - # allows customers to exchange products. - # @!attribute [rw] return_label_source - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnLabelSource] - # Optional. The field specifies the return - # label source. - class OnlineReturnPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The return shipping fee. This can either be a fixed fee or a boolean to - # indicate that the customer pays the actual shipping cost. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::ReturnShippingFee::Type] - # Required. Type of return shipping fee. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed return shipping fee amount. This value is only applicable when type - # is `FIXED`. We will treat the return shipping fee as free if type is - # `FIXED` and this value is not set. - class ReturnShippingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return shipping fee types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The return shipping fee is a fixed value. - FIXED = 1 - - # Customers will pay the actual return shipping fee. - CUSTOMER_PAYING_ACTUAL_FEE = 2 - end - end - - # The restocking fee. This can be a flat fee or a micro percent. - # @!attribute [rw] fixed_fee - # @return [::Google::Shopping::Type::Price] - # Fixed restocking fee. - # - # Note: The following fields are mutually exclusive: `fixed_fee`, `micro_percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] micro_percent - # @return [::Integer] - # Percent of total price in micros. 15,000,000 means 15% of the total - # price would be charged. - # - # Note: The following fields are mutually exclusive: `micro_percent`, `fixed_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RestockingFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available policies. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy::Policy::Type] - # Policy type. - # @!attribute [rw] days - # @return [::Integer] - # The number of days items can be returned after delivery, where one day - # is defined as 24 hours after the delivery timestamp. Required for - # `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Return policy types. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # The number of days within which a return is valid after delivery. - NUMBER_OF_DAYS_AFTER_DELIVERY = 1 - - # No returns. - NO_RETURNS = 2 - - # Life time returns. - LIFETIME_RETURNS = 3 - end - end - - # @!attribute [rw] return_days - # @return [::Integer] - # Number of days (from the delivery date) that the product can be - # returned. - # - # Note: The following fields are mutually exclusive: `return_days`, `return_until_date`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_until_date - # @return [::Google::Type::Date] - # Fixed end date until which the product can be returned. - # - # Note: The following fields are mutually exclusive: `return_until_date`, `return_days`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] label - # @return [::String] - # Required. Display name of this seasonal override in Merchant Center. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. Defines the date range when this seasonal override applies. - # Both start_date and end_date are inclusive. - # The dates of the seasonal overrides should not overlap. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Required. seasonal override end date (inclusive). - class SeasonalOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The available return methods. - module ReturnMethod - # Default value. This value is unused. - RETURN_METHOD_UNSPECIFIED = 0 - - # Return by mail. - BY_MAIL = 1 - - # Return in store. - IN_STORE = 2 - - # Return at a kiosk. - AT_A_KIOSK = 3 - end - - # The available item conditions. - module ItemCondition - # Default value. This value is unused. - ITEM_CONDITION_UNSPECIFIED = 0 - - # New. - NEW = 1 - - # Used. - USED = 2 - end - - # The available return label sources. - module ReturnLabelSource - # Default value. This value is unused. - RETURN_LABEL_SOURCE_UNSPECIFIED = 0 - - # Download and print. - DOWNLOAD_AND_PRINT = 1 - - # Label include in the package. - IN_THE_PACKAGE = 2 - - # Customer to provide. - CUSTOMER_RESPONSIBILITY = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb deleted file mode 100644 index 8dd1d729cfe1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The phone verification state. - module PhoneVerificationState - # Default value. This value is unused. - PHONE_VERIFICATION_STATE_UNSPECIFIED = 0 - - # The phone is verified. - PHONE_VERIFICATION_STATE_VERIFIED = 1 - - # The phone is unverified - PHONE_VERIFICATION_STATE_UNVERIFIED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb deleted file mode 100644 index 7a16e89b6c29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Defines participation in a given program for the specified account. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the program. - # Format: `accounts/{account}/programs/{program}` - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a Merchant Center help page describing the program. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Program::State] - # Output only. The participation state of the account in the program. - # @!attribute [r] active_region_codes - # @return [::Array<::String>] - # Output only. The regions in which the account is actively participating in - # the program. Active regions are defined as those where all program - # requirements affecting the regions have been met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country or - # `001` when the program applies globally. - # @!attribute [r] unmet_requirements - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program::Requirement>] - # Output only. The requirements that the account has not yet satisfied that - # are affecting participation in the program. - class Program - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a requirement specified for participation in the program. - # @!attribute [r] title - # @return [::String] - # Output only. Name of the requirement. - # @!attribute [r] documentation_uri - # @return [::String] - # Output only. The URL of a help page describing the requirement. - # @!attribute [r] affected_region_codes - # @return [::Array<::String>] - # Output only. The regions that are currently affected by this requirement - # not being met. - # - # Region codes are defined by [CLDR](https://cldr.unicode.org/). This is - # either a country where the program applies specifically to that country - # or `001` when the program applies globally. - class Requirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible program participation states for the account. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The account is not eligible to participate in the program. - NOT_ELIGIBLE = 1 - - # The account is eligible to participate in the program. - ELIGIBLE = 2 - - # The program is enabled for the account. - ENABLED = 3 - end - end - - # Request message for the GetProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program to retrieve. - # Format: `accounts/{account}/programs/{program}` - class GetProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListPrograms method. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the account for which to retrieve all programs. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of programs to return in a single response. If - # unspecified (or 0), a default size of 1000 is used. The maximum value is - # 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A continuation token, received from a previous `ListPrograms` - # call. Provide this to retrieve the next page. - class ListProgramsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListPrograms method. - # @!attribute [rw] programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Program>] - # The programs for the given account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. If this - # field is omitted, there are no subsequent pages. - class ListProgramsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the EnableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to enable participation for the - # given account. Format: `accounts/{account}/programs/{program}` - class EnableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DisableProgram method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the program for which to disable participation for - # the given account. Format: `accounts/{account}/programs/{program}` - class DisableProgramRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb deleted file mode 100644 index 6757ee510eca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +++ /dev/null @@ -1,195 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Request message for the `GetRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to retrieve. - # Format: `accounts/{account}/regions/{region}` - class GetRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateRegion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to create a region for. - # Format: `accounts/{account}` - # @!attribute [rw] region_id - # @return [::String] - # Required. The identifier for the region, unique over all regions of the - # same account. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The region to create. - class CreateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateRegion` method. - # @!attribute [rw] region - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region] - # Required. The updated region. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The comma-separated field mask indicating the fields to update. - # Example: - # `"displayName,postalCodeArea.regionCode"`. - class UpdateRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the region to delete. - # Format: `accounts/{account}/regions/{region}` - class DeleteRegionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list regions for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of regions to return. The service may return - # fewer than this value. - # If unspecified, at most 50 regions will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListRegions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegions` must - # match the call that provided the page token. - class ListRegionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegions` method. - # @!attribute [rw] regions - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region>] - # The regions from the specified merchant. - # @!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 ListRegionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographic region that you can use as a target with both the - # `RegionalInventory` and `ShippingSettings` services. You can define regions - # as collections of either postal codes or, in some countries, using predefined - # geotargets. For more information, see [Set up regions - # ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) - # for more information. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the region. - # Format: `accounts/{account}/regions/{region}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the region. - # @!attribute [rw] postal_code_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea] - # Optional. A list of postal codes that defines the region area. - # @!attribute [rw] geotarget_area - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region::GeoTargetArea] - # Optional. A list of geotargets that defines the region area. - # @!attribute [r] regional_inventory_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Regional - # Inventory configuration. - # @!attribute [r] shipping_eligible - # @return [::Google::Protobuf::BoolValue] - # Output only. Indicates if the region is eligible for use in the Shipping - # Services configuration. - class Region - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of postal codes that defines the region area. - # Note: All regions defined using postal codes are accessible through the - # account's `ShippingSettings.postalCodeGroups` resource. - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # or the country the postal code group applies to. - # @!attribute [rw] postal_codes - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Region::PostalCodeArea::PostalCodeRange>] - # Required. A range of postal codes. - class PostalCodeArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the region area. - # @!attribute [rw] begin - # @return [::String] - # Required. A postal code or a pattern of the form prefix* denoting the - # inclusive lower bound of the range defining the area. Examples values: - # `94108`, `9410*`, `9*`. - # @!attribute [rw] end - # @return [::String] - # Optional. A postal code or a pattern of the form `prefix*` denoting the - # inclusive upper bound of the range defining the area. It must have the - # same length as postalCodeRangeBegin: if postalCodeRangeBegin is a - # postal code then postalCodeRangeEnd must be a postal code too; if - # postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a - # pattern with the same prefix length. Optional: if not set, then the - # area is defined as being all the postal codes matching - # postalCodeRangeBegin. - class PostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A list of geotargets that defines the region area. - # @!attribute [rw] geotarget_criteria_ids - # @return [::Array<::Integer>] - # Required. A non-empty list of [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (for example, state). - class GeoTargetArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb deleted file mode 100644 index e5456e04275e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +++ /dev/null @@ -1,747 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The merchant account's [shipping - # setting](https://support.google.com/merchants/answer/6069284). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the shipping setting. - # Format: `accounts/{account}/shippingSetting` - # @!attribute [rw] services - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service>] - # Optional. The target account's list of services. - # @!attribute [rw] warehouses - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Warehouse>] - # Optional. A list of warehouses which can be referred to in `services`. - # @!attribute [rw] etag - # @return [::String] - # Required. This field is used for avoid async issue. Make sure shipping - # setting data - # didn't change between get call and insert call. The user should do - # following steps: - # - # 1. Set etag field as empty string for initial shipping setting creation. - # - # 2. After initial creation, call get method to obtain an etag and current - # shipping setting data before call insert. - # - # 3. Modify to wanted shipping setting information. - # - # 4. Call insert method with the wanted shipping setting information with - # the etag obtained from step 2. - # - # 5. If shipping setting data changed between step 2 and step 4. Insert - # request will fail because the etag changes every time the shipping setting - # data changes. User should repeate step 2-4 with the new etag. - class ShippingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping service. - # @!attribute [rw] service_name - # @return [::String] - # Required. Free-form name of the service. Must be unique within target - # account. - # @!attribute [rw] active - # @return [::Boolean] - # Required. A boolean exposing the active status of the shipping service. - # @!attribute [rw] delivery_countries - # @return [::Array<::String>] - # Required. The CLDR territory code of the countries to which the service - # applies. - # @!attribute [rw] currency_code - # @return [::String] - # The CLDR code of the currency to which this service applies. Must match - # that of the prices in rate groups. - # @!attribute [rw] delivery_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::DeliveryTime] - # Required. Time spent in various aspects from order to the delivery of the - # product. - # @!attribute [rw] rate_groups - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::RateGroup>] - # Optional. Shipping rate group definitions. Only the last one is allowed to - # have an empty `applicable_shipping_labels`, which means "everything else". - # The other `applicable_shipping_labels` must not overlap. - # @!attribute [rw] shipment_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::ShipmentType] - # Type of locations this service ships orders to. - # @!attribute [rw] minimum_order_value - # @return [::Google::Shopping::Type::Price] - # Minimum order value for this service. If set, indicates that customers - # will have to spend at least this amount. - # All prices within a service must have the same currency. - # Cannot be set together with minimum_order_value_table. - # @!attribute [rw] minimum_order_value_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable] - # Table of per store minimum order values for the pickup fulfillment type. - # Cannot be set together with minimum_order_value. - # @!attribute [rw] store_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig] - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram>] - # Optional. Loyalty programs that this shipping service is limited to. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of stores your products are delivered from. - # This is only valid for the local delivery shipment type. - # @!attribute [rw] store_service_type - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::StoreServiceType] - # Indicates whether all stores, or selected stores, listed by this - # merchant provide local delivery. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of store codes that provide local delivery. - # If empty, then `all_stores` must be true. - # @!attribute [rw] cutoff_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig] - # Configs related to local delivery ends for the day. - # @!attribute [rw] service_radius - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance] - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - class StoreConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configs related to local delivery ends for the day. - # @!attribute [rw] local_cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Service::StoreConfig::CutoffConfig::LocalCutoffTime] - # Time that local delivery ends for the day. - # @!attribute [rw] store_close_offset_hours - # @return [::Integer] - # Only valid with local delivery fulfillment. Represents cutoff time - # as the number of hours before store closing. Mutually exclusive - # with `local_cutoff_time`. - # @!attribute [rw] no_delivery_post_cutoff - # @return [::Boolean] - # Merchants can opt-out of showing n+1 day local delivery when they have - # a shipping service configured to n day local delivery. For example, if - # the shipping service defines same-day delivery, and it's past the - # cut-off, setting this field to `true` results in the calculated - # shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - # same example, setting this field to `false` results in the calculated - # shipping time being one day. This is only for local delivery. - class CutoffConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Time that local delivery ends for the day. - # @!attribute [rw] hour - # @return [::Integer] - # Hour local delivery orders must be placed by to process the same - # day. - # @!attribute [rw] minute - # @return [::Integer] - # Minute local delivery orders must be placed by to process the same - # day. - class LocalCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Indicates whether all stores, or selected stores, listed by the - # merchant provide local delivery. - module StoreServiceType - # Did not specify store service type. - STORE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Indicates whether all stores, current and future, listed by this - # merchant provide local delivery. - ALL_STORES = 1 - - # Indicates that only the stores listed in `store_codes` are eligible - # for local delivery. - SELECTED_STORES = 2 - end - end - - # [Loyalty program](https://support.google.com/merchants/answer/12922446) - # provided by a merchant. - # @!attribute [rw] program_label - # @return [::String] - # This is the loyalty program label set in your loyalty program settings in - # Merchant Center. This sub-attribute allows Google to map your loyalty - # program to eligible offers. - # @!attribute [rw] loyalty_program_tiers - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Service::LoyaltyProgram::LoyaltyProgramTiers>] - # Optional. Loyalty program tier of this shipping service. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Subset of a merchants loyalty program. - # @!attribute [rw] tier_label - # @return [::String] - # The tier label [tier_label] sub-attribute differentiates offer level - # benefits between each tier. This value is also set in your program - # settings in Merchant Center, and is required for data source changes - # even if your loyalty program only has 1 tier. - class LoyaltyProgramTiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Shipment type of shipping service. - module ShipmentType - # This service did not specify shipment type. - SHIPMENT_TYPE_UNSPECIFIED = 0 - - # This service ships orders to an address chosen by the customer. - DELIVERY = 1 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a local store near by. - LOCAL_DELIVERY = 2 - - # This service ships orders to an address chosen by the customer. - # The order is shipped from a collection point. - COLLECTION_POINT = 3 - end - end - - # Maximum delivery radius. - # This is only required for the local delivery shipment type. - # @!attribute [rw] value - # @return [::Integer] - # Integer value of distance. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Distance::Unit] - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - class Distance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit can differ based on country, it is parameterized to include miles - # and kilometers. - module Unit - # Unit unspecified - UNIT_UNSPECIFIED = 0 - - # Unit in miles - MILES = 1 - - # Unit in kilometers - KILOMETERS = 2 - end - end - - # A fulfillment warehouse, which stores and handles inventory. - # Next tag: 7 - # @!attribute [rw] name - # @return [::String] - # Required. The name of the warehouse. Must be unique within account. - # @!attribute [rw] shipping_address - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Address] - # Required. Shipping address of the warehouse. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::WarehouseCutoffTime] - # Required. The latest time of day that an order can be accepted and begin - # processing. Later orders will be processed in the next day. The time is - # based on the warehouse postal code. - # @!attribute [rw] handling_days - # @return [::Integer] - # Required. The number of days it takes for this warehouse to pack up and - # ship an item. This is on the warehouse level, but can be overridden on the - # offer level based on the attributes of an item. - # @!attribute [rw] business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # Business days of the warehouse. - # If not set, will be Monday to Friday by default. - class Warehouse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The latest time of day that an order can be accepted and begin processing. - # Later orders will be processed in the next day. The time is based on the - # warehouse postal code. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day by the warehouse. Hour is based on the - # timezone of warehouse. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day by the warehouse. Minute is based on the - # timezone of warehouse. - class WarehouseCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping address of the warehouse. - # @!attribute [rw] street_address - # @return [::String] - # Street-level part of the address. For example: `111w 31st Street`. - # @!attribute [rw] city - # @return [::String] - # Required. City, town or commune. May also include dependent localities or - # sublocalities (For example neighborhoods or suburbs). - # @!attribute [rw] administrative_area - # @return [::String] - # Required. Top-level administrative subdivision of the country. For example, - # a state like California ("CA") or a province like Quebec ("QC"). - # @!attribute [rw] postal_code - # @return [::String] - # Required. Postal code or ZIP (For example "94043"). - # @!attribute [rw] region_code - # @return [::String] - # Required. [CLDR country - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # (For example "US"). - class Address - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Time spent in various aspects from order to the delivery of the product. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. - # Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` must be set, but not both. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Maximum number of business days that is spent in transit. 0 means same - # day delivery, 1 means next day delivery. Must be greater than or equal - # to `min_transit_days`. - # @!attribute [rw] cutoff_time - # @return [::Google::Shopping::Merchant::Accounts::V1beta::CutoffTime] - # Business days cutoff time definition. - # If not configured the cutoff time will be defaulted to 8AM PST. - # @!attribute [rw] min_handling_days - # @return [::Integer] - # Minimum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] max_handling_days - # @return [::Integer] - # Maximum number of business days spent before an order is shipped. - # 0 means same day shipped, 1 means next day shipped. - # Must be greater than or equal to `min_handling_days`. - # 'min_handling_days' and 'max_handling_days' should be either set or not set - # at the same time. - # @!attribute [rw] transit_time_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TransitTable] - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] handling_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be handled. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] transit_business_day_config - # @return [::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig] - # The business days during which orders can be in-transit. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] warehouse_based_delivery_times - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::WarehouseBasedDeliveryTime>] - # Optional. Indicates that the delivery time should be calculated per - # warehouse (shipping origin location) based on the settings of the selected - # carrier. When set, no other transit time related field in [delivery - # time][[google.shopping.content.bundles.ShippingSetting.DeliveryTime] should - # be set. - class DeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days cutoff time definition. - # @!attribute [rw] hour - # @return [::Integer] - # Required. Hour of the cutoff time until which an order has to be placed to - # be processed in the same day. - # @!attribute [rw] minute - # @return [::Integer] - # Required. Minute of the cutoff time until which an order has to be placed - # to be processed in the same day. - # @!attribute [rw] time_zone - # @return [::String] - # Required. [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example "Europe/Zurich". - class CutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Business days of the warehouse. - # @!attribute [rw] business_days - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::BusinessDayConfig::Weekday>] - # Required. Regular business days. - # May not be empty. - class BusinessDayConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Weekday - WEEKDAY_UNSPECIFIED = 0 - - MONDAY = 1 - - TUESDAY = 2 - - WEDNESDAY = 3 - - THURSDAY = 4 - - FRIDAY = 5 - - SATURDAY = 6 - - SUNDAY = 7 - end - end - - # Indicates that the delivery time should be calculated per warehouse - # (shipping origin location) based on the settings of the selected carrier. - # When set, no other transit time related field in `delivery_time` should be - # set. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of - # the service must be in the eddSupportedServices list. - # @!attribute [rw] warehouse - # @return [::String] - # Required. Warehouse name. This should match - # [warehouse][ShippingSetting.warehouses.name] - class WarehouseBasedDeliveryTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shipping rate group definitions. Only the last one is allowed to have an - # empty `applicable_shipping_labels`, which means - # "everything else". The other `applicable_shipping_labels` must - # not overlap. - # @!attribute [rw] applicable_shipping_labels - # @return [::Array<::String>] - # Required. A list of [shipping - # labels](https://support.google.com/merchants/answer/6324504) defining the - # products to which this rate group applies to. This is a disjunction: only - # one of the labels has to match for the rate group to apply. May only be - # empty for the last rate group of a service. - # @!attribute [rw] single_value - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Value] - # The value of the rate group (For example flat rate $10). Can only be set - # if `main_table` and `subtables` are not set. - # @!attribute [rw] main_table - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Table] - # A table defining the rate group, when `single_value` is not - # expressive enough. Can only be set if `single_value` is not - # set. - # @!attribute [rw] subtables - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Table>] - # Optional. A list of subtables referred to by `main_table`. Can only - # be set if `main_table` is set. - # @!attribute [rw] carrier_rates - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::CarrierRate>] - # Optional. A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the rate group. - # If set has to be unique within shipping service. - class RateGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A table defining the rate group, when `single_value` is not - # expressive enough. - # @!attribute [rw] name - # @return [::String] - # Name of the table. Required for subtables, ignored for the main table. - # @!attribute [rw] row_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Required. Headers of the table's rows. - # @!attribute [rw] column_headers - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Headers] - # Headers of the table's columns. Optional: if not set then the table has - # only one dimension. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Row>] - # Required. The list of rows that constitute the table. Must have the same - # length as `row_headers`. - class Table - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Transit time table, number of business days spent in transit based on row - # and column dimensions. Either `min_transit_days`, `max_transit_days` or - # `transit_time_table` can be set, but not both. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of region names - # {::Google::Shopping::Merchant::Accounts::V1beta::Region#name Region.name} . The - # last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. - # @!attribute [rw] transit_time_labels - # @return [::Array<::String>] - # Required. A list of transit time labels. The last value can be - # `"all other labels"`. Example: - # `["food", "electronics", "all other labels"]`. - # @!attribute [rw] rows - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow>] - # Required. If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - class TransitTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If there's only one dimension set of `postal_code_group_names` or - # `transit_time_labels`, there are multiple rows each with one value - # for that dimension. If there are two dimensions, each row corresponds to a - # `postal_code_group_names`, and columns (values) to a - # `transit_time_labels`. - # @!attribute [rw] values - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::TransitTable::TransitTimeRow::TransitTimeValue>] - # Required. Transit time range (min-max) in business days. - class TransitTimeRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transit time range (min-max) in business days. - # @!attribute [rw] min_transit_days - # @return [::Integer] - # Minimum transit time range in business days. 0 means same - # day delivery, 1 means next day delivery. - # @!attribute [rw] max_transit_days - # @return [::Integer] - # Must be greater than or equal to `min_transit_days`. - class TransitTimeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Table of per store minimum order values for the pickup fulfillment type. - # @!attribute [rw] store_code_set_with_movs - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::MinimumOrderValueTable::StoreCodeSetWithMov>] - # Required. A list of store code sets sharing the same minimum order value - # (MOV). At least two sets are required and the last one must be empty, which - # signifies 'MOV for all other stores'. Each store code can only appear once - # across all the sets. All prices within a service must have the same - # currency. - class MinimumOrderValueTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of store code sets sharing the same minimum order value. At least - # two sets are required and the last one must be empty, which signifies - # 'MOV for all other stores'. - # Each store code can only appear once across all the sets. - # All prices within a service must have the same currency. - # @!attribute [rw] store_codes - # @return [::Array<::String>] - # Optional. A list of unique store codes or empty for the catch all. - # @!attribute [rw] value - # @return [::Google::Shopping::Type::Price] - # The minimum order value for the given stores. - class StoreCodeSetWithMov - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A non-empty list of row or column headers for a table. - # Exactly one of `prices`, `weights`, - # `num_items`, `postal_code_group_names`, or - # `location` must be set. - # @!attribute [rw] prices - # @return [::Array<::Google::Shopping::Type::Price>] - # Required. A list of inclusive order price upper bounds. The last price's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "currency_code": "USD"}, - # \\{"amount_micros": 500000000, "currency_code": "USD"}, - # \\{"amount_micros": -1, "currency_code": "USD"}]` represents the headers - # "<= $10", "<= $500", and "> $500". All prices within a service must have - # the same currency. Must be non-empty. Must be positive except -1. Can only - # be set if all other fields are not set. - # @!attribute [rw] weights - # @return [::Array<::Google::Shopping::Type::Weight>] - # Required. A list of inclusive order weight upper bounds. The last weight's - # value can be infinity by setting price amount_micros = -1. For example - # `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, - # "unit": "kg"}, - # \\{"amount_micros": -1, "unit": "kg"}]` represents the headers - # "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have - # the same unit. Must be non-empty. Must be positive except -1. Can only be - # set if all other fields are not set. - # @!attribute [rw] number_of_items - # @return [::Array<::String>] - # Required. A list of inclusive number of items upper bounds. The last value - # can be - # `"infinity"`. For example - # `["10", "50", "infinity"]` represents the headers - # "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can - # only be set if all other fields are not set. - # @!attribute [rw] postal_code_group_names - # @return [::Array<::String>] - # Required. A list of postal group names. The last value can be - # `"all other locations"`. Example: - # `["zone 1", "zone 2", "all other locations"]`. The referred - # postal code groups must match the delivery country of the service. Must - # be non-empty. Can only be set if all other fields are not set. - # @!attribute [rw] locations - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::LocationIdSet>] - # Required. A list of location ID sets. Must be non-empty. Can only be set if - # all other fields are not set. - class Headers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of location ID sets. Must be non-empty. Can only be set if all - # other fields are not set. - # @!attribute [rw] location_ids - # @return [::Array<::String>] - # Required. A non-empty list of - # [location - # IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # They must all be of the same location type (For - # example, state). - class LocationIdSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Include a list of cells. - # @!attribute [rw] cells - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::Value>] - # Required. The list of cells that constitute the row. Must have the same - # length as `columnHeaders` for two-dimensional tables, a length of 1 for - # one-dimensional tables. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The single value of a rate group or the value of a rate group table's cell. - # Exactly one of `no_shipping`, `flat_rate`, - # `price_percentage`, `carrier_rateName`, - # `subtable_name` must be set. - # @!attribute [rw] no_shipping - # @return [::Boolean] - # If true, then the product can't be shipped. Must be true when set, can only - # be set if all other fields are not set. - # @!attribute [rw] flat_rate - # @return [::Google::Shopping::Type::Price] - # A flat rate. Can only be set if all other fields are not set. - # @!attribute [rw] price_percentage - # @return [::String] - # A percentage of the price represented as a number in decimal notation - # (For example, `"5.4"`). Can only be set if all other fields are not - # set. - # @!attribute [rw] carrier_rate - # @return [::String] - # The name of a carrier rate referring to a carrier rate defined in the - # same rate group. Can only be set if all other fields are not set. - # @!attribute [rw] subtable - # @return [::String] - # The name of a subtable. Can only be set in table cells (For example, not - # for single values), and only if all other fields are not set. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of carrier rates that can be referred to by - # `main_table` or `single_value`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the carrier rate. Must be unique per rate group. - # @!attribute [rw] carrier - # @return [::String] - # Required. Carrier service, such as `"UPS"` or `"Fedex"`. - # @!attribute [rw] carrier_service - # @return [::String] - # Required. Carrier service, such as `"ground"` or `"2 days"`. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. Shipping origin for this carrier rate. - # @!attribute [rw] percentage_adjustment - # @return [::String] - # Optional. Multiplicative shipping rate modifier as a number in decimal - # notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, - # `"-3"` decreases the rate by 3%. - # @!attribute [rw] flat_adjustment - # @return [::Google::Shopping::Type::Price] - # Optional. Additive shipping rate modifier. Can be negative. For example - # `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, - # `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the - # rate. - class CarrierRate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetShippingSetting` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the shipping setting to retrieve. - # Format: `accounts/{account}/shippingsetting` - class GetShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertShippingSetting` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this product will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] shipping_setting - # @return [::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings] - # Required. The new version of the account. - class InsertShippingSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb deleted file mode 100644 index 5cbe635b16ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Primary type convension - # - # percent micro : 100% = 1 000 000 and 1% = 10 000 - # cannot be negative. - # - # Information about tax nexus and related parameters applicable to orders - # delivered to the area covered by a single tax admin. Nexus is created when a - # merchant is doing business in an area administered by tax admin (only US - # states are supported for nexus configuration). If merchant has nexus in a US - # state, merchant needs to pay tax to all tax authorities associated with - # the shipping destination. - # Next Id : 8 - # @!attribute [rw] location_id - # @return [::Integer] - # The admin_id or criteria_id of the region in which this rule is - # applicable. - # - # Note: The following fields are mutually exclusive: `location_id`, `post_code_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] post_code_range - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TaxRule::TaxPostalCodeRange] - # The range of postal codes in which this rule is applicable. - # - # Note: The following fields are mutually exclusive: `post_code_range`, `location_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] use_google_rate - # @return [::Boolean] - # Rate that depends on delivery location: if merchant has a nexus in - # corresponding US state, rates from authorities with jurisdiction over - # delivery area are added up. - # - # Note: The following fields are mutually exclusive: `use_google_rate`, `self_specified_rate_micros`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] self_specified_rate_micros - # @return [::Integer] - # A fixed rate specified in micros, where 100% = 1_000_000. - # Suitable for origin-based states. - # - # Note: The following fields are mutually exclusive: `self_specified_rate_micros`, `use_google_rate`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_code - # @return [::String] - # Region code in which this rule is applicable - # @!attribute [rw] shipping_taxed - # @return [::Boolean] - # If set, shipping charge is taxed (at the same rate as product) when - # delivering to this admin's area. - # Can only be set on US states without category. - # @!attribute [rw] effective_time_period - # @return [::Google::Type::Interval] - # Required. Time period when this rule is effective. If the duration is - # missing from effective_time listed, then it is open ended to the future. - # The start of this time period is inclusive, and the end is exclusive. - class TaxRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A range of postal codes that defines the area. - # @!attribute [rw] start - # @return [::String] - # Required. The start of the postal code range, which is also the smallest - # in the range. - # @!attribute [rw] end - # @return [::String] - # The end of the postal code range. Will be the same as start if not - # specified. - class TaxPostalCodeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb deleted file mode 100644 index 1b414fd1bccf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A `TermsOfService`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by [CLDR](https://cldr.unicode.org/). This is either - # a country where the ToS applies specifically to that country or `001` when - # the same `TermsOfService` can be signed in any country. However note that - # when signing a ToS that applies globally we still expect that a specific - # country is provided (this should be merchant business country or program - # country of participation). - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # The Kind this terms of service version applies to. - # @!attribute [rw] file_uri - # @return [::String] - # URI for terms of service file that needs to be displayed to signing users. - # @!attribute [rw] external - # @return [::Boolean] - # Whether this terms of service version is external. External terms of - # service versions can only be agreed through external processes and not - # directly by the merchant through UI or API. - class TermsOfService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - class GetTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveLatestTermsOfService` method. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - # @!attribute [rw] kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Required. The Kind this terms of service version applies to. - class RetrieveLatestTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `AcceptTermsOfService` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `termsOfService/{version}` - # @!attribute [rw] account - # @return [::String] - # Required. The account for which to accept the ToS. - # @!attribute [rw] region_code - # @return [::String] - # Required. Region code as defined by [CLDR](https://cldr.unicode.org/). This - # is either a country when the ToS applies specifically to that country or - # 001 when it applies globally. - class AcceptTermsOfServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb deleted file mode 100644 index 0390b017c401..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +++ /dev/null @@ -1,135 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # This resource represents the agreement state for a given account and terms of - # service kind. - # The state is as follows: - # - # * If the merchant has accepted a terms of service: - # [accepted](TermsOfServiceAggrementState.accepted) will be populated, - # otherwise it will be empty - # * If the merchant must sign a terms of service: - # [required](TermsOfServiceAggrementState.required) will be populated, - # otherwise it will be empty. - # - # Note that both [required](TermsOfServiceAggrementState.required) and - # [accepted](TermsOfServiceAggrementState.accepted) can be present. In this - # case the `accepted` terms of services will have an expiration date set in the - # [valid_until](Accepted.valid_until) field. The `required` terms of services - # need to be accepted before `valid_until` in order for the account to continue - # having a valid agreement. When accepting new terms of services we expect 3Ps - # to display the text associated with the given terms of service agreement (the - # url to the file containing the text is added in the Required message below as - # [tos_file_uri](Accepted.tos_file_uri). The actual acceptance of the terms of - # service is done by calling accept on the [TermsOfService](TermsOfService) - # resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - # For example, an identifier could be: `MERCHANT_CENTER-US` - # @!attribute [rw] region_code - # @return [::String] - # Region code as defined by https://cldr.unicode.org/. This is the - # country the current state applies to. - # @!attribute [rw] terms_of_service_kind - # @return [::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceKind] - # Terms of Service kind associated with the particular version. - # @!attribute [rw] accepted - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Accepted] - # The accepted terms of service of this kind and for the associated - # region_code - # @!attribute [rw] required - # @return [::Google::Shopping::Merchant::Accounts::V1beta::Required] - # The required terms of service - class TermsOfServiceAgreementState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the accepted terms of service. - # @!attribute [rw] terms_of_service - # @return [::String] - # The accepted - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService). - # @!attribute [rw] accepted_by - # @return [::String] - # The account where the acceptance was recorded. This can be the account - # itself or, in the case of subaccounts, the MCA account. - # @!attribute [rw] valid_until - # @return [::Google::Type::Date] - # When set, it states that the accepted - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is only valid until the end of this date (in UTC). A new one must be - # accepted before then. The information of the required - # [TermsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # is found in the [Required](Required) message. - class Accepted - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the terms of service which are required to be accepted. - # @!attribute [rw] terms_of_service - # @return [::String] - # The - # [termsOfService](google.shopping.merchant.accounts.v1main.TermsOfService) - # that need to be accepted. - # @!attribute [rw] tos_file_uri - # @return [::String] - # Full URL to the terms of service file. This field is the same as - # [TermsOfService.file_uri](TermsOfService.file_uri), it is added - # here for convenience only. - class Required - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetTermsOfServiceAgreementState` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the terms of service version. - # Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` - # The identifier format is: `{TermsOfServiceKind}-{country}` - class GetTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RetrieveForApplicationTermsOfServiceAgreementState` - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account for which to get a TermsOfServiceAgreementState - # Format: `accounts/{account}` - class RetrieveForApplicationTermsOfServiceAgreementStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb deleted file mode 100644 index 636da0a3420a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # The TermsOfService Kind. - module TermsOfServiceKind - # Default value. This value is unused. - TERMS_OF_SERVICE_KIND_UNSPECIFIED = 0 - - # Merchant Center application. - MERCHANT_CENTER = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb deleted file mode 100644 index 549b2ff4eff2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/user.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! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # A [user](https://support.google.com/merchants/answer/12160472). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the user. - # Format: `accounts/{account}/user/{email}` - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User::State] - # Output only. The state of the user. - # @!attribute [rw] access_rights - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::AccessRight>] - # Optional. The [access - # rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) - # the user has. - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states of a user. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The user is pending confirmation. In this state, the user first needs to - # accept the invitation before performing other actions. - PENDING = 1 - - # The user is verified. - VERIFIED = 2 - end - end - - # Request message for the `GetUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to retrieve. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to retrieve the user corresponding to the caller by - # using `me` rather than an email address as in - # `accounts/{account}/users/me`. - class GetUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateUser` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account for which a user will be - # created. Format: `accounts/{account}` - # @!attribute [rw] user_id - # @return [::String] - # Required. The email address of the user (for example, - # `john.doe@gmail.com`). - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The user to create. - class CreateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteUser` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user to delete. - # Format: `accounts/{account}/users/{email}` - # - # It is also possible to delete the user corresponding to the caller by using - # `me` rather than an email address as in `accounts/{account}/users/me`. - class DeleteUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateUser` method. - # @!attribute [rw] user - # @return [::Google::Shopping::Merchant::Accounts::V1beta::User] - # Required. The new version of the user. - # - # Use `me` to refer to your own email address, for example - # `accounts/{account}/users/me`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListUsers` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of users. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of users to return. The service may return - # fewer than this value. If unspecified, at most 50 users will be returned. - # The maximum value is 100; values above 100 will be coerced to 100 - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListUsers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListUsers` must match - # the call that provided the page token. - class ListUsersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListUsers` method. - # @!attribute [rw] users - # @return [::Array<::Google::Shopping::Merchant::Accounts::V1beta::User>] - # The users from the specified account. - # @!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 ListUsersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb deleted file mode 100644 index 50aab1617c36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/merchant/accounts/v1beta/verificationmailsettings.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - module V1beta - # Settings related to the verification email that is sent after adding a user. - # @!attribute [rw] verification_mail_mode - # @return [::Google::Shopping::Merchant::Accounts::V1beta::VerificationMailSettings::VerificationMailMode] - # Optional. Mode of the verification mail. If not set, the default is - # `SEND_VERIFICATION_MAIL`. - class VerificationMailSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different configuration options for sending a verification email - # when adding a user. - module VerificationMailMode - # Default first member of every enum. Do not use. - VERIFICATION_MAIL_MODE_UNSPECIFIED = 0 - - # An invitation email is sent to the user added shortly after. - SEND_VERIFICATION_MAIL = 1 - - # No invitation email is sent. This can be useful if the user is - # expected to accept the invitation through the API without needing - # another notification. - SUPPRESS_VERIFICATION_MAIL = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Type - # The weight represented as the value in string and the unit. - # @!attribute [rw] amount_micros - # @return [::Integer] - # Required. The weight represented as a number in micros (1 million micros is - # an equivalent to one's currency standard unit, for example, 1 kg = 1000000 - # micros). - # This field can also be set as infinity by setting to -1. - # This field only support -1 and positive value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Type::Weight::WeightUnit] - # Required. The weight unit. - # Acceptable values are: kg and lb - class Weight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The weight unit. - module WeightUnit - # unit unspecified - WEIGHT_UNIT_UNSPECIFIED = 0 - - # lb unit. - POUND = 1 - - # kg unit. - KILOGRAM = 2 - end - end - - # The price represented as a number and currency. - # @!attribute [rw] amount_micros - # @return [::Integer] - # The price represented as a number in micros (1 million micros is an - # equivalent to one's currency standard unit, for example, 1 USD = 1000000 - # micros). - # @!attribute [rw] currency_code - # @return [::String] - # The currency of the price using three-letter acronyms according to [ISO - # 4217](http://en.wikipedia.org/wiki/ISO_4217). - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents custom attributes. Exactly one of `value` or - # `group_values` must not be empty. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute. - # @!attribute [rw] value - # @return [::String] - # The value of the attribute. If `value` is not empty, `group_values` must be - # empty. - # @!attribute [rw] group_values - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Subattributes within this attribute group. If - # `group_values` is not empty, `value` must be empty. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Destinations available for a product. - # - # Destinations are used in Merchant Center to allow you to control where the - # products from your data feed should be displayed. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Destination values. - module DestinationEnum - # Not specified. - DESTINATION_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/google-ads/answer/2454022). - SHOPPING_ADS = 1 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 2 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3057972). - LOCAL_INVENTORY_ADS = 3 - - # [Free listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 4 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 5 - - # [YouTube Shopping](https://support.google.com/merchants/answer/12362804). - YOUTUBE_SHOPPING = 6 - - # Youtube shopping checkout. - YOUTUBE_SHOPPING_CHECKOUT = 7 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 8 - - # [Free vehicle - # listings](https://support.google.com/merchants/answer/11189169). - FREE_VEHICLE_LISTINGS = 9 - - # [Vehicle ads](https://support.google.com/merchants/answer/11189169). - VEHICLE_ADS = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - end - end - - # Reporting contexts that your account and product issues apply to. - # - # Reporting contexts are groups of surfaces and formats for product results on - # Google. They can represent the entire destination (for example, [Shopping - # ads](https://support.google.com/merchants/answer/6149970)) or a subset of - # formats within a destination (for example, [Demand Gen - # ads](https://support.google.com/merchants/answer/13389785)). - class ReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reporting context values. - module ReportingContextEnum - # Not specified. - REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0 - - # [Shopping ads](https://support.google.com/merchants/answer/6149970). - SHOPPING_ADS = 1 - - # Deprecated: Use `DEMAND_GEN_ADS` instead. - # [Discovery and Demand Gen - # ads](https://support.google.com/merchants/answer/13389785). - DISCOVERY_ADS = 2 - - # [Demand Gen ads](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS = 13 - - # [Demand Gen ads on Discover - # surface](https://support.google.com/merchants/answer/13389785). - DEMAND_GEN_ADS_DISCOVER_SURFACE = 14 - - # [Video ads](https://support.google.com/google-ads/answer/6340491). - VIDEO_ADS = 3 - - # [Display ads](https://support.google.com/merchants/answer/6069387). - DISPLAY_ADS = 4 - - # [Local inventory - # ads](https://support.google.com/merchants/answer/3271956). - LOCAL_INVENTORY_ADS = 5 - - # [Vehicle inventory - # ads](https://support.google.com/merchants/answer/11544533). - VEHICLE_INVENTORY_ADS = 6 - - # [Free product - # listings](https://support.google.com/merchants/answer/9199328). - FREE_LISTINGS = 7 - - # [Free product listings on UCP - # checkout](https://developers.google.com/merchant/ucp). - FREE_LISTINGS_UCP_CHECKOUT = 19 - - # [Free local product - # listings](https://support.google.com/merchants/answer/9825611). - FREE_LOCAL_LISTINGS = 8 - - # [Free local vehicle - # listings](https://support.google.com/merchants/answer/11544533). - FREE_LOCAL_VEHICLE_LISTINGS = 9 - - # [Youtube Affiliate](https://support.google.com/youtube/answer/13376398). - YOUTUBE_AFFILIATE = 18 - - # [YouTube - # Shopping](https://support.google.com/merchants/answer/13478370). - YOUTUBE_SHOPPING = 10 - - # [Cloud retail](https://cloud.google.com/solutions/retail). - CLOUD_RETAIL = 11 - - # [Local cloud retail](https://cloud.google.com/solutions/retail). - LOCAL_CLOUD_RETAIL = 12 - - # [Product - # Reviews](https://support.google.com/merchants/answer/14620732). - PRODUCT_REVIEWS = 15 - - # [Merchant - # Reviews](https://developers.google.com/merchant-review-feeds). - MERCHANT_REVIEWS = 16 - - # YouTube Checkout - # . - YOUTUBE_CHECKOUT = 17 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.rb deleted file mode 100644 index f4ad43686e83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/date.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 Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values. - # * A month and day, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * [google.type.TimeOfDay][google.type.TimeOfDay] - # * {::Google::Type::DateTime google.type.DateTime} - # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.rb deleted file mode 100644 index 10625864f3dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/datetime.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 Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year, month, or day are 0, the DateTime is considered not to have a - # specific year, month, or day respectively. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a - # datetime without a month. - # @!attribute [rw] day - # @return [::Integer] - # Optional. Day of month. Must be from 1 to 31 and valid for the year and - # month, or 0 if specifying a datetime without a day. - # @!attribute [rw] hours - # @return [::Integer] - # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults - # to 0 (midnight). An API may choose to allow the value "24:00:00" for - # scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, - # defaults to 0. An API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999, defaults to 0. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone. For example "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number. For example "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb deleted file mode 100644 index 109db1a50c89..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/phone_number.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # An object representing a phone number, suitable as an API wire format. - # - # This representation: - # - # - should not be used for locale-specific formatting of a phone number, such - # as "+1 (650) 253-0000 ext. 123" - # - # - is not designed for efficient storage - # - may not be suitable for dialing - specialized libraries (see references) - # should be used to parse the number for that purpose - # - # To do something meaningful with this number, such as format it for various - # use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. - # - # For instance, in Java this would be: - # - # com.google.type.PhoneNumber wireProto = - # com.google.type.PhoneNumber.newBuilder().build(); - # com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = - # PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); - # if (!wireProto.getExtension().isEmpty()) { - # phoneNumber.setExtension(wireProto.getExtension()); - # } - # - # Reference(s): - # - https://github.com/google/libphonenumber - # @!attribute [rw] e164_number - # @return [::String] - # The phone number, represented as a leading plus sign ('+'), followed by a - # phone number that uses a relaxed ITU E.164 format consisting of the - # country calling code (1 to 3 digits) and the subscriber number, with no - # additional spaces or formatting. For example: - # - # - correct: "+15552220123" - # - # - incorrect: "+1 (555) 222-01234 x123" - # - # The ITU E.164 format limits the latter to 12 digits, but in practice not - # all countries respect that, so we relax that restriction here. - # National-only numbers are not allowed. - # - # References: - # - # - https://www.itu.int/rec/T-REC-E.164-201011-I - # - # - https://en.wikipedia.org/wiki/E.164. - # - # - https://en.wikipedia.org/wiki/List_of_country_calling_codes - # - # Note: The following fields are mutually exclusive: `e164_number`, `short_code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] short_code - # @return [::Google::Type::PhoneNumber::ShortCode] - # A short code. - # - # Reference(s): - # - https://wikipedia.org/wiki/Short_code - # - # Note: The following fields are mutually exclusive: `short_code`, `e164_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] extension - # @return [::String] - # The phone number's extension. The extension is not standardized in ITU - # recommendations, except for being defined as a series of numbers with a - # maximum length of 40 digits. Other than digits, some other dialing - # characters such as ',' (indicating a wait) or '#' may be stored here. - # - # Note that no regions currently use extensions with short codes, so this - # field is normally only set in conjunction with an E.164 number. It is held - # separately from the E.164 number to allow for short code extensions in the - # future. - class PhoneNumber - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An object representing a short code, which is a phone number that is - # typically much shorter than regular phone numbers and can be used to - # address messages in MMS and SMS systems, as well as for abbreviated dialing - # (For example "Text 611 to see how many minutes you have remaining on your - # plan."). - # - # Short codes are restricted to a region and are not internationally - # dialable, which means the same short code can exist in different regions, - # with different usage and pricing, even if those regions share the same - # country calling code (For example: US and CA). - # @!attribute [rw] region_code - # @return [::String] - # Required. The BCP-47 region code of the location where calls to this - # short code can be made, such as "US" and "BB". - # - # Reference(s): - # - http://www.unicode.org/reports/tr35/#unicode_region_subtag - # @!attribute [rw] number - # @return [::String] - # Required. The short code digits, without a leading plus ('+') or country - # calling code. For example "611". - class ShortCode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb deleted file mode 100644 index e49308966533..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/proto_docs/google/type/postal_address.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 postal address, such as for postal delivery or payments - # addresses. With a postal address, a postal service can deliver items to a - # premise, P.O. box, or similar. A postal address is not intended to model - # geographical locations like roads, towns, or mountains. - # - # In typical usage, an address would be created by user input or from importing - # existing data, depending on the type of process. - # - # Advice on address input or editing: - # - # - Use an internationalization-ready address widget such as - # https://github.com/google/libaddressinput. - # - Users should not be presented with UI elements for input or editing of - # fields outside countries where that field is used. - # - # For more guidance on how to use this schema, see: - # https://support.google.com/business/answer/6397478. - # @!attribute [rw] revision - # @return [::Integer] - # The schema revision of the `PostalAddress`. This must be set to 0, which is - # the latest revision. - # - # All new revisions **must** be backward compatible with old revisions. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the country/region of the address. This - # is never inferred and it is up to the user to ensure the value is - # correct. See https://cldr.unicode.org/ and - # https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html - # for details. Example: "CH" for Switzerland. - # @!attribute [rw] language_code - # @return [::String] - # Optional. BCP-47 language code of the contents of this address (if - # known). This is often the UI language of the input form or is expected - # to match one of the languages used in the address' country/region, or their - # transliterated equivalents. - # This can affect formatting in certain countries, but is not critical - # to the correctness of the data and will never affect any validation or - # other non-formatting related operations. - # - # If this value is not known, it should be omitted (rather than specifying a - # possibly incorrect default). - # - # Examples: "zh-Hant", "ja", "ja-Latn", "en". - # @!attribute [rw] postal_code - # @return [::String] - # Optional. Postal code of the address. Not all countries use or require - # postal codes to be present, but where they are used, they may trigger - # additional validation with other parts of the address (for example, - # state or zip code validation in the United States). - # @!attribute [rw] sorting_code - # @return [::String] - # Optional. Additional, country-specific, sorting code. This is not used - # in most regions. Where it is used, the value is either a string like - # "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or just - # a number alone, representing the "sector code" (Jamaica), "delivery area - # indicator" (Malawi) or "post office indicator" (Côte d'Ivoire). - # @!attribute [rw] administrative_area - # @return [::String] - # Optional. Highest administrative subdivision which is used for postal - # addresses of a country or region. - # For example, this can be a state, a province, an oblast, or a prefecture. - # For Spain, this is the province and not the autonomous - # community (for example, "Barcelona" and not "Catalonia"). - # Many countries don't use an administrative area in postal addresses. For - # example, in Switzerland, this should be left unpopulated. - # @!attribute [rw] locality - # @return [::String] - # Optional. Generally refers to the city or town portion of the address. - # Examples: US city, IT comune, UK post town. - # In regions of the world where localities are not well defined or do not fit - # into this structure well, leave `locality` empty and use `address_lines`. - # @!attribute [rw] sublocality - # @return [::String] - # Optional. Sublocality of the address. - # For example, this can be a neighborhood, borough, or district. - # @!attribute [rw] address_lines - # @return [::Array<::String>] - # Unstructured address lines describing the lower levels of an address. - # - # Because values in `address_lines` do not have type information and may - # sometimes contain multiple values in a single field (for example, - # "Austin, TX"), it is important that the line order is clear. The order of - # address lines should be "envelope order" for the country or region of the - # address. In places where this can vary (for example, Japan), - # `address_language` is used to make it explicit (for example, "ja" for - # large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this - # way, the most specific line of an address can be selected based on the - # language. - # - # The minimum permitted structural representation of an address consists - # of a `region_code` with all remaining information placed in the - # `address_lines`. It would be possible to format such an address very - # approximately without geocoding, but no semantic reasoning could be - # made about any of the address components until it was at least - # partially resolved. - # - # Creating an address only containing a `region_code` and `address_lines` and - # then geocoding is the recommended way to handle completely unstructured - # addresses (as opposed to guessing which parts of the address should be - # localities or administrative areas). - # @!attribute [rw] recipients - # @return [::Array<::String>] - # Optional. The recipient at the address. - # This field may, under certain circumstances, contain multiline information. - # For example, it might contain "care of" information. - # @!attribute [rw] organization - # @return [::String] - # Optional. The name of the organization at the address. - class PostalAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/Gemfile deleted file mode 100644 index 1661c67a33c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta", path: "../" -else - gem "google-shopping-merchant-accounts-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-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb deleted file mode 100644 index d2c2f5b7044e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_issue_service/list_account_issues.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_issues call in the AccountIssueService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues. -# -def list_account_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new - - # Call the list_account_issues method. - result = client.list_account_issues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssue. - p item - end -end -# [END merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb deleted file mode 100644 index a6ee5c5ad6a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/get_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax. -# -def get_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new - - # Call the get_account_tax method. - result = client.get_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb deleted file mode 100644 index 05f1f64c9431..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/list_account_tax.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax. -# -def list_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new - - # Call the list_account_tax method. - result = client.list_account_tax request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p item - end -end -# [END merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb deleted file mode 100644 index eac84cb07759..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/account_tax_service/update_account_tax.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account_tax call in the AccountTaxService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax. -# -def update_account_tax - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new - - # Call the update_account_tax method. - result = client.update_account_tax request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AccountTax. - p result -end -# [END merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb deleted file mode 100644 index c4b1730282e8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/create_and_configure_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_and_configure_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account. -# -def create_and_configure_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new - - # Call the create_and_configure_account method. - result = client.create_and_configure_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb deleted file mode 100644 index be1e82db0406..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/delete_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account. -# -def delete_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new - - # Call the delete_account method. - result = client.delete_account request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb deleted file mode 100644 index ce0c105100dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/get_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_GetAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account. -# -def get_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new - - # Call the get_account method. - result = client.get_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_GetAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb deleted file mode 100644 index 507751cb8634..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts. -# -def list_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new - - # Call the list_accounts method. - result = client.list_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb deleted file mode 100644 index 8db5c917e70c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/list_sub_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_sub_accounts call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts. -# -def list_sub_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new - - # Call the list_sub_accounts method. - result = client.list_sub_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Account. - p item - end -end -# [END merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb deleted file mode 100644 index d17466b32f14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/accounts_service/update_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_account call in the AccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account. -# -def update_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new - - # Call the update_account method. - result = client.update_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Account. - p result -end -# [END merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb deleted file mode 100644 index 74c288fe1afe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/get_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings. -# -def get_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new - - # Call the get_autofeed_settings method. - result = client.get_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb deleted file mode 100644 index fdcde06c5e91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/autofeed_settings_service/update_autofeed_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_autofeed_settings call in the AutofeedSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings. -# -def update_autofeed_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new - - # Call the update_autofeed_settings method. - result = client.update_autofeed_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings. - p result -end -# [END merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb deleted file mode 100644 index aae1e325fdef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/get_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements. -# -def get_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new - - # Call the get_automatic_improvements method. - result = client.get_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb deleted file mode 100644 index 846c9557c5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/automatic_improvements_service/update_automatic_improvements.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements. -# -def update_automatic_improvements - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new - - # Call the update_automatic_improvements method. - result = client.update_automatic_improvements request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements. - p result -end -# [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb deleted file mode 100644 index b23cc7bee95a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/get_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity. -# -def get_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new - - # Call the get_business_identity method. - result = client.get_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb deleted file mode 100644 index b6b4835aabd4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_identity_service/update_business_identity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_identity call in the BusinessIdentityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity. -# -def update_business_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new - - # Call the update_business_identity method. - result = client.update_business_identity request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity. - p result -end -# [END merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb deleted file mode 100644 index 7c8d4345e227..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/get_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info. -# -def get_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new - - # Call the get_business_info method. - result = client.get_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb deleted file mode 100644 index cd34a45a3abd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/business_info_service/update_business_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_business_info call in the BusinessInfoService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info. -# -def update_business_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new - - # Call the update_business_info method. - result = client.update_business_info request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo. - p result -end -# [END merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb deleted file mode 100644 index ea2f979f5cd7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/create_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings. -# -def create_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new - - # Call the create_checkout_settings method. - result = client.create_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb deleted file mode 100644 index b7b8c95e0bf3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/delete_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings. -# -def delete_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new - - # Call the delete_checkout_settings method. - result = client.delete_checkout_settings request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb deleted file mode 100644 index c7b80b5590d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/get_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings. -# -def get_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new - - # Call the get_checkout_settings method. - result = client.get_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb deleted file mode 100644 index 4bdc2f2116dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/checkout_settings_service/update_checkout_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_checkout_settings call in the CheckoutSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings. -# -def update_checkout_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new - - # Call the update_checkout_settings method. - result = client.update_checkout_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings. - p result -end -# [END merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb deleted file mode 100644 index f1cfbb47c184..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/get_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences. -# -def get_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new - - # Call the get_email_preferences method. - result = client.get_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb deleted file mode 100644 index efce339f0560..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/email_preferences_service/update_email_preferences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_email_preferences call in the EmailPreferencesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences. -# -def update_email_preferences - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new - - # Call the update_email_preferences method. - result = client.update_email_preferences request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences. - p result -end -# [END merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb deleted file mode 100644 index cb5845dd1e9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/link_gbp_account.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_gbp_account call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account. -# -def link_gbp_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new - - # Call the link_gbp_account method. - result = client.link_gbp_account request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse. - p result -end -# [END merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb deleted file mode 100644 index db5611b0eb27..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/gbp_accounts_service/list_gbp_accounts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_gbp_accounts call in the GbpAccountsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts. -# -def list_gbp_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new - - # Call the list_gbp_accounts method. - result = client.list_gbp_accounts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccount. - p item - end -end -# [END merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb deleted file mode 100644 index 5d6017d56856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/claim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the claim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage. -# -def claim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new - - # Call the claim_homepage method. - result = client.claim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb deleted file mode 100644 index b371da4cfb57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/get_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage. -# -def get_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new - - # Call the get_homepage method. - result = client.get_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_GetHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb deleted file mode 100644 index 7119627b9aeb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/unclaim_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the unclaim_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage. -# -def unclaim_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new - - # Call the unclaim_homepage method. - result = client.unclaim_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb deleted file mode 100644 index 19c3e42071a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/homepage_service/update_homepage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_homepage call in the HomepageService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage. -# -def update_homepage - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new - - # Call the update_homepage method. - result = client.update_homepage request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Homepage. - p result -end -# [END merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb deleted file mode 100644 index e093657726da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/find_lfp_providers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the find_lfp_providers call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers. -# -def find_lfp_providers - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new - - # Call the find_lfp_providers method. - result = client.find_lfp_providers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider. - p item - end -end -# [END merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb deleted file mode 100644 index 0e786754f919..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/lfp_providers_service/link_lfp_provider.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the link_lfp_provider call in the LfpProvidersService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider. -# -def link_lfp_provider - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new - - # Call the link_lfp_provider method. - result = client.link_lfp_provider request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse. - p result -end -# [END merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb deleted file mode 100644 index 925b54971955..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/create_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting. -# -def create_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new - - # Call the create_omnichannel_setting method. - result = client.create_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb deleted file mode 100644 index f41ee01542d3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/get_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting. -# -def get_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new - - # Call the get_omnichannel_setting method. - result = client.get_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb deleted file mode 100644 index 3b764f8ff84d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/list_omnichannel_settings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings. -# -def list_omnichannel_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new - - # Call the list_omnichannel_settings method. - result = client.list_omnichannel_settings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p item - end -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb deleted file mode 100644 index 61b421be1805..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/request_inventory_verification.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the request_inventory_verification call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification. -# -def request_inventory_verification - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new - - # Call the request_inventory_verification method. - result = client.request_inventory_verification request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb deleted file mode 100644 index c9ab04368e53..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/omnichannel_settings_service/update_omnichannel_setting.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting. -# -def update_omnichannel_setting - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new - - # Call the update_omnichannel_setting method. - result = client.update_omnichannel_setting request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting. - p result -end -# [END merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb deleted file mode 100644 index 83bc00b2c1df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/create_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy. -# -def create_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new - - # Call the create_online_return_policy method. - result = client.create_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb deleted file mode 100644 index 642b3bdcdc00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/delete_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy. -# -def delete_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new - - # Call the delete_online_return_policy method. - result = client.delete_online_return_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb deleted file mode 100644 index 2105a2c947a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/get_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy. -# -def get_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new - - # Call the get_online_return_policy method. - result = client.get_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb deleted file mode 100644 index f9a0b2b0a844..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/list_online_return_policies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies. -# -def list_online_return_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new - - # Call the list_online_return_policies method. - result = client.list_online_return_policies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p item - end -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb deleted file mode 100644 index 4034ff554461..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/online_return_policy_service/update_online_return_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy. -# -def update_online_return_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new - - # Call the update_online_return_policy method. - result = client.update_online_return_policy request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy. - p result -end -# [END merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb deleted file mode 100644 index 775a998697dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/disable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the disable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program. -# -def disable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new - - # Call the disable_program method. - result = client.disable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb deleted file mode 100644 index d1bdf22bfbc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/enable_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the enable_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program. -# -def enable_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new - - # Call the enable_program method. - result = client.enable_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb deleted file mode 100644 index ca8e55bfb1f4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/get_program.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_program call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program. -# -def get_program - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new - - # Call the get_program method. - result = client.get_program request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Program. - p result -end -# [END merchantapi_v1beta_generated_ProgramsService_GetProgram_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb deleted file mode 100644 index f3249c03a812..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/programs_service/list_programs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_programs call in the ProgramsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs. -# -def list_programs - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new - - # Call the list_programs method. - result = client.list_programs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Program. - p item - end -end -# [END merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb deleted file mode 100644 index 8b0ad849b120..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/create_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region. -# -def create_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new - - # Call the create_region method. - result = client.create_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_CreateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb deleted file mode 100644 index 97ee0432dab6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/delete_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region. -# -def delete_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new - - # Call the delete_region method. - result = client.delete_region request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb deleted file mode 100644 index 6929030f8c97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/get_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_GetRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region. -# -def get_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new - - # Call the get_region method. - result = client.get_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_GetRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb deleted file mode 100644 index 390e2d0f9420..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/list_regions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_ListRegions_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_regions call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions. -# -def list_regions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new - - # Call the list_regions method. - result = client.list_regions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region. - p item - end -end -# [END merchantapi_v1beta_generated_RegionsService_ListRegions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb deleted file mode 100644 index ef1e556cc578..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/regions_service/update_region.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_region call in the RegionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region. -# -def update_region - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new - - # Call the update_region method. - result = client.update_region request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region. - p result -end -# [END merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb deleted file mode 100644 index e6cbd703b4dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/get_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings. -# -def get_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new - - # Call the get_shipping_settings method. - result = client.get_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb deleted file mode 100644 index 592e8881b30b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/shipping_settings_service/insert_shipping_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the insert_shipping_settings call in the ShippingSettingsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings. -# -def insert_shipping_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new - - # Call the insert_shipping_settings method. - result = client.insert_shipping_settings request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings. - p result -end -# [END merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json deleted file mode 100644 index 519af736323e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ /dev/null @@ -1,2535 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-accounts-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.accounts.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_GetAccountTax_sync", - "title": "Snippet for the get_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax.", - "file": "account_tax_service/get_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#get_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "GetAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.GetAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_ListAccountTax_sync", - "title": "Snippet for the list_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax.", - "file": "account_tax_service/list_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#list_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "ListAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.ListAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountTaxService_UpdateAccountTax_sync", - "title": "Snippet for the update_account_tax call in the AccountTaxService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax.", - "file": "account_tax_service/update_account_tax.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_tax", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client#update_account_tax", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTax", - "client": { - "short_name": "AccountTaxService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client" - }, - "method": { - "short_name": "UpdateAccountTax", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService.UpdateAccountTax", - "service": { - "short_name": "AccountTaxService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountTaxService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountIssueService_ListAccountIssues_sync", - "title": "Snippet for the list_account_issues call in the AccountIssueService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues.", - "file": "account_issue_service/list_account_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_issues", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client#list_account_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse", - "client": { - "short_name": "AccountIssueService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client" - }, - "method": { - "short_name": "ListAccountIssues", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService.ListAccountIssues", - "service": { - "short_name": "AccountIssueService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountIssueService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_GetUser_sync", - "title": "Snippet for the get_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user.", - "file": "user_service/get_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "GetUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.GetUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_CreateUser_sync", - "title": "Snippet for the create_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user.", - "file": "user_service/create_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "CreateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.CreateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_DeleteUser_sync", - "title": "Snippet for the delete_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user.", - "file": "user_service/delete_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "DeleteUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.DeleteUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_UpdateUser_sync", - "title": "Snippet for the update_user call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user.", - "file": "user_service/update_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_user", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::User", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "UpdateUser", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.UpdateUser", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_UserService_ListUsers_sync", - "title": "Snippet for the list_users call in the UserService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users.", - "file": "user_service/list_users.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_users", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse", - "client": { - "short_name": "UserService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client" - }, - "method": { - "short_name": "ListUsers", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService.ListUsers", - "service": { - "short_name": "UserService", - "full_name": "google.shopping.merchant.accounts.v1beta.UserService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_GetAccount_sync", - "title": "Snippet for the get_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account.", - "file": "accounts_service/get_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#get_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "GetAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.GetAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_CreateAndConfigureAccount_sync", - "title": "Snippet for the create_and_configure_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account.", - "file": "accounts_service/create_and_configure_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_and_configure_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#create_and_configure_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "CreateAndConfigureAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.CreateAndConfigureAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_DeleteAccount_sync", - "title": "Snippet for the delete_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account.", - "file": "accounts_service/delete_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#delete_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "DeleteAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.DeleteAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_UpdateAccount_sync", - "title": "Snippet for the update_account call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account.", - "file": "accounts_service/update_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#update_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Account", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "UpdateAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.UpdateAccount", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListAccounts_sync", - "title": "Snippet for the list_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts.", - "file": "accounts_service/list_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AccountsService_ListSubAccounts_sync", - "title": "Snippet for the list_sub_accounts call in the AccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts.", - "file": "accounts_service/list_sub_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sub_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client#list_sub_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse", - "client": { - "short_name": "AccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client" - }, - "method": { - "short_name": "ListSubAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService.ListSubAccounts", - "service": { - "short_name": "AccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_GetAutofeedSettings_sync", - "title": "Snippet for the get_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings.", - "file": "autofeed_settings_service/get_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#get_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "GetAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.GetAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutofeedSettingsService_UpdateAutofeedSettings_sync", - "title": "Snippet for the update_autofeed_settings call in the AutofeedSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings.", - "file": "autofeed_settings_service/update_autofeed_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_autofeed_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client#update_autofeed_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings", - "client": { - "short_name": "AutofeedSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client" - }, - "method": { - "short_name": "UpdateAutofeedSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService.UpdateAutofeedSettings", - "service": { - "short_name": "AutofeedSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_sync", - "title": "Snippet for the get_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements.", - "file": "automatic_improvements_service/get_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#get_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "GetAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_sync", - "title": "Snippet for the update_automatic_improvements call in the AutomaticImprovementsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements.", - "file": "automatic_improvements_service/update_automatic_improvements.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_automatic_improvements", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client#update_automatic_improvements", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements", - "client": { - "short_name": "AutomaticImprovementsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client" - }, - "method": { - "short_name": "UpdateAutomaticImprovements", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", - "service": { - "short_name": "AutomaticImprovementsService", - "full_name": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_sync", - "title": "Snippet for the get_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity.", - "file": "business_identity_service/get_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#get_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "GetBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.GetBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessIdentityService_UpdateBusinessIdentity_sync", - "title": "Snippet for the update_business_identity call in the BusinessIdentityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity.", - "file": "business_identity_service/update_business_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_identity", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client#update_business_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity", - "client": { - "short_name": "BusinessIdentityService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client" - }, - "method": { - "short_name": "UpdateBusinessIdentity", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService.UpdateBusinessIdentity", - "service": { - "short_name": "BusinessIdentityService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_GetBusinessInfo_sync", - "title": "Snippet for the get_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info.", - "file": "business_info_service/get_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#get_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "GetBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.GetBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_BusinessInfoService_UpdateBusinessInfo_sync", - "title": "Snippet for the update_business_info call in the BusinessInfoService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info.", - "file": "business_info_service/update_business_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_business_info", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client#update_business_info", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo", - "client": { - "short_name": "BusinessInfoService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client" - }, - "method": { - "short_name": "UpdateBusinessInfo", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService.UpdateBusinessInfo", - "service": { - "short_name": "BusinessInfoService", - "full_name": "google.shopping.merchant.accounts.v1beta.BusinessInfoService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_GetCheckoutSettings_sync", - "title": "Snippet for the get_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings.", - "file": "checkout_settings_service/get_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#get_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "GetCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.GetCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_CreateCheckoutSettings_sync", - "title": "Snippet for the create_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings.", - "file": "checkout_settings_service/create_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#create_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "CreateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.CreateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_UpdateCheckoutSettings_sync", - "title": "Snippet for the update_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings.", - "file": "checkout_settings_service/update_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#update_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "UpdateCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.UpdateCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_CheckoutSettingsService_DeleteCheckoutSettings_sync", - "title": "Snippet for the delete_checkout_settings call in the CheckoutSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings.", - "file": "checkout_settings_service/delete_checkout_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_checkout_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client#delete_checkout_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CheckoutSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client" - }, - "method": { - "short_name": "DeleteCheckoutSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService.DeleteCheckoutSettings", - "service": { - "short_name": "CheckoutSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.CheckoutSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_GetEmailPreferences_sync", - "title": "Snippet for the get_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences.", - "file": "email_preferences_service/get_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#get_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "GetEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_EmailPreferencesService_UpdateEmailPreferences_sync", - "title": "Snippet for the update_email_preferences call in the EmailPreferencesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences.", - "file": "email_preferences_service/update_email_preferences.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_email_preferences", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client#update_email_preferences", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences", - "client": { - "short_name": "EmailPreferencesService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client" - }, - "method": { - "short_name": "UpdateEmailPreferences", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences", - "service": { - "short_name": "EmailPreferencesService", - "full_name": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_ListGbpAccounts_sync", - "title": "Snippet for the list_gbp_accounts call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts.", - "file": "gbp_accounts_service/list_gbp_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gbp_accounts", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#list_gbp_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "ListGbpAccounts", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_GbpAccountsService_LinkGbpAccount_sync", - "title": "Snippet for the link_gbp_account call in the GbpAccountsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account.", - "file": "gbp_accounts_service/link_gbp_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_gbp_account", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client#link_gbp_account", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse", - "client": { - "short_name": "GbpAccountsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client" - }, - "method": { - "short_name": "LinkGbpAccount", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount", - "service": { - "short_name": "GbpAccountsService", - "full_name": "google.shopping.merchant.accounts.v1beta.GbpAccountsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_GetHomepage_sync", - "title": "Snippet for the get_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage.", - "file": "homepage_service/get_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#get_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "GetHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.GetHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UpdateHomepage_sync", - "title": "Snippet for the update_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage.", - "file": "homepage_service/update_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#update_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UpdateHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UpdateHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_ClaimHomepage_sync", - "title": "Snippet for the claim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage.", - "file": "homepage_service/claim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "claim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#claim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "ClaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.ClaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_HomepageService_UnclaimHomepage_sync", - "title": "Snippet for the unclaim_homepage call in the HomepageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage.", - "file": "homepage_service/unclaim_homepage.rb", - "language": "RUBY", - "client_method": { - "short_name": "unclaim_homepage", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client#unclaim_homepage", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Homepage", - "client": { - "short_name": "HomepageService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client" - }, - "method": { - "short_name": "UnclaimHomepage", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService.UnclaimHomepage", - "service": { - "short_name": "HomepageService", - "full_name": "google.shopping.merchant.accounts.v1beta.HomepageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_FindLfpProviders_sync", - "title": "Snippet for the find_lfp_providers call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers.", - "file": "lfp_providers_service/find_lfp_providers.rb", - "language": "RUBY", - "client_method": { - "short_name": "find_lfp_providers", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#find_lfp_providers", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "FindLfpProviders", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpProvidersService_LinkLfpProvider_sync", - "title": "Snippet for the link_lfp_provider call in the LfpProvidersService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider.", - "file": "lfp_providers_service/link_lfp_provider.rb", - "language": "RUBY", - "client_method": { - "short_name": "link_lfp_provider", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client#link_lfp_provider", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse", - "client": { - "short_name": "LfpProvidersService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client" - }, - "method": { - "short_name": "LinkLfpProvider", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider", - "service": { - "short_name": "LfpProvidersService", - "full_name": "google.shopping.merchant.accounts.v1beta.LfpProvidersService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_GetOmnichannelSetting_sync", - "title": "Snippet for the get_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting.", - "file": "omnichannel_settings_service/get_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#get_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "GetOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.GetOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_ListOmnichannelSettings_sync", - "title": "Snippet for the list_omnichannel_settings call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings.", - "file": "omnichannel_settings_service/list_omnichannel_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_omnichannel_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#list_omnichannel_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "ListOmnichannelSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.ListOmnichannelSettings", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_CreateOmnichannelSetting_sync", - "title": "Snippet for the create_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting.", - "file": "omnichannel_settings_service/create_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#create_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "CreateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.CreateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_UpdateOmnichannelSetting_sync", - "title": "Snippet for the update_omnichannel_setting call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting.", - "file": "omnichannel_settings_service/update_omnichannel_setting.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_omnichannel_setting", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#update_omnichannel_setting", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "UpdateOmnichannelSetting", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.UpdateOmnichannelSetting", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OmnichannelSettingsService_RequestInventoryVerification_sync", - "title": "Snippet for the request_inventory_verification call in the OmnichannelSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification.", - "file": "omnichannel_settings_service/request_inventory_verification.rb", - "language": "RUBY", - "client_method": { - "short_name": "request_inventory_verification", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client#request_inventory_verification", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse", - "client": { - "short_name": "OmnichannelSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client" - }, - "method": { - "short_name": "RequestInventoryVerification", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.RequestInventoryVerification", - "service": { - "short_name": "OmnichannelSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_GetOnlineReturnPolicy_sync", - "title": "Snippet for the get_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy.", - "file": "online_return_policy_service/get_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#get_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "GetOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_ListOnlineReturnPolicies_sync", - "title": "Snippet for the list_online_return_policies call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies.", - "file": "online_return_policy_service/list_online_return_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_online_return_policies", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#list_online_return_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "ListOnlineReturnPolicies", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.ListOnlineReturnPolicies", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_CreateOnlineReturnPolicy_sync", - "title": "Snippet for the create_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy.", - "file": "online_return_policy_service/create_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#create_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "CreateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.CreateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_UpdateOnlineReturnPolicy_sync", - "title": "Snippet for the update_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy.", - "file": "online_return_policy_service/update_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#update_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "UpdateOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.UpdateOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_OnlineReturnPolicyService_DeleteOnlineReturnPolicy_sync", - "title": "Snippet for the delete_online_return_policy call in the OnlineReturnPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy.", - "file": "online_return_policy_service/delete_online_return_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_online_return_policy", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client#delete_online_return_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "OnlineReturnPolicyService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client" - }, - "method": { - "short_name": "DeleteOnlineReturnPolicy", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.DeleteOnlineReturnPolicy", - "service": { - "short_name": "OnlineReturnPolicyService", - "full_name": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_GetProgram_sync", - "title": "Snippet for the get_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program.", - "file": "programs_service/get_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#get_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "GetProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.GetProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_ListPrograms_sync", - "title": "Snippet for the list_programs call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs.", - "file": "programs_service/list_programs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_programs", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#list_programs", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "ListPrograms", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.ListPrograms", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_EnableProgram_sync", - "title": "Snippet for the enable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program.", - "file": "programs_service/enable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#enable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "EnableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.EnableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProgramsService_DisableProgram_sync", - "title": "Snippet for the disable_program call in the ProgramsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program.", - "file": "programs_service/disable_program.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_program", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client#disable_program", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Program", - "client": { - "short_name": "ProgramsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client" - }, - "method": { - "short_name": "DisableProgram", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService.DisableProgram", - "service": { - "short_name": "ProgramsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ProgramsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_GetRegion_sync", - "title": "Snippet for the get_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region.", - "file": "regions_service/get_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#get_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "GetRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.GetRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_CreateRegion_sync", - "title": "Snippet for the create_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region.", - "file": "regions_service/create_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#create_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "CreateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.CreateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_UpdateRegion_sync", - "title": "Snippet for the update_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region.", - "file": "regions_service/update_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#update_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::Region", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "UpdateRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.UpdateRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_DeleteRegion_sync", - "title": "Snippet for the delete_region call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region.", - "file": "regions_service/delete_region.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_region", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#delete_region", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "DeleteRegion", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.DeleteRegion", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionsService_ListRegions_sync", - "title": "Snippet for the list_regions call in the RegionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions.", - "file": "regions_service/list_regions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regions", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client#list_regions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse", - "client": { - "short_name": "RegionsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client" - }, - "method": { - "short_name": "ListRegions", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService.ListRegions", - "service": { - "short_name": "RegionsService", - "full_name": "google.shopping.merchant.accounts.v1beta.RegionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_GetShippingSettings_sync", - "title": "Snippet for the get_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings.", - "file": "shipping_settings_service/get_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#get_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "GetShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.GetShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ShippingSettingsService_InsertShippingSettings_sync", - "title": "Snippet for the insert_shipping_settings call in the ShippingSettingsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings.", - "file": "shipping_settings_service/insert_shipping_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_shipping_settings", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client#insert_shipping_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings", - "client": { - "short_name": "ShippingSettingsService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client" - }, - "method": { - "short_name": "InsertShippingSettings", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService.InsertShippingSettings", - "service": { - "short_name": "ShippingSettingsService", - "full_name": "google.shopping.merchant.accounts.v1beta.ShippingSettingsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync", - "title": "Snippet for the get_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service.", - "file": "terms_of_service_service/get_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "GetTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.GetTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync", - "title": "Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service.", - "file": "terms_of_service_service/retrieve_latest_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_latest_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "RetrieveLatestTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.RetrieveLatestTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync", - "title": "Snippet for the accept_terms_of_service call in the TermsOfServiceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service.", - "file": "terms_of_service_service/accept_terms_of_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "accept_terms_of_service", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TermsOfServiceService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client" - }, - "method": { - "short_name": "AcceptTermsOfService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService.AcceptTermsOfService", - "service": { - "short_name": "TermsOfServiceService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync", - "title": "Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "GetTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.GetTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync", - "title": "Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state.", - "file": "terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_for_application_terms_of_service_agreement_state", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState", - "client": { - "short_name": "TermsOfServiceAgreementStateService::Client", - "full_name": "::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client" - }, - "method": { - "short_name": "RetrieveForApplicationTermsOfServiceAgreementState", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService.RetrieveForApplicationTermsOfServiceAgreementState", - "service": { - "short_name": "TermsOfServiceAgreementStateService", - "full_name": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService" - } - } - }, - "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-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb deleted file mode 100644 index 6002493fa06e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/get_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#get_terms_of_service_agreement_state. -# -def get_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new - - # Call the get_terms_of_service_agreement_state method. - result = client.get_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_GetTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb deleted file mode 100644 index fce83e3ae057..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_agreement_state_service/retrieve_for_application_terms_of_service_agreement_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_for_application_terms_of_service_agreement_state call in the TermsOfServiceAgreementStateService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client#retrieve_for_application_terms_of_service_agreement_state. -# -def retrieve_for_application_terms_of_service_agreement_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new - - # Call the retrieve_for_application_terms_of_service_agreement_state method. - result = client.retrieve_for_application_terms_of_service_agreement_state request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceAgreementStateService_RetrieveForApplicationTermsOfServiceAgreementState_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb deleted file mode 100644 index b1e3c65fd56f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/accept_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the accept_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#accept_terms_of_service. -# -def accept_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new - - # Call the accept_terms_of_service method. - result = client.accept_terms_of_service request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_AcceptTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb deleted file mode 100644 index 72780fd192f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/get_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#get_terms_of_service. -# -def get_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new - - # Call the get_terms_of_service method. - result = client.get_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_GetTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb deleted file mode 100644 index e0039a91db2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/terms_of_service_service/retrieve_latest_terms_of_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the retrieve_latest_terms_of_service call in the TermsOfServiceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client#retrieve_latest_terms_of_service. -# -def retrieve_latest_terms_of_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new - - # Call the retrieve_latest_terms_of_service method. - result = client.retrieve_latest_terms_of_service request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::TermsOfService. - p result -end -# [END merchantapi_v1beta_generated_TermsOfServiceService_RetrieveLatestTermsOfService_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb deleted file mode 100644 index 99337d55834e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/create_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_CreateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the create_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#create_user. -# -def create_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new - - # Call the create_user method. - result = client.create_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_CreateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb deleted file mode 100644 index 07a8a692be99..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/delete_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_DeleteUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the delete_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#delete_user. -# -def delete_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new - - # Call the delete_user method. - result = client.delete_user request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_UserService_DeleteUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb deleted file mode 100644 index 7e279d65f5b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/get_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_GetUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the get_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#get_user. -# -def get_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new - - # Call the get_user method. - result = client.get_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_GetUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb deleted file mode 100644 index 17dca433a258..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/list_users.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_ListUsers_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the list_users call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#list_users. -# -def list_users - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new - - # Call the list_users method. - result = client.list_users request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::User. - p item - end -end -# [END merchantapi_v1beta_generated_UserService_ListUsers_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb deleted file mode 100644 index a39e0c84162a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/snippets/user_service/update_user.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_UserService_UpdateUser_sync] -require "google/shopping/merchant/accounts/v1beta" - -## -# Snippet for the update_user call in the UserService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Accounts::V1beta::UserService::Client#update_user. -# -def update_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new - - # Call the update_user method. - result = client.update_user request - - # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::User. - p result -end -# [END merchantapi_v1beta_generated_UserService_UpdateUser_sync] diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_paths_test.rb deleted file mode 100644 index d759cbee13e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_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/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb deleted file mode 100644 index 3b4c93312537..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_rest_test.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::ServiceStub.stub :transcode_list_account_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_issues_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_issues_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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb deleted file mode 100644 index 1762325f7744..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_issue_service_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accountissue_pb" -require "google/shopping/merchant/accounts/v1beta/account_issue_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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_account_issues - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - time_zone = "hello world" - - list_account_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_issues, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest, 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["language_code"] - assert_equal "hello world", request["time_zone"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_issues_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_issues parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_issues ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_issues({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_issues(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code, time_zone: time_zone), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_issues_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::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::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_paths_test.rb deleted file mode 100644 index f72de9504a1c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_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/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_tax_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_tax_path account: "value0", tax: "value1" - assert_equal "accounts/value0/accounttax/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb deleted file mode 100644 index 2448c1d9965f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_get_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account_tax({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account_tax name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account_tax({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_count - end - end - end - - def test_list_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - http_response = OpenStruct.new 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_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_list_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_count - end - end - end - - def test_update_account_tax - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::ServiceStub.stub :transcode_update_account_tax_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account_tax account_tax: account_tax, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_tax_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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb deleted file mode 100644 index fb9595c10ef5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/account_tax_service_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/account_tax_pb" -require "google/shopping/merchant/accounts/v1beta/account_tax_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account_tax({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account_tax name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account_tax({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountTaxRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_tax_client_stub.call_rpc_count - end - end - - def test_list_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest, 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_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_account_tax parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_account_tax({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountTaxRequest.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_account_tax_client_stub.call_rpc_count - end - end - - def test_update_account_tax - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_tax = {} - update_mask = {} - - update_account_tax_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_tax, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AccountTax), request["account_tax"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_tax_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account_tax account_tax: account_tax, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account_tax ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account_tax({ account_tax: account_tax, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account_tax(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountTaxRequest.new(account_tax: account_tax, 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_account_tax_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::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::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb deleted file mode 100644 index 62d77fd98b02..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb deleted file mode 100644 index 007709ef9bbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_rest_test.rb +++ /dev/null @@ -1,432 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_get_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_count - end - end - end - - def test_create_and_configure_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_create_and_configure_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_and_configure_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_count - end - end - end - - def test_delete_account - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_delete_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_account({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_account name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_account({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_count - end - end - end - - def test_update_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_update_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_account({ account: account, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_account account: account, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_account({ account: account, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_count - end - end - end - - def test_list_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_accounts_client_stub.call_count - end - end - end - - def test_list_sub_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::ServiceStub.stub :transcode_list_sub_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sub_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, 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_sub_accounts_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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb deleted file mode 100644 index b804a96086a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/accounts_service_test.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/accounts_pb" -require "google/shopping/merchant/accounts/v1beta/accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_account ::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_account({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_account(::Google::Shopping::Merchant::Accounts::V1beta::GetAccountRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_client_stub.call_rpc_count - end - end - - def test_create_and_configure_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - users = [{}] - accept_terms_of_service = {} - service = [{}] - - create_and_configure_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_and_configure_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request["users"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AcceptTermsOfService), request["accept_terms_of_service"] - assert request.has_accept_terms_of_service? - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest::AddAccountService, request["service"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_and_configure_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_and_configure_account account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_and_configure_account ::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_and_configure_account({ account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_and_configure_account(::Google::Shopping::Merchant::Accounts::V1beta::CreateAndConfigureAccountRequest.new(account: account, users: users, accept_terms_of_service: accept_terms_of_service, service: service), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_and_configure_account_client_stub.call_rpc_count - end - end - - def test_delete_account - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_account({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_account name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_account ::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_account({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_account(::Google::Shopping::Merchant::Accounts::V1beta::DeleteAccountRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_account_client_stub.call_rpc_count - end - end - - def test_update_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Account.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = {} - update_mask = {} - - update_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Account), request["account"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_account({ account: account, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_account account: account, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_account ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_account({ account: account, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_account(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAccountRequest.new(account: account, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_client_stub.call_rpc_count - end - end - - def test_list_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest, request - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_accounts page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_accounts({ page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_accounts_client_stub.call_rpc_count - end - end - - def test_list_sub_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provider = "hello world" - page_size = 42 - page_token = "hello world" - - list_sub_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sub_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest, request - assert_equal "hello world", request["provider"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sub_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sub_accounts provider: provider, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sub_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sub_accounts({ provider: provider, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sub_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListSubAccountsRequest.new(provider: provider, page_size: page_size, page_token: page_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_sub_accounts_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::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::Shopping::Merchant::Accounts::V1beta::AccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_paths_test.rb deleted file mode 100644 index 0d03f7e27cbf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_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/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.autofeed_settings_path account: "value0" - assert_equal "accounts/value0/autofeedSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb deleted file mode 100644 index e568de354b9e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_get_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_autofeed_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_autofeed_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_autofeed_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_count - end - end - end - - def test_update_autofeed_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::ServiceStub.stub :transcode_update_autofeed_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb deleted file mode 100644 index 81bf70221d6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/autofeed_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/autofeedsettings_pb" -require "google/shopping/merchant/accounts/v1beta/autofeed_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_autofeed_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_autofeed_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_autofeed_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_update_autofeed_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - autofeed_settings = {} - update_mask = {} - - update_autofeed_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_autofeed_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings), request["autofeed_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_autofeed_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_autofeed_settings autofeed_settings: autofeed_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_autofeed_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_autofeed_settings({ autofeed_settings: autofeed_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_autofeed_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new(autofeed_settings: autofeed_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_autofeed_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::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::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_paths_test.rb deleted file mode 100644 index 5432846fad2e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_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/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.automatic_improvements_path account: "value0" - assert_equal "accounts/value0/automaticImprovements", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb deleted file mode 100644 index 3661fc4b5cb9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_get_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_automatic_improvements({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_automatic_improvements name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_automatic_improvements({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_count - end - end - end - - def test_update_automatic_improvements - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::ServiceStub.stub :transcode_update_automatic_improvements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_automatic_improvements_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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb deleted file mode 100644 index e1e55704cfc9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/automatic_improvements_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/automaticimprovements_pb" -require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_automatic_improvements({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_automatic_improvements name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_automatic_improvements({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::GetAutomaticImprovementsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_update_automatic_improvements - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - automatic_improvements = {} - update_mask = {} - - update_automatic_improvements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_automatic_improvements, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovements), request["automatic_improvements"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_automatic_improvements_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_automatic_improvements automatic_improvements: automatic_improvements, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_automatic_improvements ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_automatic_improvements({ automatic_improvements: automatic_improvements, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_automatic_improvements(::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutomaticImprovementsRequest.new(automatic_improvements: automatic_improvements, 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_automatic_improvements_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::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::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_paths_test.rb deleted file mode 100644 index 20f3daac2d1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_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/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_identity_path account: "value0" - assert_equal "accounts/value0/businessIdentity", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb deleted file mode 100644 index d8cf55cffb39..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_get_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_business_identity({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_business_identity name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_business_identity({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_count - end - end - end - - def test_update_business_identity - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::ServiceStub.stub :transcode_update_business_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_business_identity business_identity: business_identity, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_identity_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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb deleted file mode 100644 index 3ba57bd06fbd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_identity_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessidentity_pb" -require "google/shopping/merchant/accounts/v1beta/business_identity_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_business_identity({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_business_identity name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_business_identity({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessIdentityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_identity_client_stub.call_rpc_count - end - end - - def test_update_business_identity - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_identity = {} - update_mask = {} - - update_business_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_identity, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentity), request["business_identity"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_identity_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_business_identity business_identity: business_identity, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_business_identity ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_business_identity({ business_identity: business_identity, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_business_identity(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessIdentityRequest.new(business_identity: business_identity, 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_business_identity_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::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::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_paths_test.rb deleted file mode 100644 index 128cf717a145..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_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/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.business_info_path account: "value0" - assert_equal "accounts/value0/businessInfo", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb deleted file mode 100644 index 1e3541aadd85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_get_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_business_info({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_business_info name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_business_info({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_count - end - end - end - - def test_update_business_info - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::ServiceStub.stub :transcode_update_business_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_business_info business_info: business_info, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_business_info({ business_info: business_info, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_business_info_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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb deleted file mode 100644 index cd6e3250647c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/business_info_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/businessinfo_pb" -require "google/shopping/merchant/accounts/v1beta/business_info_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_business_info({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_business_info name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_business_info ::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_business_info({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_business_info(::Google::Shopping::Merchant::Accounts::V1beta::GetBusinessInfoRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_business_info_client_stub.call_rpc_count - end - end - - def test_update_business_info - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - business_info = {} - update_mask = {} - - update_business_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_business_info, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfo), request["business_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_business_info_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_business_info({ business_info: business_info, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_business_info business_info: business_info, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_business_info ::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_business_info({ business_info: business_info, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_business_info(::Google::Shopping::Merchant::Accounts::V1beta::UpdateBusinessInfoRequest.new(business_info: business_info, 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_business_info_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::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::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_paths_test.rb deleted file mode 100644 index 4f838dc12447..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_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/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.checkout_settings_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1/checkoutSettings", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb deleted file mode 100644 index d1109975a30a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_get_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_count - end - end - end - - def test_create_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_create_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_count - end - end - end - - def test_update_checkout_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_update_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_count - end - end - end - - def test_delete_checkout_settings - # 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_checkout_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::ServiceStub.stub :transcode_delete_checkout_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_checkout_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_checkout_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_checkout_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_checkout_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb deleted file mode 100644 index 238e43a52a09..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/checkout_settings_service_test.rb +++ /dev/null @@ -1,340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/checkoutsettings_pb" -require "google/shopping/merchant/accounts/v1beta/checkout_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetCheckoutSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_checkout_settings_client_stub.call_rpc_count - end - end - - def test_create_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - checkout_settings = {} - - create_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_checkout_settings parent: parent, checkout_settings: checkout_settings do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_checkout_settings({ parent: parent, checkout_settings: checkout_settings }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::CreateCheckoutSettingsRequest.new(parent: parent, checkout_settings: checkout_settings), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_checkout_settings_client_stub.call_rpc_count - end - end - - def test_update_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - checkout_settings = {} - update_mask = {} - - update_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettings), request["checkout_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_checkout_settings checkout_settings: checkout_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_checkout_settings({ checkout_settings: checkout_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::UpdateCheckoutSettingsRequest.new(checkout_settings: checkout_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_checkout_settings_client_stub.call_rpc_count - end - end - - def test_delete_checkout_settings - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_checkout_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_checkout_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_checkout_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_checkout_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_checkout_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_checkout_settings ::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_checkout_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_checkout_settings(::Google::Shopping::Merchant::Accounts::V1beta::DeleteCheckoutSettingsRequest.new(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_checkout_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::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::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_paths_test.rb deleted file mode 100644 index a4b6db6efe0f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_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/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.email_preferences_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1/emailPreferences", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb deleted file mode 100644 index abdc1010bd13..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_get_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_email_preferences({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_email_preferences name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_email_preferences({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_count - end - end - end - - def test_update_email_preferences - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::ServiceStub.stub :transcode_update_email_preferences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_email_preferences_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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb deleted file mode 100644 index 31103ff9a7aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/email_preferences_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/emailpreferences_pb" -require "google/shopping/merchant/accounts/v1beta/email_preferences_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_email_preferences({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_email_preferences name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_email_preferences({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::GetEmailPreferencesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_email_preferences_client_stub.call_rpc_count - end - end - - def test_update_email_preferences - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - email_preferences = {} - update_mask = {} - - update_email_preferences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_email_preferences, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferences), request["email_preferences"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_email_preferences_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_email_preferences email_preferences: email_preferences, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_email_preferences ::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_email_preferences({ email_preferences: email_preferences, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_email_preferences(::Google::Shopping::Merchant::Accounts::V1beta::UpdateEmailPreferencesRequest.new(email_preferences: email_preferences, 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_email_preferences_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::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::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_paths_test.rb deleted file mode 100644 index 28b36c651b32..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_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/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb deleted file mode 100644 index 7d9ec650854d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - http_response = OpenStruct.new 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_gbp_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_list_gbp_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gbp_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_count - end - end - end - - def test_link_gbp_account - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::ServiceStub.stub :transcode_link_gbp_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_gbp_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.link_gbp_account parent: parent, gbp_email: gbp_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_gbp_account_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb deleted file mode 100644 index 0a94b37e7a87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/gbp_accounts_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/gbpaccounts_pb" -require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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_gbp_accounts - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_gbp_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gbp_accounts, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest, 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_gbp_accounts_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gbp_accounts parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gbp_accounts ::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gbp_accounts({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gbp_accounts(::Google::Shopping::Merchant::Accounts::V1beta::ListGbpAccountsRequest.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_gbp_accounts_client_stub.call_rpc_count - end - end - - def test_link_gbp_account - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - gbp_email = "hello world" - - link_gbp_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_gbp_account, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gbp_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_gbp_account_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.link_gbp_account parent: parent, gbp_email: gbp_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.link_gbp_account ::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.link_gbp_account({ parent: parent, gbp_email: gbp_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.link_gbp_account(::Google::Shopping::Merchant::Accounts::V1beta::LinkGbpAccountRequest.new(parent: parent, gbp_email: gbp_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_gbp_account_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::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::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GbpAccountsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_paths_test.rb deleted file mode 100644 index 61d80f67f1a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_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/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.homepage_path account: "value0" - assert_equal "accounts/value0/homepage", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb deleted file mode 100644 index 24f5f703463f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_rest_test.rb +++ /dev/null @@ -1,316 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_get_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_count - end - end - end - - def test_update_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_update_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_homepage homepage: homepage, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_homepage({ homepage: homepage, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_homepage_client_stub.call_count - end - end - end - - def test_claim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_claim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, claim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.claim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.claim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.claim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_count - end - end - end - - def test_unclaim_homepage - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::ServiceStub.stub :transcode_unclaim_homepage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unclaim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.unclaim_homepage({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.unclaim_homepage name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.unclaim_homepage({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unclaim_homepage_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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb deleted file mode 100644 index 541f4c4af0ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/homepage_service_test.rb +++ /dev/null @@ -1,338 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/homepage_pb" -require "google/shopping/merchant/accounts/v1beta/homepage_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_homepage ::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_homepage(::Google::Shopping::Merchant::Accounts::V1beta::GetHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_homepage_client_stub.call_rpc_count - end - end - - def test_update_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - homepage = {} - update_mask = {} - - update_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Homepage), request["homepage"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_homepage({ homepage: homepage, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_homepage homepage: homepage, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_homepage({ homepage: homepage, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UpdateHomepageRequest.new(homepage: homepage, 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_homepage_client_stub.call_rpc_count - end - end - - def test_claim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - claim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :claim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, claim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.claim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.claim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.claim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.claim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.claim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::ClaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, claim_homepage_client_stub.call_rpc_count - end - end - - def test_unclaim_homepage - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Homepage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - unclaim_homepage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unclaim_homepage, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unclaim_homepage_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.unclaim_homepage({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.unclaim_homepage name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.unclaim_homepage ::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.unclaim_homepage({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.unclaim_homepage(::Google::Shopping::Merchant::Accounts::V1beta::UnclaimHomepageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unclaim_homepage_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::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::Shopping::Merchant::Accounts::V1beta::HomepageService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_paths_test.rb deleted file mode 100644 index 40c4e008e3f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_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/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_lfp_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_provider_path account: "value0", omnichannel_setting: "value1", lfp_provider: "value2" - assert_equal "accounts/value0/omnichannelSettings/value1/lfpProviders/value2", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb deleted file mode 100644 index 9441edd6a6fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_find_lfp_providers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, find_lfp_providers_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_count - end - end - end - - def test_link_lfp_provider - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::ServiceStub.stub :transcode_link_lfp_provider_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, link_lfp_provider_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.link_lfp_provider name: name, external_account_id: external_account_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.link_lfp_provider({ name: name, external_account_id: external_account_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, link_lfp_provider_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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb deleted file mode 100644 index 95a5bb2889f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/lfp_providers_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/lfpproviders_pb" -require "google/shopping/merchant/accounts/v1beta/lfp_providers_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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_find_lfp_providers - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - find_lfp_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :find_lfp_providers, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, 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, find_lfp_providers_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.find_lfp_providers parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.find_lfp_providers ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.find_lfp_providers({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.find_lfp_providers(::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.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, find_lfp_providers_client_stub.call_rpc_count - end - end - - def test_link_lfp_provider - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - external_account_id = "hello world" - - link_lfp_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :link_lfp_provider, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["external_account_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, link_lfp_provider_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.link_lfp_provider({ name: name, external_account_id: external_account_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.link_lfp_provider name: name, external_account_id: external_account_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.link_lfp_provider ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.link_lfp_provider({ name: name, external_account_id: external_account_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.link_lfp_provider(::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new(name: name, external_account_id: external_account_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, link_lfp_provider_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::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::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_paths_test.rb deleted file mode 100644 index fda485c81acf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_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/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_omnichannel_setting_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.omnichannel_setting_path account: "value0", omnichannel_setting: "value1" - assert_equal "accounts/value0/omnichannelSettings/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_test.rb deleted file mode 100644 index 4e97a17d0072..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_get_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_omnichannel_setting({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_omnichannel_setting name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_omnichannel_setting({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_count - end - end - end - - def test_list_omnichannel_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - http_response = OpenStruct.new 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_omnichannel_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_list_omnichannel_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_omnichannel_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_count - end - end - end - - def test_create_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_create_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_count - end - end - end - - def test_update_omnichannel_setting - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_update_omnichannel_setting_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_omnichannel_setting_client_stub.call_count - end - end - end - - def test_request_inventory_verification - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.stub :transcode_request_inventory_verification_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, request_inventory_verification_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.request_inventory_verification({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.request_inventory_verification name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.request_inventory_verification({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, request_inventory_verification_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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb deleted file mode 100644 index 54fe923feebb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service_test.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb" -require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_omnichannel_setting({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_omnichannel_setting name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_omnichannel_setting({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_list_omnichannel_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_omnichannel_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_omnichannel_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, 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_omnichannel_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_omnichannel_settings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_omnichannel_settings ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_omnichannel_settings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_omnichannel_settings(::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.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_omnichannel_settings_client_stub.call_rpc_count - end - end - - def test_create_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - omnichannel_setting = {} - - create_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_omnichannel_setting parent: parent, omnichannel_setting: omnichannel_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_omnichannel_setting({ parent: parent, omnichannel_setting: omnichannel_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new(parent: parent, omnichannel_setting: omnichannel_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_update_omnichannel_setting - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - omnichannel_setting = {} - update_mask = {} - - update_omnichannel_setting_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_omnichannel_setting, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting), request["omnichannel_setting"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_omnichannel_setting_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_omnichannel_setting omnichannel_setting: omnichannel_setting, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_omnichannel_setting ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_omnichannel_setting({ omnichannel_setting: omnichannel_setting, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_omnichannel_setting(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new(omnichannel_setting: omnichannel_setting, 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_omnichannel_setting_client_stub.call_rpc_count - end - end - - def test_request_inventory_verification - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - request_inventory_verification_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :request_inventory_verification, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, request_inventory_verification_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.request_inventory_verification({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.request_inventory_verification name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.request_inventory_verification ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.request_inventory_verification({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.request_inventory_verification(::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, request_inventory_verification_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::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::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb deleted file mode 100644 index c8399e11c1e1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_online_return_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.online_return_policy_path account: "value0", return_policy: "value1" - assert_equal "accounts/value0/onlineReturnPolicies/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_test.rb deleted file mode 100644 index 9d60cb71c44e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_rest_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/rest" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_get_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_count - end - end - end - - def test_list_online_return_policies - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - http_response = OpenStruct.new 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_online_return_policies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_list_online_return_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_online_return_policies_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_count - end - end - end - - def test_create_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_create_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_count - end - end - end - - def test_update_online_return_policy - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_update_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_online_return_policy_client_stub.call_count - end - end - end - - def test_delete_online_return_policy - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_online_return_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::ServiceStub.stub :transcode_delete_online_return_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_online_return_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_online_return_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_online_return_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_online_return_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb deleted file mode 100644 index 0cbc348828d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/online_return_policy_service_test.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/online_return_policy_pb" -require "google/shopping/merchant/accounts/v1beta/online_return_policy_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_online_return_policy_client_stub.call_rpc_count - end - end - - def test_list_online_return_policies - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_online_return_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_online_return_policies, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, 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_online_return_policies_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_online_return_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_online_return_policies ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_online_return_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_online_return_policies(::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest.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_online_return_policies_client_stub.call_rpc_count - end - end - - def test_create_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - online_return_policy = {} - - create_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_online_return_policy parent: parent, online_return_policy: online_return_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_online_return_policy({ parent: parent, online_return_policy: online_return_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new(parent: parent, online_return_policy: online_return_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_online_return_policy_client_stub.call_rpc_count - end - end - - def test_update_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - online_return_policy = {} - update_mask = {} - - update_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy), request["online_return_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_online_return_policy online_return_policy: online_return_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_online_return_policy({ online_return_policy: online_return_policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new(online_return_policy: online_return_policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_online_return_policy_client_stub.call_rpc_count - end - end - - def test_delete_online_return_policy - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_online_return_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_online_return_policy, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_online_return_policy_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_online_return_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_online_return_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_online_return_policy ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_online_return_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_online_return_policy(::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new(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_online_return_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::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::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_paths_test.rb deleted file mode 100644 index 380202e72500..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_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/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_program_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.program_path account: "value0", program: "value1" - assert_equal "accounts/value0/programs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb deleted file mode 100644 index 91c368ce6958..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_rest_test.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_get_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_count - end - end - end - - def test_list_programs - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - http_response = OpenStruct.new 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_programs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_list_programs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_programs_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_programs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_count - end - end - end - - def test_enable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_enable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_count - end - end - end - - def test_disable_program - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::ServiceStub.stub :transcode_disable_program_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_program({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_program name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_program({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_program_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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb deleted file mode 100644 index 5d47d7fdf72c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/programs_service_test.rb +++ /dev/null @@ -1,345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/programs_pb" -require "google/shopping/merchant/accounts/v1beta/programs_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_program ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_program(::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_program_client_stub.call_rpc_count - end - end - - def test_list_programs - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_programs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_programs, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, 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_programs_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_programs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_programs ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_programs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_programs(::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest.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_programs_client_stub.call_rpc_count - end - end - - def test_enable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_program ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_program(::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_program_client_stub.call_rpc_count - end - end - - def test_disable_program - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Program.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_program_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_program, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_program_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_program({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_program name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_program ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_program({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_program(::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_program_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::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::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_paths_test.rb deleted file mode 100644 index 698e3d23528b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_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/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_region_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.region_path account: "value0", region: "value1" - assert_equal "accounts/value0/regions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb deleted file mode 100644 index 7a80d1a66e9b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_get_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_count - end - end - end - - def test_create_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_create_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_region({ parent: parent, region_id: region_id, region: region }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_region parent: parent, region_id: region_id, region: region do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_region({ parent: parent, region_id: region_id, region: region }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_count - end - end - end - - def test_update_region - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_update_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_region({ region: region, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_region region: region, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_region({ region: region, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_region_client_stub.call_count - end - end - end - - def test_delete_region - # 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_region_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_delete_region_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_region({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_region name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_region({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_region_client_stub.call_count - end - end - end - - def test_list_regions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - http_response = OpenStruct.new 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_regions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::ServiceStub.stub :transcode_list_regions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_regions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb deleted file mode 100644 index b8d04e0ec14d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/regions_service_test.rb +++ /dev/null @@ -1,409 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/regions_pb" -require "google/shopping/merchant/accounts/v1beta/regions_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_region ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_region(::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_region_client_stub.call_rpc_count - end - end - - def test_create_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - region_id = "hello world" - region = {} - - create_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["region_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_region({ parent: parent, region_id: region_id, region: region }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_region parent: parent, region_id: region_id, region: region do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_region ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_region({ parent: parent, region_id: region_id, region: region }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_region(::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new(parent: parent, region_id: region_id, region: region), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_region_client_stub.call_rpc_count - end - end - - def test_update_region - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::Region.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region = {} - update_mask = {} - - update_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::Region), request["region"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_region({ region: region, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_region region: region, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_region ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_region({ region: region, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_region(::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new(region: region, 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_region_client_stub.call_rpc_count - end - end - - def test_delete_region - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_region_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_region, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_region_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_region({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_region name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_region ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_region({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_region(::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new(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_region_client_stub.call_rpc_count - end - end - - def test_list_regions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_regions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regions, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, 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_regions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_regions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_regions ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_regions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_regions(::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.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_regions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::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::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_paths_test.rb deleted file mode 100644 index 555555c1a601..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_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/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.shipping_settings_path account: "value0" - assert_equal "accounts/value0/shippingSettings", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb deleted file mode 100644 index 12786998e452..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_get_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_shipping_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_shipping_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_shipping_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_count - end - end - end - - def test_insert_shipping_settings - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::ServiceStub.stub :transcode_insert_shipping_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb deleted file mode 100644 index a07f02f18b17..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/shipping_settings_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/shippingsettings_pb" -require "google/shopping/merchant/accounts/v1beta/shipping_settings_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_shipping_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_shipping_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_shipping_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::GetShippingSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_shipping_settings_client_stub.call_rpc_count - end - end - - def test_insert_shipping_settings - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - shipping_setting = {} - - insert_shipping_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_shipping_settings, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettings), request["shipping_setting"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_shipping_settings_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_shipping_settings parent: parent, shipping_setting: shipping_setting do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_shipping_settings ::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_shipping_settings({ parent: parent, shipping_setting: shipping_setting }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.insert_shipping_settings(::Google::Shopping::Merchant::Accounts::V1beta::InsertShippingSettingsRequest.new(parent: parent, shipping_setting: shipping_setting), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_shipping_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::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::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_paths_test.rb deleted file mode 100644 index eecca8da77a7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_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/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_agreement_state_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_agreement_state_path account: "value0", identifier: "value1" - assert_equal "accounts/value0/termsOfServiceAgreementStates/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb deleted file mode 100644 index aa3c6d3f45be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_rest_test.rb +++ /dev/null @@ -1,207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_get_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_terms_of_service_agreement_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_terms_of_service_agreement_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_terms_of_service_agreement_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_count - end - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::ServiceStub.stub :transcode_retrieve_for_application_terms_of_service_agreement_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_for_application_terms_of_service_agreement_state_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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb deleted file mode 100644 index f42810b4c121..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service_test.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_terms_of_service_agreement_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_terms_of_service_agreement_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_terms_of_service_agreement_state({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceAgreementStateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_retrieve_for_application_terms_of_service_agreement_state - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementState.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - retrieve_for_application_terms_of_service_agreement_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_for_application_terms_of_service_agreement_state, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_for_application_terms_of_service_agreement_state_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.retrieve_for_application_terms_of_service_agreement_state parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.retrieve_for_application_terms_of_service_agreement_state ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.retrieve_for_application_terms_of_service_agreement_state({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.retrieve_for_application_terms_of_service_agreement_state(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveForApplicationTermsOfServiceAgreementStateRequest.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, retrieve_for_application_terms_of_service_agreement_state_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_paths_test.rb deleted file mode 100644 index cecc22896b0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_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/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_terms_of_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.terms_of_service_path version: "value0" - assert_equal "termsOfService/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb deleted file mode 100644 index 881bf00a9a36..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_rest_test.rb +++ /dev/null @@ -1,264 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_get_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_terms_of_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_terms_of_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_terms_of_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_count - end - end - end - - def test_retrieve_latest_terms_of_service - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_retrieve_latest_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_count - end - end - end - - def test_accept_terms_of_service - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::ServiceStub.stub :transcode_accept_terms_of_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, accept_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.accept_terms_of_service name: name, account: account, region_code: region_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb deleted file mode 100644 index 2e8bb0f3b620..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/terms_of_service_service_test.rb +++ /dev/null @@ -1,284 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/termsofservice_pb" -require "google/shopping/merchant/accounts/v1beta/terms_of_service_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_terms_of_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_terms_of_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_terms_of_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::GetTermsOfServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_terms_of_service_client_stub.call_rpc_count - end - end - - def test_retrieve_latest_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - region_code = "hello world" - kind = :TERMS_OF_SERVICE_KIND_UNSPECIFIED - - retrieve_latest_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_latest_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest, request - assert_equal "hello world", request["region_code"] - assert_equal :TERMS_OF_SERVICE_KIND_UNSPECIFIED, request["kind"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_latest_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.retrieve_latest_terms_of_service region_code: region_code, kind: kind do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.retrieve_latest_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.retrieve_latest_terms_of_service({ region_code: region_code, kind: kind }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.retrieve_latest_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::RetrieveLatestTermsOfServiceRequest.new(region_code: region_code, kind: kind), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_latest_terms_of_service_client_stub.call_rpc_count - end - end - - def test_accept_terms_of_service - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = "hello world" - region_code = "hello world" - - accept_terms_of_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :accept_terms_of_service, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["account"] - assert_equal "hello world", request["region_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, accept_terms_of_service_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.accept_terms_of_service name: name, account: account, region_code: region_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.accept_terms_of_service ::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.accept_terms_of_service({ name: name, account: account, region_code: region_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.accept_terms_of_service(::Google::Shopping::Merchant::Accounts::V1beta::AcceptTermsOfServiceRequest.new(name: name, account: account, region_code: region_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, accept_terms_of_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::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::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_paths_test.rb deleted file mode 100644 index e71cf60afd5d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_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/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path account: "value0", email: "value1" - assert_equal "accounts/value0/users/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb deleted file mode 100644 index 55c4d6896e48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service/rest" - - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_get_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_count - end - end - end - - def test_create_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_create_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_user({ parent: parent, user_id: user_id, user: user }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_user parent: parent, user_id: user_id, user: user do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_user({ parent: parent, user_id: user_id, user: user }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_count - end - end - end - - def test_delete_user - # 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_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_user({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_user name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_user({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_count - end - end - end - - def test_update_user - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_update_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_user({ user: user, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_user user: user, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_user({ user: user, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_user_client_stub.call_count - end - end - end - - def test_list_users - # Create test objects. - client_result = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - http_response = OpenStruct.new 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_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_users_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_users parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb deleted file mode 100644 index 21191fcbe518..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/google/shopping/merchant/accounts/v1beta/user_service_test.rb +++ /dev/null @@ -1,409 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/accounts/v1beta/user_pb" -require "google/shopping/merchant/accounts/v1beta/user_service" - -class ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_user ::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_user(::Google::Shopping::Merchant::Accounts::V1beta::GetUserRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_user_client_stub.call_rpc_count - end - end - - def test_create_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_id = "hello world" - user = {} - - create_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["user_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_user({ parent: parent, user_id: user_id, user: user }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_user parent: parent, user_id: user_id, user: user do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_user ::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_user({ parent: parent, user_id: user_id, user: user }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_user(::Google::Shopping::Merchant::Accounts::V1beta::CreateUserRequest.new(parent: parent, user_id: user_id, user: user), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_user_client_stub.call_rpc_count - end - end - - def test_delete_user - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_user({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_user name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_user ::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_user({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_user(::Google::Shopping::Merchant::Accounts::V1beta::DeleteUserRequest.new(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_user_client_stub.call_rpc_count - end - end - - def test_update_user - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - user = {} - update_mask = {} - - update_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_user, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Accounts::V1beta::User), request["user"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_user_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_user({ user: user, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_user user: user, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_user ::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_user({ user: user, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_user(::Google::Shopping::Merchant::Accounts::V1beta::UpdateUserRequest.new(user: user, 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_user_client_stub.call_rpc_count - end - end - - def test_list_users - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_users, name - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest, 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_users_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_users parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_users ::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_users({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_users(::Google::Shopping::Merchant::Accounts::V1beta::ListUsersRequest.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_users_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::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::Shopping::Merchant::Accounts::V1beta::UserService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json deleted file mode 100644 index 20ec393175c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1", - "distribution_name": "google-shopping-merchant-conversions-v1", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1 API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml deleted file mode 100644 index dc26bdfd3a23..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-conversions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md deleted file mode 100644 index 6489474b1d66..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1" - -::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md deleted file mode 100644 index e7b96a955e31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Merchant V1 API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1 API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. -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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1/Rakefile deleted file mode 100644 index 09036b63c7b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1" - header "google-shopping-merchant-conversions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/gapic_metadata.json deleted file mode 100644 index c91c1680b96f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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.shopping.merchant.conversions.v1", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec deleted file mode 100644 index 5c67c8439003..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/google-shopping-merchant-conversions-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1" - gem.version = Google::Shopping::Merchant::Conversions::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Note that google-shopping-merchant-conversions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-v1.rb deleted file mode 100644 index 2992146c576e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1.rb deleted file mode 100644 index d3e68a85ea00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/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/shopping/merchant/conversions/v1/conversion_sources_service" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/conversions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service.rb deleted file mode 100644 index ec823442ad31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb deleted file mode 100644 index db5605285d85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/client.rb +++ /dev/null @@ -1,975 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb deleted file mode 100644 index c408f4a3e17b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb deleted file mode 100644 index 58f06044072d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest.rb deleted file mode 100644 index c4ae00d76953..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/version" - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb deleted file mode 100644 index 172557541b57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,890 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "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: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index cba0818d9244..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb deleted file mode 100644 index 4a8730f21f3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/shopping/merchant/conversions/v1/conversionsources.proto\x12\'google.shopping.merchant.conversions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x06\n\x10\x43onversionSource\x12\x62\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12i\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x42.google.shopping.merchant.conversions.v1.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12S\n\x05state\x18\x05 \x01(\x0e\x32?.google.shopping.merchant.conversions.v1.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\ncontroller\x18\x07 \x01(\x0e\x32\x44.google.shopping.merchant.conversions.v1.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xe7\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12m\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12l\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.conversions.v1.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xaa\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32<.google.shopping.merchant.conversions.v1.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12Y\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\"\xb0\x01\n\x1dUpdateConversionSourceRequest\x12Y\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8f\x01\n\x1dListConversionSourcesResponse\x12U\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32\x39.google.shopping.merchant.conversions.v1.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x8e\x0c\n\x18\x43onversionSourcesService\x12\x88\x02\n\x16\x43reateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.CreateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"k\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02J\"5/conversions/v1/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xa0\x02\n\x16UpdateConversionSource\x12\x46.google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"\x82\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02\\2G/conversions/v1/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xbe\x01\n\x16\x44\x65leteConversionSource\x12\x46.google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xea\x01\n\x18UndeleteConversionSource\x12H.google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"I\x82\xd3\xe4\x93\x02\x43\">/conversions/v1/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xdb\x01\n\x13GetConversionSource\x12\x43.google.shopping.merchant.conversions.v1.GetConversionSourceRequest\x1a\x39.google.shopping.merchant.conversions.v1.ConversionSource\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{name=accounts/*/conversionSources/*}\x12\xee\x01\n\x15ListConversionSources\x12\x45.google.shopping.merchant.conversions.v1.ListConversionSourcesRequest\x1a\x46.google.shopping.merchant.conversions.v1.ListConversionSourcesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/conversions/v1/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd9\x02\n+com.google.shopping.merchant.conversions.v1B\x16\x43onversionSourcesProtoP\x01ZScloud.google.com/go/shopping/merchant/conversions/apiv1/conversionspb;conversionspb\xaa\x02\'Google.Shopping.Merchant.Conversions.V1\xca\x02\'Google\\Shopping\\Merchant\\Conversions\\V1\xea\x02+Google::Shopping::Merchant::Conversions::V1\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1 - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb deleted file mode 100644 index 45549ad85a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1/conversionsources.proto for package 'Google.Shopping.Merchant.Conversions.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/shopping/merchant/conversions/v1/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1 - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb deleted file mode 100644 index 851e5c7243ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb deleted file mode 100644 index 09fb85215856..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/lib/google/shopping/merchant/conversions/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb deleted file mode 100644 index f308c62c77bc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/proto_docs/google/shopping/merchant/conversions/v1/conversionsources.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1 - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: `[a-z]{4}:.+` The four characters before - # the colon represent the type of conversion source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # * `galk`: For GoogleAnalyticsLink sources. - # * `mcdn`: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the state of a conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and is currently - # not functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the Youtube Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback window (in days) used for attribution in this source. - # Supported values are `7`, `30` & `40`. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing the type of a conversion event. - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # [models offered by Google Analytics - # 4](https://support.google.com/analytics/answer/10596866). - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1::AttributionSettings] - # Required. Attribution settings used for the Merchant Center Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # The maximum length is 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: `accounts/{account}` - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1::ConversionSource] - # Required. The new version of the conversion source data. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: `accounts/{account}/conversionSources/{conversion_source}` - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) conversion sources. By default, deleted - # conversion sources are not returned. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/Gemfile deleted file mode 100644 index f46fb0f94950..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1", path: "../" -else - gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 827b4a926e65..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index ba6b1ac8bfc2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index d9f971d44b48..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 658a5ab951e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p item - end -end -# [END merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 22afe1c1ac8b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index 67c6808b8b3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1::ConversionSource. - p result -end -# [END merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json b/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json deleted file mode 100644 index 141ac1a9a2fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/snippets/snippet_metadata_google.shopping.merchant.conversions.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_paths_test.rb deleted file mode 100644 index 58ab80ed3978..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_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/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb deleted file mode 100644 index 31c68180521e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb deleted file mode 100644 index 407eedb71e02..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/google/shopping/merchant/conversions/v1/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1/conversionsources_pb" -require "google/shopping/merchant/conversions/v1/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json deleted file mode 100644 index 20e6dffcf926..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta", - "distribution_name": "google-shopping-merchant-conversions-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml deleted file mode 100644 index 6d5086c6f1ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant 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-shopping-merchant-conversions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md deleted file mode 100644 index 2159dc1507a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md deleted file mode 100644 index 63ea9c08d6d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-conversions](https://rubygems.org/gems/google-shopping-merchant-conversions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-conversions-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/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/conversions/v1beta" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new -request = ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new # (request fields as keyword arguments...) -response = client.create_conversion_source request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-conversions-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -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/shopping/merchant/conversions/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-conversions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-conversions-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-shopping-merchant-conversions`. -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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/Rakefile deleted file mode 100644 index df7ec62e5251..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-conversions-v1beta" - header "google-shopping-merchant-conversions-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-conversions-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json deleted file mode 100644 index cb28c69efe62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.conversions.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Conversions::V1beta", - "services": { - "ConversionSourcesService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client", - "rpcs": { - "CreateConversionSource": { - "methods": [ - "create_conversion_source" - ] - }, - "UpdateConversionSource": { - "methods": [ - "update_conversion_source" - ] - }, - "DeleteConversionSource": { - "methods": [ - "delete_conversion_source" - ] - }, - "UndeleteConversionSource": { - "methods": [ - "undelete_conversion_source" - ] - }, - "GetConversionSource": { - "methods": [ - "get_conversion_source" - ] - }, - "ListConversionSources": { - "methods": [ - "list_conversion_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec deleted file mode 100644 index 7e23ef15bbad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/google-shopping-merchant-conversions-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/conversions/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-conversions-v1beta" - gem.version = Google::Shopping::Merchant::Conversions::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-conversions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-conversions instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-v1beta.rb deleted file mode 100644 index 8aae5f49f6d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google-shopping-merchant-conversions-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/shopping/merchant/conversions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb deleted file mode 100644 index efa027bc825f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/conversions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service.rb deleted file mode 100644 index ec937b0d20dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/client" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "conversion_sources_service", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb deleted file mode 100644 index 5b66e173552d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +++ /dev/null @@ -1,975 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - ## - # Client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Conversions", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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/shopping/merchant/conversions/v1beta/conversionsources_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 - - @conversion_sources_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.conversion_source&.name - header_params["conversion_source.name"] = request.conversion_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService API. - # - # This class represents the configuration for ConversionSourcesService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb deleted file mode 100644 index fc78775e84b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Credentials for the ConversionSourcesService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb deleted file mode 100644 index 0957b8b6c5be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Path helper methods for the ConversionSourcesService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ConversionSource resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/conversionSources/{conversion_source}` - # - # @param account [String] - # @param conversion_source [String] - # - # @return [::String] - def conversion_source_path account:, conversion_source: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/conversionSources/#{conversion_source}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest.rb deleted file mode 100644 index 050042f123cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/version" - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/credentials" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/paths" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ## - # Service for managing conversion sources for a merchant account. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module ConversionSourcesService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb deleted file mode 100644 index 36efb49acdb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +++ /dev/null @@ -1,890 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST client for the ConversionSourcesService service. - # - # Service for managing conversion sources for a merchant account. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :conversion_sources_service_stub - - ## - # Configure the ConversionSourcesService Client class. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConversionSourcesService clients - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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", "Shopping", "Merchant", "Conversions", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConversionSourcesService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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 - @conversion_sources_service_stub.universe_domain - end - - ## - # Create a new ConversionSourcesService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConversionSourcesService 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 - - @conversion_sources_service_stub = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @conversion_sources_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 - @conversion_sources_service_stub.logger - end - - # Service calls - - ## - # Creates a new conversion source. - # - # @overload create_conversion_source(request, options = nil) - # Pass arguments to `create_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_conversion_source(parent: nil, conversion_source: nil) - # Pass arguments to `create_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - # - # # Call the create_conversion_source method. - # result = client.create_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def create_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest - - # Converts hash and nil to an 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_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.create_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - # - # @overload update_conversion_source(request, options = nil) - # Pass arguments to `update_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_conversion_source(conversion_source: nil, update_mask: nil) - # Pass arguments to `update_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversion_source [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource, ::Hash] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - # - # # Call the update_conversion_source method. - # result = client.update_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def update_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.update_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - # - # @overload delete_conversion_source(request, options = nil) - # Pass arguments to `delete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_conversion_source(name: nil) - # Pass arguments to `delete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - # - # # Call the delete_conversion_source method. - # result = client.delete_conversion_source request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.delete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - # - # @overload undelete_conversion_source(request, options = nil) - # Pass arguments to `undelete_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_conversion_source(name: nil) - # Pass arguments to `undelete_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - # - # # Call the undelete_conversion_source method. - # result = client.undelete_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def undelete_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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.undelete_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a conversion source. - # - # @overload get_conversion_source(request, options = nil) - # Pass arguments to `get_conversion_source` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_conversion_source(name: nil) - # Pass arguments to `get_conversion_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - # - # # Call the get_conversion_source method. - # result = client.get_conversion_source request - # - # # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p result - # - def get_conversion_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_conversion_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversion_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.get_conversion_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of conversion sources the caller has access to. - # - # @overload list_conversion_sources(request, options = nil) - # Pass arguments to `list_conversion_sources` via a request object, either of type - # {::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_conversion_sources(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) - # Pass arguments to `list_conversion_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @param page_token [::String] - # Optional. Page token. - # @param show_deleted [::Boolean] - # Optional. Show deleted (archived) option. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/conversions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - # - # # Call the list_conversion_sources method. - # result = client.list_conversion_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - # p item - # end - # - def list_conversion_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Conversions::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_conversion_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversion_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @conversion_sources_service_stub.list_conversion_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConversionSourcesService REST API. - # - # This class represents the configuration for ConversionSourcesService 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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_conversion_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::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 ConversionSourcesService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversion_source - ## - # RPC-specific configuration for `update_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_conversion_source - ## - # RPC-specific configuration for `delete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversion_source - ## - # RPC-specific configuration for `undelete_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_conversion_source - ## - # RPC-specific configuration for `get_conversion_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversion_source - ## - # RPC-specific configuration for `list_conversion_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversion_sources - - # @private - def initialize parent_rpcs = nil - create_conversion_source_config = parent_rpcs.create_conversion_source if parent_rpcs.respond_to? :create_conversion_source - @create_conversion_source = ::Gapic::Config::Method.new create_conversion_source_config - update_conversion_source_config = parent_rpcs.update_conversion_source if parent_rpcs.respond_to? :update_conversion_source - @update_conversion_source = ::Gapic::Config::Method.new update_conversion_source_config - delete_conversion_source_config = parent_rpcs.delete_conversion_source if parent_rpcs.respond_to? :delete_conversion_source - @delete_conversion_source = ::Gapic::Config::Method.new delete_conversion_source_config - undelete_conversion_source_config = parent_rpcs.undelete_conversion_source if parent_rpcs.respond_to? :undelete_conversion_source - @undelete_conversion_source = ::Gapic::Config::Method.new undelete_conversion_source_config - get_conversion_source_config = parent_rpcs.get_conversion_source if parent_rpcs.respond_to? :get_conversion_source - @get_conversion_source = ::Gapic::Config::Method.new get_conversion_source_config - list_conversion_sources_config = parent_rpcs.list_conversion_sources if parent_rpcs.respond_to? :list_conversion_sources - @list_conversion_sources = ::Gapic::Config::Method.new list_conversion_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb deleted file mode 100644 index fe73baae518b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - module Rest - ## - # REST service stub for the ConversionSourcesService 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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def create_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def update_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def undelete_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # A result object deserialized from the server's reply - def get_conversion_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversion_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_conversion_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse] - # A result object deserialized from the server's reply - def list_conversion_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversion_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_conversion_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.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_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest] - # 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_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - body: "conversion_source", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/conversions/v1beta/{conversion_source.name}", - body: "conversion_source", - matches: [ - ["conversion_source.name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/conversions/v1beta/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversion_source REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_conversion_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/conversionSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversion_sources REST call - # - # @param request_pb [::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_conversion_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/conversions/v1beta/{parent}/conversionSources", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb deleted file mode 100644 index e7ee072fd173..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/conversions/v1beta/conversionsources.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/conversions/v1beta/conversionsources.proto\x12+google.shopping.merchant.conversions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x06\n\x10\x43onversionSource\x12\x66\n\x15google_analytics_link\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLinkB\x03\xe0\x41\x05H\x00\x12m\n\x1bmerchant_center_destination\x18\x04 \x01(\x0b\x32\x46.google.shopping.merchant.conversions.v1beta.MerchantCenterDestinationH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12W\n\x05state\x18\x05 \x01(\x0e\x32\x43.google.shopping.merchant.conversions.v1beta.ConversionSource.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x61\n\ncontroller\x18\x07 \x01(\x0e\x32H.google.shopping.merchant.conversions.v1beta.ConversionSource.ControllerB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41RCHIVED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\"N\n\nController\x12\x1a\n\x16\x43ONTROLLER_UNSPECIFIED\x10\x00\x12\x0c\n\x08MERCHANT\x10\x01\x12\x16\n\x12YOUTUBE_AFFILIATES\x10\x02:\x90\x01\xea\x41\x8c\x01\n+merchantapi.googleapis.com/ConversionSource\x12\x38\x61\x63\x63ounts/{account}/conversionSources/{conversion_source}*\x11\x63onversionSources2\x10\x63onversionSourceB\r\n\x0bsource_data\"\xef\x04\n\x13\x41ttributionSettings\x12-\n attribution_lookback_window_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12q\n\x11\x61ttribution_model\x18\x02 \x01(\x0e\x32Q.google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModelB\x03\xe0\x41\x02\x12p\n\x0f\x63onversion_type\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionTypeB\x06\xe0\x41\x06\xe0\x41\x05\x1a\x38\n\x0e\x43onversionType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06report\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\x89\x02\n\x10\x41ttributionModel\x12!\n\x1d\x41TTRIBUTION_MODEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x43ROSS_CHANNEL_LAST_CLICK\x10\x01\x12\x1c\n\x18\x41\x44S_PREFERRED_LAST_CLICK\x10\x02\x12\x1d\n\x19\x43ROSS_CHANNEL_DATA_DRIVEN\x10\x05\x12\x1d\n\x19\x43ROSS_CHANNEL_FIRST_CLICK\x10\x06\x12\x18\n\x14\x43ROSS_CHANNEL_LINEAR\x10\x07\x12 \n\x1c\x43ROSS_CHANNEL_POSITION_BASED\x10\x08\x12\x1c\n\x18\x43ROSS_CHANNEL_TIME_DECAY\x10\t\"\xae\x01\n\x13GoogleAnalyticsLink\x12\x1b\n\x0bproperty_id\x18\x01 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x03\x12\x15\n\x08property\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x19MerchantCenterDestination\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x63\n\x14\x61ttribution_settings\x18\x02 \x01(\x0b\x32@.google.shopping.merchant.conversions.v1beta.AttributionSettingsB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xc3\x01\n\x1d\x43reateConversionSourceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12]\n\x11\x63onversion_source\x18\x02 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\"\xb4\x01\n\x1dUpdateConversionSourceRequest\x12]\n\x11\x63onversion_source\x18\x01 \x01(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSourceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"b\n\x1d\x44\x65leteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"d\n\x1fUndeleteConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"_\n\x1aGetConversionSourceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+merchantapi.googleapis.com/ConversionSource\"\xaf\x01\n\x1cListConversionSourcesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+merchantapi.googleapis.com/ConversionSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x93\x01\n\x1dListConversionSourcesResponse\x12Y\n\x12\x63onversion_sources\x18\x01 \x03(\x0b\x32=.google.shopping.merchant.conversions.v1beta.ConversionSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd2\x0c\n\x18\x43onversionSourcesService\x12\x94\x02\n\x16\x43reateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"o\xda\x41\x18parent,conversion_source\x82\xd3\xe4\x93\x02N\"9/conversions/v1beta/{parent=accounts/*}/conversionSources:\x11\x63onversion_source\x12\xac\x02\n\x16UpdateConversionSource\x12J.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"\x86\x01\xda\x41\x1d\x63onversion_source,update_mask\x82\xd3\xe4\x93\x02`2K/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}:\x11\x63onversion_source\x12\xc6\x01\n\x16\x44\x65leteConversionSource\x12J.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest\x1a\x16.google.protobuf.Empty\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xf6\x01\n\x18UndeleteConversionSource\x12L.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"M\x82\xd3\xe4\x93\x02G\"B/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete:\x01*\x12\xe7\x01\n\x13GetConversionSource\x12G.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest\x1a=.google.shopping.merchant.conversions.v1beta.ConversionSource\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{name=accounts/*/conversionSources/*}\x12\xfa\x01\n\x15ListConversionSources\x12I.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest\x1aJ.google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/conversions/v1beta/{parent=accounts/*}/conversionSources\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xdf\x01\n/com.google.shopping.merchant.conversions.v1betaB\x16\x43onversionSourcesProtoP\x01ZWcloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb;conversionspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - ConversionSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource").msgclass - ConversionSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.State").enummodule - ConversionSource::Controller = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ConversionSource.Controller").enummodule - AttributionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings").msgclass - AttributionSettings::ConversionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType").msgclass - AttributionSettings::AttributionModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel").enummodule - GoogleAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink").msgclass - MerchantCenterDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.MerchantCenterDestination").msgclass - CreateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest").msgclass - UpdateConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest").msgclass - DeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest").msgclass - UndeleteConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest").msgclass - GetConversionSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest").msgclass - ListConversionSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest").msgclass - ListConversionSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb deleted file mode 100644 index f25fc3f2e077..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/conversionsources_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/conversions/v1beta/conversionsources.proto for package 'google.shopping.merchant.conversions.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/shopping/merchant/conversions/v1beta/conversionsources_pb' - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - module ConversionSourcesService - # Service for managing conversion sources for a merchant account. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' - - # Creates a new conversion source. - rpc :CreateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Updates information of an existing conversion source. Available only for - # Merchant Center Destination conversion sources. - rpc :UpdateConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Archives an existing conversion source. If the conversion source is a - # Merchant Center Destination, it will be recoverable for 30 days. If the - # conversion source is a Google Analytics Link, it will be deleted - # immediately and can be restored by creating a new one. - rpc :DeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, ::Google::Protobuf::Empty - # Re-enables an archived conversion source. Only Available for Merchant - # Center Destination conversion sources. - rpc :UndeleteConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Fetches a conversion source. - rpc :GetConversionSource, ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource - # Retrieves the list of conversion sources the caller has access to. - rpc :ListConversionSources, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb deleted file mode 100644 index 9238cbdb5b76..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" -require "google/shopping/merchant/conversions/v1beta/version" - -module Google - module Shopping - module Merchant - module Conversions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/conversions/v1beta/rest" - # client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb deleted file mode 100644 index 6860c89e382f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/lib/google/shopping/merchant/conversions/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant 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-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb deleted file mode 100644 index f44123837180..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Conversions - module V1beta - # Represents a conversion source owned by a Merchant account. A merchant - # account can have up to 200 conversion sources. - # @!attribute [rw] google_analytics_link - # @return [::Google::Shopping::Merchant::Conversions::V1beta::GoogleAnalyticsLink] - # Immutable. Conversion Source of type "Link to Google Analytics Property". - # - # Note: The following fields are mutually exclusive: `google_analytics_link`, `merchant_center_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merchant_center_destination - # @return [::Google::Shopping::Merchant::Conversions::V1beta::MerchantCenterDestination] - # Conversion Source of type "Merchant Center Tag Destination". - # - # Note: The following fields are mutually exclusive: `merchant_center_destination`, `google_analytics_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Generated by the Content API upon creation of a - # new `ConversionSource`. Format: [a-z]\\{4}:.+ The four characters before the - # colon represent the type of conversio source. Content after the colon - # represents the ID of the conversion source within that type. The ID of two - # different conversion sources might be the same across different types. The - # following type prefixes are supported: - # - galk: For GoogleAnalyticsLink sources. - # - mcdn: For MerchantCenterDestination sources. - # @!attribute [r] state - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::State] - # Output only. Current state of this conversion source. Can't be edited - # through the API. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when an archived conversion source becomes - # permanently deleted and is no longer available to undelete. - # @!attribute [r] controller - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource::Controller] - # Output only. Controller of the conversion source. - class ConversionSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents state of the conversion source. - module State - # Conversion source has unspecified state. - STATE_UNSPECIFIED = 0 - - # Conversion source is fully functional. - ACTIVE = 1 - - # Conversion source has been archived in the last 30 days and not - # currently functional. Can be restored using the undelete method. - ARCHIVED = 2 - - # Conversion source creation has started but not fully finished yet. - PENDING = 3 - end - - # Entity controlling the conversion source. - module Controller - # Default value. This value is unused. - CONTROLLER_UNSPECIFIED = 0 - - # Controlled by the Merchant who owns the Conversion Source. - MERCHANT = 1 - - # Controlled by the YT Affiliates program. - YOUTUBE_AFFILIATES = 2 - end - end - - # Represents attribution settings for conversion sources receiving - # pre-attribution data. - # @!attribute [rw] attribution_lookback_window_days - # @return [::Integer] - # Required. Lookback windows (in days) used for attribution in this source. - # Supported values are 7, 30, 40. - # @!attribute [rw] attribution_model - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::AttributionModel] - # Required. Attribution model. - # @!attribute [rw] conversion_type - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings::ConversionType>] - # Immutable. Unordered list. List of different conversion types a conversion - # event can be classified as. A standard "purchase" type will be - # automatically created if this list is empty at creation time. - class AttributionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing a types of conversion events - # @!attribute [r] name - # @return [::String] - # Output only. Conversion event name, as it'll be reported by the client. - # @!attribute [r] report - # @return [::Boolean] - # Output only. Option indicating if the type should be included in Merchant - # Center reporting. - class ConversionType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribution model used for this source. We support the same set of - # models offered by Google Analytics 4, as described in: - # https://support.google.com/analytics/answer/10596866. - module AttributionModel - # Unspecified model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0 - - # Cross-channel Last Click model. - CROSS_CHANNEL_LAST_CLICK = 1 - - # Ads-preferred Last Click model. - ADS_PREFERRED_LAST_CLICK = 2 - - # Cross-channel Data Driven model. - CROSS_CHANNEL_DATA_DRIVEN = 5 - - # Cross-channel First Click model. - CROSS_CHANNEL_FIRST_CLICK = 6 - - # Cross-channel Linear model. - CROSS_CHANNEL_LINEAR = 7 - - # Cross-channel Position Based model. - CROSS_CHANNEL_POSITION_BASED = 8 - - # Cross-channel Time Decay model. - CROSS_CHANNEL_TIME_DECAY = 9 - end - end - - # "Google Analytics Link" sources can be used to get conversion data from an - # existing Google Analytics property into the linked Merchant Center account. - # @!attribute [rw] property_id - # @return [::Integer] - # Required. Immutable. ID of the Google Analytics property the merchant is - # linked to. - # @!attribute [r] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Output only. Attribution settings for the linked Google Analytics property. - # @!attribute [r] property - # @return [::String] - # Output only. Name of the Google Analytics property the merchant is linked - # to. - class GoogleAnalyticsLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # "Merchant Center Destination" sources can be used to send conversion events - # from an online store using a Google tag directly to a Merchant Center account - # where the source is created. - # @!attribute [r] destination - # @return [::String] - # Output only. Merchant Center Destination ID. - # @!attribute [rw] attribution_settings - # @return [::Google::Shopping::Merchant::Conversions::V1beta::AttributionSettings] - # Required. Attribution settings being used for the Merchant Center - # Destination. - # @!attribute [rw] display_name - # @return [::String] - # Required. Merchant-specified display name for the destination. This is the - # name that identifies the conversion source within the Merchant Center UI. - # Limited to 64 characters. - # @!attribute [rw] currency_code - # @return [::String] - # Required. Three-letter currency code (ISO 4217). The currency code defines - # in which currency the conversions sent to this destination will be reported - # in Merchant Center. - class MerchantCenterDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateConversionSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that will own the new conversion source. - # Format: accounts/\\{account} - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The conversion source description. A new ID will be automatically - # assigned to it upon creation. - class CreateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateConversionSource method. - # @!attribute [rw] conversion_source - # @return [::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource] - # Required. The new version of the conversion source data. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields being updated. - class UpdateConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be deleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class DeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UndeleteConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be undeleted. - # Format: accounts/\\{account}/conversionSources/\\{conversion_source} - class UndeleteConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetConversionSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the conversion source to be fetched. - # Format: accounts/\\{account}/conversionsources/\\{conversion_source} - class GetConversionSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListConversionSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of conversion - # sources. Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of conversion sources to return in a page. - # If no `page_size` is specified, `100` is used as the default value. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # Regardless of pagination, at most `200` conversion sources are returned - # in total. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. Show deleted (archived) option. - class ListConversionSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListConversionSources method. - # @!attribute [rw] conversion_sources - # @return [::Array<::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource>] - # List of conversion sources. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to be used to fetch the next results page. - class ListConversionSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/Gemfile deleted file mode 100644 index 6a2aef3b6555..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta", path: "../" -else - gem "google-shopping-merchant-conversions-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-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb deleted file mode 100644 index 8081af021563..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/create_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the create_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source. -# -def create_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new - - # Call the create_conversion_source method. - result = client.create_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb deleted file mode 100644 index 67d343214d62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/delete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the delete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source. -# -def delete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new - - # Call the delete_conversion_source method. - result = client.delete_conversion_source request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb deleted file mode 100644 index 6c928140a9a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/get_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the get_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source. -# -def get_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new - - # Call the get_conversion_source method. - result = client.get_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb deleted file mode 100644 index 45183543d605..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/list_conversion_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the list_conversion_sources call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources. -# -def list_conversion_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new - - # Call the list_conversion_sources method. - result = client.list_conversion_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p item - end -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb deleted file mode 100644 index 88a2acac8a2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/undelete_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the undelete_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source. -# -def undelete_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new - - # Call the undelete_conversion_source method. - result = client.undelete_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb deleted file mode 100644 index e65690f44b15..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/conversion_sources_service/update_conversion_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] -require "google/shopping/merchant/conversions/v1beta" - -## -# Snippet for the update_conversion_source call in the ConversionSourcesService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source. -# -def update_conversion_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new - - # Call the update_conversion_source method. - result = client.update_conversion_source request - - # The returned object is of type Google::Shopping::Merchant::Conversions::V1beta::ConversionSource. - p result -end -# [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json deleted file mode 100644 index 6649119ca2d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/snippets/snippet_metadata_google.shopping.merchant.conversions.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-conversions-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.conversions.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync", - "title": "Snippet for the create_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source.", - "file": "conversion_sources_service/create_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#create_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "CreateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.CreateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync", - "title": "Snippet for the update_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source.", - "file": "conversion_sources_service/update_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#update_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UpdateConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UpdateConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync", - "title": "Snippet for the delete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source.", - "file": "conversion_sources_service/delete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#delete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "DeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.DeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync", - "title": "Snippet for the undelete_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source.", - "file": "conversion_sources_service/undelete_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#undelete_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "UndeleteConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.UndeleteConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync", - "title": "Snippet for the get_conversion_source call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source.", - "file": "conversion_sources_service/get_conversion_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversion_source", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#get_conversion_source", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "GetConversionSource", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.GetConversionSource", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync", - "title": "Snippet for the list_conversion_sources call in the ConversionSourcesService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources.", - "file": "conversion_sources_service/list_conversion_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversion_sources", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client#list_conversion_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse", - "client": { - "short_name": "ConversionSourcesService::Client", - "full_name": "::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client" - }, - "method": { - "short_name": "ListConversionSources", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService.ListConversionSources", - "service": { - "short_name": "ConversionSourcesService", - "full_name": "google.shopping.merchant.conversions.v1beta.ConversionSourcesService" - } - } - }, - "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-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_paths_test.rb deleted file mode 100644 index ac9354d66391..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_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/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_conversion_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversion_source_path account: "value0", conversion_source: "value1" - assert_equal "accounts/value0/conversionSources/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb deleted file mode 100644 index dce67f4f09e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_rest_test.rb +++ /dev/null @@ -1,428 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest" - - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_create_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_count - end - end - end - - def test_update_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_update_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_count - end - end - end - - def test_delete_conversion_source - # 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_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_delete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversion_source_client_stub.call_count - end - end - end - - def test_undelete_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_undelete_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_count - end - end - end - - def test_get_conversion_source - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_get_conversion_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_conversion_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_conversion_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_conversion_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_count - end - end - end - - def test_list_conversion_sources - # Create test objects. - client_result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::ServiceStub.stub :transcode_list_conversion_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb deleted file mode 100644 index 67b1bc0f16d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/google/shopping/merchant/conversions/v1beta/conversion_sources_service_test.rb +++ /dev/null @@ -1,467 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/conversions/v1beta/conversionsources_pb" -require "google/shopping/merchant/conversions/v1beta/conversion_sources_service" - -class ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversion_source = {} - - create_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_conversion_source parent: parent, conversion_source: conversion_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_conversion_source({ parent: parent, conversion_source: conversion_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::CreateConversionSourceRequest.new(parent: parent, conversion_source: conversion_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversion_source_client_stub.call_rpc_count - end - end - - def test_update_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - conversion_source = {} - update_mask = {} - - update_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource), request["conversion_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_conversion_source conversion_source: conversion_source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_conversion_source({ conversion_source: conversion_source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UpdateConversionSourceRequest.new(conversion_source: conversion_source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_conversion_source_client_stub.call_rpc_count - end - end - - def test_delete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::DeleteConversionSourceRequest.new(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_conversion_source_client_stub.call_rpc_count - end - end - - def test_undelete_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undelete_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::UndeleteConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_conversion_source_client_stub.call_rpc_count - end - end - - def test_get_conversion_source - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversion_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversion_source, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversion_source_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_conversion_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_conversion_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_conversion_source ::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_conversion_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_conversion_source(::Google::Shopping::Merchant::Conversions::V1beta::GetConversionSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_conversion_source_client_stub.call_rpc_count - end - end - - def test_list_conversion_sources - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_deleted = true - - list_conversion_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversion_sources, name - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversion_sources_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_conversion_sources parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_conversion_sources ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_conversion_sources({ parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_conversion_sources(::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_conversion_sources_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::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::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-conversions-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"